Re: [weewx-user] Re: Database Schema: Signals

2023-09-25 Thread Craig Young
Since I am mostly in the development/test stage I will use another unit for 
now and switch once V5 is released.

Craig

On Tuesday, September 26, 2023 at 6:44:41 PM UTC+13 gjr80 wrote:

> On Tuesday, 26 September 2023 at 14:03:11 UTC+10 craig.y...@gmail.com 
> wrote:
>
> Is group_angle a recent addition and not in my dictionary?
>
>
> Indeed it is, commit 2aba36a 
> 
>  of 
> 26 May refers. I was certain I was looking at master, I must have been 
> looking at one of the V5 branches. No matter, there are a few things you 
> can do. If developing your driver on v4.x you could define group_angle 
> yourself 
> and just make a note to remove the definition once v5 is released and you 
> are using v5, or you could use another unit group in the meantime and again 
> make a note to change in group_angle once v5 is released and you are 
> using v5. Or you could cut your development over to one of the v5 beta 
> releases, though if you are a new WeeWX user it might be easier to continue 
> with v4.x for the time being.
>
> Gary 
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/bb7cf6b6-2634-4795-ac3a-aef4530a52ffn%40googlegroups.com.


Re: [weewx-user] Re: Database Schema: Signals

2023-09-25 Thread gjr80

On Tuesday, 26 September 2023 at 14:03:11 UTC+10 craig.y...@gmail.com wrote:

Is group_angle a recent addition and not in my dictionary?


Indeed it is, commit 2aba36a 

 of 
26 May refers. I was certain I was looking at master, I must have been 
looking at one of the V5 branches. No matter, there are a few things you 
can do. If developing your driver on v4.x you could define group_angle yourself 
and just make a note to remove the definition once v5 is released and you 
are using v5, or you could use another unit group in the meantime and again 
make a note to change in group_angle once v5 is released and you are using 
v5. Or you could cut your development over to one of the v5 beta releases, 
though if you are a new WeeWX user it might be easier to continue with v4.x 
for the time being.

Gary 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/4c81b4e9-a0e1-4f90-af1f-ba4481769787n%40googlegroups.com.


Re: [weewx-user] Re: Database Schema: Signals

2023-09-25 Thread Karen K
Craig Young schrieb am Dienstag, 26. September 2023 um 06:03:11 UTC+2:

I inserted this line into my driver:
 weewx.units.obs_group_dict['signal1'] = 'group_angle'



You cannot use group names that you invent on the fly. The group for 
observation types measured in degrees is group_direction. 

If you want to define a new unit group you have to look into 
weewx.units.std_groups. It references 3 dicts, and all of them need an 
entry for your unit group.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/a8d9bb39-947c-4241-b138-039d3956a357n%40googlegroups.com.


Re: [weewx-user] Re: Database Schema: Signals

2023-09-25 Thread Craig Young
I inserted this line into my driver:
 weewx.units.obs_group_dict['signal1'] = 'group_angle'

when I run weewx I get this error in syslog:

Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__: Caught 
unrecoverable exception:
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:  
 'group_angle'
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:  
 Traceback (most recent call last):
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/share/weewx/weewxd", line 154, in main
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   engine.run()
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/share/weewx/weewx/engine.py", line 210, in run
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/share/weewx/weewx/engine.py", line 245, in dispatchEvent
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   callback(event)
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/share/weewx/weewx/engine.py", line 363, in new_loop_packet
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   converted_packet = self.converter.convertDict(event.packet)
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/share/weewx/weewx/units.py", line 952, in convertDict
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   target_dict[obs_type] = self.convert(as_value_tuple(obs_dict, 
obs_type))[0]
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/share/weewx/weewx/units.py", line 917, in convert
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   new_unit_type = self.group_unit_dict.get(val_t[2], USUnits[val_t[2]])
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/lib/python3.7/collections/__init__.py", line 914, in __getitem__
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   return self.__missing__(key)# support subclasses that define 
__missing__
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
 File "/usr/lib/python3.7/collections/__init__.py", line 906, in __missing__
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:    
   raise KeyError(key)
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:  
 KeyError: 'group_angle'
Sep 26 16:48:49 CLOWeatherStation weewx[5736] CRITICAL __main__:  
 Exiting.

if I change the line to this:
weewx.units.obs_group_dict['signal1'] = 'group_rain'

and run weewx I do not get the error.

Is group_angle a recent addition and not in my dictionary? 

On Monday, September 25, 2023 at 10:37:39 AM UTC+13 gjr80 wrote:

> Unit groups pose no limitations on what data can be stored in any database 
> field. All WeeWX numeric fields in the db schemas shipped with WeeWX are of 
> type real so can handle positive and negative numbers. What the unit groups 
> do is set the default formatting and default unit label when the field is 
> used in a WeeWX report tag. The unit group also sets what units the value 
> can be converted to/from. The default formatting and labels associated with 
> a unit group can be (and are) changed by the user either via config file or 
> programatically. Default formatting can be overridden on a tag by tag basis 
> through use of the .format() tag. Unit conversion options available with 
> a given unit group can also be changed (eg more available units added), 
> though this is normally done  programmatically and is not something that 
> can be done via tags in reports.
>
> You will find that group_direction and group_angle will both allow you to 
> store your positive/negative angle values; the difference will be in the 
> default formatting, default unit label and available unit conversion 
> options. Since you have positive/negative values I expect you will be, at 
> the very least, wanting to use a format in reports that is different to the 
> default used by both unit groups (refer to my previous post for the default 
> formats). Depending on requirements this might be as simple as using the 
> .format() tag in reports.
>
> Sorry if I seem to be belabouring the point, but I think it important to 
> be clear that unit groups have no effect on what/how data is stored in the 
> database; unit groups only affect the presentation of data.
>
> If it was me I would be use group_angle , mainly because the unit group 
> name is a better fit and the availability of conversion to radians if 
> required. I would use either .format() to change tag formatting in 
> reports or override the defaul

[weewx-user] Re: DAVIS Weatherlink Console 6313

2023-09-25 Thread 'Werner Krenn' via weewx-user
>  pulling from the WeatherLink website, not from the console, am I right
You are right - and the console don't support to get data from the console 
(no local API support).

> you are creating a separate database for this data
Yes - you can set, that this database is regularly shortened or not. 
[davisconsolehealthapi]
   max_age = None #  default = 2592000
Daniele Moro schrieb am Freitag, 22. September 2023 um 19:28:34 UTC+2:

> If I understand correctly, you are pulling from the WeatherLink website, 
> not from the console, am I right?
> Some other questions:
> - you are creating a separate database for this data, aren't you?
> - could you also pull weather data from the website, for the same 
> station-id?
>
> Il giorno sabato 2 settembre 2023 alle 18:38:38 UTC+2 Werner Krenn ha 
> scritto:
>
>> >Work this with a Davis Envoy and Weatherlink Datalogger Davis 6510 USB?  
>> No - Has no place for it
>> . 
>> Is just a display that can receive and display the data from a ISS, 
>> ISS-VUE, Soil Station, Leaf Station, but not a Transmitter Station (6331) 
>> and can send the data to the Weatherlink cloud.
>> A transmitter station (6331) can be set, but it cannot process data from 
>> it.
>> DAVIS Service says that this would be a feature that may come.
>>
>> Meteo Oberwallis schrieb am Samstag, 2. September 2023 um 15:57:25 UTC+2:
>>
>>> Hello.
>>>
>>> Work this with a Davis Envoy and Weatherlink Datalogger Davis 6510 USB?
>>>
>>> Thanks
>>> Stefan
>>>
>>> Werner Krenn schrieb am Freitag, 1. September 2023 um 20:43:37 UTC+2:
>>>
 I made an extension for WeeWx, which can record and display the health 
 data of the DAVIS Weatherlink Console 6313.

 https://github.com/WernerKr/weewx-davisconsolehealthapi

 Example:
 https://www.pc-wetterstation.de/wetter/weewx/healthc/index.html

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/de711490-872a-41b5-b12f-7078f0c0a8aen%40googlegroups.com.