[weewx-development] Re: Get dailyrain value in custom driver

2020-06-27 Thread Bastiaan Meelberg
Hi,

Just use the rainfall_daily from the WLL and set that as the start value.



On Saturday, June 27, 2020 at 11:45:12 PM UTC+2, flor...@pre-vost.fr wrote:
>
> Hi,
>
> How it is possible to have the daily rain in custom driver ? 
>
> I would like to check this value to compare with the Weatherlink live 
> module.
>
> It for attempt to fail result when you restart weewx
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/709c3ab9-ad64-49c1-9474-c690de569559o%40googlegroups.com.


[weewx-development] Get dailyrain value in custom driver

2020-06-27 Thread flor...@pre-vost.fr
Hi,

How it is possible to have the daily rain in custom driver ? 

I would like to check this value to compare with the Weatherlink live 
module.

It for attempt to fail result when you restart weewx

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/2671f676-080d-46fc-9075-e2856b2652cen%40googlegroups.com.


Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread flor...@pre-vost.fr
Hi,
Please keep one repo... how user can choose the right repo ?

I think it will be good to split code to one git.

Le samedi 27 juin 2020 à 10:53:21 UTC+2, flor...@pre-vost.fr a écrit :

> Hi,
>
> Baastian, yes of course, I think it a good idea to make a request using 
> weewx object to read the daily rain to the database and make a comparison 
> with the rainfall daily by the WLL but I need the help of @Tom Keffer for 
> this.
>
> For UnitUS, I know that if it possible but for readability, I decided to 
> make a conversion before yield the packet to the genlooppackets(). Also, 
> when i need to add record manual by using the method addRecords, I need to 
> put on the packet the right unit set in weewx.conf. If you've another 
> suggest, let me know :) 
>
> Maarten, I will fix this issue in few days, I know how can I do this by 
> search any key in each sensor :) 
>
> -fp
>
> Le samedi 27 juin 2020 à 10:40:09 UTC+2, hoev...@gmail.com a écrit :
>
>> Hello Bastiaan,
>>
>> The WLL is a wonderful piece of equipment. Now I can run production with 
>> WeeWX, and start a test-enviroment in a virtual machine, while talking to 
>> the same WLL.
>>
>> I've installed your driver. I have running my ISS on ID 2 (and have an 
>> external temp sensor running on sensor 3).
>>
>> When ISS set to ID=2, I only seems to see internal sensor data, like:
>>
>> LOOP:   2020-06-27 10:37:51 CEST (1593247071) altimeter: 
>> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247071, 
>> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
>> rainRate: 0.0, usUnits: 17
>> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
>> LOOP:   2020-06-27 10:37:51 CEST (1593247071) dateTime: 1593247071, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:37:53 CEST (1593247073) dateTime: 1593247073, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:37:56 CEST (1593247076) dateTime: 1593247076, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:37:58 CEST (1593247078) dateTime: 1593247078, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:01 CEST (1593247081) dateTime: 1593247081, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:03 CEST (1593247083) dateTime: 1593247083, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:06 CEST (1593247086) dateTime: 1593247086, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:06 CEST (1593247086) altimeter: 
>> 1008.6925672055719, barometer: 1009.04207968256, dateTime: 1593247086, 
>> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.6018492219138, 
>> rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:08 CEST (1593247088) dateTime: 1593247088, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>>
>>
>>
>> When set ISS to ID=1, I see the same
>>
>> LOOP:   2020-06-27 10:38:56 CEST (1593247136) altimeter: 
>> 1008.7264350305117, barometer: 1009.075943564148, dateTime: 1593247136, 
>> inDewpoint: 17.22, inHumidity: 54.9, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.635713103502, 
>> rainRate: 0.0, usUnits: 17
>> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
>> LOOP:   2020-06-27 10:38:56 CEST (1593247136) dateTime: 1593247136, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:58 CEST (1593247138) dateTime: 1593247138, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:01 CEST (1593247141) dateTime: 1593247141, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:03 CEST (1593247143) dateTime: 1593247143, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:06 CEST (1593247146) dateTime: 1593247146, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:08 CEST (1593247148) dateTime: 1593247148, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:11 CEST (1593247151) dateTime: 1593247151, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:11 CEST (1593247151) altimeter: 
>> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247151, 
>> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
>> rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:13 CEST (1593247153) dateTime: 1593247153, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>>
>> Op zaterdag 27 juni 2020 om 10:17:55 UTC+2 schreef Bastiaan Meelberg:
>>
>>> Python is pretty new to me, I was unaware of the use of the _packet 
>>> underscore method. I will update my code. Thanks for the tip.
>>>
>>> Have a look at the rain calculations, I found out yesterday, during a 
>>> 

Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread flor...@pre-vost.fr
Please keep a one repo on github. If we are some repo, how the user can 
choose the right driver ?

It will be good to split

Le samedi 27 juin 2020 à 10:53:21 UTC+2, flor...@pre-vost.fr a écrit :

> Hi,
>
> Baastian, yes of course, I think it a good idea to make a request using 
> weewx object to read the daily rain to the database and make a comparison 
> with the rainfall daily by the WLL but I need the help of @Tom Keffer for 
> this.
>
> For UnitUS, I know that if it possible but for readability, I decided to 
> make a conversion before yield the packet to the genlooppackets(). Also, 
> when i need to add record manual by using the method addRecords, I need to 
> put on the packet the right unit set in weewx.conf. If you've another 
> suggest, let me know :) 
>
> Maarten, I will fix this issue in few days, I know how can I do this by 
> search any key in each sensor :) 
>
> -fp
>
> Le samedi 27 juin 2020 à 10:40:09 UTC+2, hoev...@gmail.com a écrit :
>
>> Hello Bastiaan,
>>
>> The WLL is a wonderful piece of equipment. Now I can run production with 
>> WeeWX, and start a test-enviroment in a virtual machine, while talking to 
>> the same WLL.
>>
>> I've installed your driver. I have running my ISS on ID 2 (and have an 
>> external temp sensor running on sensor 3).
>>
>> When ISS set to ID=2, I only seems to see internal sensor data, like:
>>
>> LOOP:   2020-06-27 10:37:51 CEST (1593247071) altimeter: 
>> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247071, 
>> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
>> rainRate: 0.0, usUnits: 17
>> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
>> LOOP:   2020-06-27 10:37:51 CEST (1593247071) dateTime: 1593247071, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:37:53 CEST (1593247073) dateTime: 1593247073, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:37:56 CEST (1593247076) dateTime: 1593247076, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:37:58 CEST (1593247078) dateTime: 1593247078, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:01 CEST (1593247081) dateTime: 1593247081, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:03 CEST (1593247083) dateTime: 1593247083, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:06 CEST (1593247086) dateTime: 1593247086, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:06 CEST (1593247086) altimeter: 
>> 1008.6925672055719, barometer: 1009.04207968256, dateTime: 1593247086, 
>> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.6018492219138, 
>> rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:08 CEST (1593247088) dateTime: 1593247088, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>>
>>
>>
>> When set ISS to ID=1, I see the same
>>
>> LOOP:   2020-06-27 10:38:56 CEST (1593247136) altimeter: 
>> 1008.7264350305117, barometer: 1009.075943564148, dateTime: 1593247136, 
>> inDewpoint: 17.22, inHumidity: 54.9, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.635713103502, 
>> rainRate: 0.0, usUnits: 17
>> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
>> LOOP:   2020-06-27 10:38:56 CEST (1593247136) dateTime: 1593247136, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:38:58 CEST (1593247138) dateTime: 1593247138, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:01 CEST (1593247141) dateTime: 1593247141, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:03 CEST (1593247143) dateTime: 1593247143, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:06 CEST (1593247146) dateTime: 1593247146, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:08 CEST (1593247148) dateTime: 1593247148, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:11 CEST (1593247151) dateTime: 1593247151, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:11 CEST (1593247151) altimeter: 
>> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247151, 
>> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
>> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
>> rainRate: 0.0, usUnits: 17
>> LOOP:   2020-06-27 10:39:13 CEST (1593247153) dateTime: 1593247153, 
>> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>>
>> Op zaterdag 27 juni 2020 om 10:17:55 UTC+2 schreef Bastiaan Meelberg:
>>
>>> Python is pretty new to me, I was unaware of the use of the _packet 
>>> underscore method. I will update my code. Thanks for the tip.
>>>
>>> Have a look at the rain calculations, I found out yesterday, 

Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread flor...@pre-vost.fr
Hi,

Baastian, yes of course, I think it a good idea to make a request using 
weewx object to read the daily rain to the database and make a comparison 
with the rainfall daily by the WLL but I need the help of @Tom Keffer for 
this.

For UnitUS, I know that if it possible but for readability, I decided to 
make a conversion before yield the packet to the genlooppackets(). Also, 
when i need to add record manual by using the method addRecords, I need to 
put on the packet the right unit set in weewx.conf. If you've another 
suggest, let me know :) 

Maarten, I will fix this issue in few days, I know how can I do this by 
search any key in each sensor :) 

-fp

Le samedi 27 juin 2020 à 10:40:09 UTC+2, hoev...@gmail.com a écrit :

> Hello Bastiaan,
>
> The WLL is a wonderful piece of equipment. Now I can run production with 
> WeeWX, and start a test-enviroment in a virtual machine, while talking to 
> the same WLL.
>
> I've installed your driver. I have running my ISS on ID 2 (and have an 
> external temp sensor running on sensor 3).
>
> When ISS set to ID=2, I only seems to see internal sensor data, like:
>
> LOOP:   2020-06-27 10:37:51 CEST (1593247071) altimeter: 
> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247071, 
> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
> rainRate: 0.0, usUnits: 17
> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
> LOOP:   2020-06-27 10:37:51 CEST (1593247071) dateTime: 1593247071, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:53 CEST (1593247073) dateTime: 1593247073, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:56 CEST (1593247076) dateTime: 1593247076, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:58 CEST (1593247078) dateTime: 1593247078, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:01 CEST (1593247081) dateTime: 1593247081, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:03 CEST (1593247083) dateTime: 1593247083, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:06 CEST (1593247086) dateTime: 1593247086, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:06 CEST (1593247086) altimeter: 
> 1008.6925672055719, barometer: 1009.04207968256, dateTime: 1593247086, 
> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.6018492219138, 
> rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:08 CEST (1593247088) dateTime: 1593247088, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>
>
>
> When set ISS to ID=1, I see the same
>
> LOOP:   2020-06-27 10:38:56 CEST (1593247136) altimeter: 
> 1008.7264350305117, barometer: 1009.075943564148, dateTime: 1593247136, 
> inDewpoint: 17.22, inHumidity: 54.9, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.635713103502, 
> rainRate: 0.0, usUnits: 17
> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
> LOOP:   2020-06-27 10:38:56 CEST (1593247136) dateTime: 1593247136, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:58 CEST (1593247138) dateTime: 1593247138, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:01 CEST (1593247141) dateTime: 1593247141, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:03 CEST (1593247143) dateTime: 1593247143, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:06 CEST (1593247146) dateTime: 1593247146, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:08 CEST (1593247148) dateTime: 1593247148, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:11 CEST (1593247151) dateTime: 1593247151, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:11 CEST (1593247151) altimeter: 
> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247151, 
> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
> rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:13 CEST (1593247153) dateTime: 1593247153, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>
> Op zaterdag 27 juni 2020 om 10:17:55 UTC+2 schreef Bastiaan Meelberg:
>
>> Python is pretty new to me, I was unaware of the use of the _packet 
>> underscore method. I will update my code. Thanks for the tip.
>>
>> Have a look at the rain calculations, I found out yesterday, during a 
>> rain shower, setting  the self.rain_previous_period to zero is not a 
>> good idea. If weewx is reloading the diver (and it does) it will add the 
>> daily rain as a whole new rainfall. I will update my repo during the day.
>>
>> Also at midnight WLL will reset the rain_daily, so at that moment the 
>> 

Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread Bastiaan Meelberg
Yes! That will do the trick for now.

Keep in mind that the rain count in the current repo is Wrong! I will post 
an updated one soon.



On Saturday, June 27, 2020 at 10:46:45 AM UTC+2, Maarten van der Hoeven 
wrote:
>
> @Bastiaan, when I change this piece of code (txid=2), it is retrieving 
> live data from ISS:
>
> def DecodeDataWLL(self, data): 
> timestamp = data['ts'] 
> packet = {'dateTime': timestamp, 'usUnits': weewx.US} 
>
> for condition in data['conditions']: 
>   if condition["data_structure_type"] == 1 and 
> *condition['txid'] 
> == 2:* 
>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/698d4e2f-e3c5-43dd-aa70-76e9a2938ec3o%40googlegroups.com.


Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread Bastiaan Meelberg
Hello Maarten,

Glad you like my driver. I had similar problems, my ISS is on 1 and a wind 
unit on 4. WLL will produce more ‘conditions’ in the JSON with the same 
data_structure_type. So simply looking for a structure_type is not 
sufficient. for example here is my current_condition:


   - 

{
  "data": {
"did": "001D0A7104C8",
"ts": 1593247405,
"conditions": [
  {
"lsid": 242741,
"data_structure_type": 1,
"txid": 1,
"temp": 73.6,
"hum": 81.3,
"dew_point": 67.5,
"wet_bulb": 69.1,
"heat_index": 75.6,
"wind_chill": 73.6,
"thw_index": 75.6,
"thsw_index": 85,
"wind_speed_last": 2,
"wind_dir_last": 198,
"wind_speed_avg_last_1_min": 2.37,
"wind_dir_scalar_avg_last_1_min": 174,
"wind_speed_avg_last_2_min": 2.37,
"wind_dir_scalar_avg_last_2_min": 170,
"wind_speed_hi_last_2_min": 4,
"wind_dir_at_hi_speed_last_2_min": 110,
"wind_speed_avg_last_10_min": 1.68,
"wind_dir_scalar_avg_last_10_min": 187,
"wind_speed_hi_last_10_min": 5,
"wind_dir_at_hi_speed_last_10_min": 190,
"rain_size": 2,
"rain_rate_last": 0,
"rain_rate_hi": 0,
"rainfall_last_15_min": 0,
"rain_rate_hi_last_15_min": 0,
"rainfall_last_60_min": 0,
"rainfall_last_24_hr": 25,
"rain_storm": 25,
"rain_storm_start_at": 1593206161,
"solar_rad": 496,
"uv_index": 3.4,
"rx_state": 0,
"trans_battery_flag": 0,
"rainfall_daily": 20,
"rainfall_monthly": 325,
"rainfall_year": 1694,
"rain_storm_last": 46,
"rain_storm_last_start_at": 1592308741,
"rain_storm_last_end_at": 1592553661
  },
  {
"lsid": 242760,
"data_structure_type": 1,
"txid": 4,
"temp": null,
"hum": null,
"dew_point": null,
"wet_bulb": null,
"heat_index": null,
"wind_chill": null,
"thw_index": null,
"thsw_index": null,
"wind_speed_last": 2,
"wind_dir_last": 198,
"wind_speed_avg_last_1_min": 2.37,
"wind_dir_scalar_avg_last_1_min": 174,
"wind_speed_avg_last_2_min": 2.37,
"wind_dir_scalar_avg_last_2_min": 170,
"wind_speed_hi_last_2_min": 4,
"wind_dir_at_hi_speed_last_2_min": 110,
"wind_speed_avg_last_10_min": 1.68,
"wind_dir_scalar_avg_last_10_min": 187,
"wind_speed_hi_last_10_min": 5,
"wind_dir_at_hi_speed_last_10_min": 190,
"rain_size": 1,
"rain_rate_last": 0,
"rain_rate_hi": 0,
"rainfall_last_15_min": 0,
"rain_rate_hi_last_15_min": 0,
"rainfall_last_60_min": 0,
"rainfall_last_24_hr": 0,
"rain_storm": null,
"rain_storm_start_at": null,
"solar_rad": null,
"uv_index": null,
"rx_state": 0,
"trans_battery_flag": 0,
"rainfall_daily": 0,
"rainfall_monthly": 0,
"rainfall_year": 0,
"rain_storm_last": null,
"rain_storm_last_start_at": null,
"rain_storm_last_end_at": null
  },
  {
"lsid": 242740,
"data_structure_type": 4,
"temp_in": 76.7,
"hum_in": 55.3,
"dew_point_in": 59.5,
"heat_index_in": 77.2
  },
  {
"lsid": 242739,
"data_structure_type": 3,
"bar_sea_level": 29.809,
"bar_trend": -0.007,
"bar_absolute": 29.707
  }
]
  },
  "error": null
}



A fully customisable tx_id configurator is on my to_do list. Can you post 
you're current_condtition JSON, so I can have a look.  



On Saturday, June 27, 2020 at 10:40:09 AM UTC+2, Maarten van der Hoeven 
wrote:
>
> Hello Bastiaan,
>
> The WLL is a wonderful piece of equipment. Now I can run production with 
> WeeWX, and start a test-enviroment in a virtual machine, while talking to 
> the same WLL.
>
> I've installed your driver. I have running my ISS on ID 2 (and have an 
> external temp sensor running on sensor 3).
>
> When ISS set to ID=2, I only seems to see internal sensor data, like:
>
> LOOP:   2020-06-27 10:37:51 CEST (1593247071) altimeter: 
> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247071, 
> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
> rainRate: 0.0, usUnits: 17
> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
> LOOP:   2020-06-27 10:37:51 CEST (1593247071) dateTime: 1593247071, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:53 CEST (1593247073) dateTime: 1593247073, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:56 CEST (1593247076) dateTime: 1593247076, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:58 CEST (1593247078) dateTime: 1593247078, 
> 

Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread Maarten van der Hoeven
@Bastiaan, when I change this piece of code (txid=2), it is retrieving live 
data from ISS:

def DecodeDataWLL(self, data): 
timestamp = data['ts'] 
packet = {'dateTime': timestamp, 'usUnits': weewx.US} 

for condition in data['conditions']: 
  if condition["data_structure_type"] == 1 and 
*condition['txid'] 
== 2:* 

Op zaterdag 27 juni 2020 om 10:40:09 UTC+2 schreef Maarten van der Hoeven:

> Hello Bastiaan,
>
> The WLL is a wonderful piece of equipment. Now I can run production with 
> WeeWX, and start a test-enviroment in a virtual machine, while talking to 
> the same WLL.
>
> I've installed your driver. I have running my ISS on ID 2 (and have an 
> external temp sensor running on sensor 3).
>
> When ISS set to ID=2, I only seems to see internal sensor data, like:
>
> LOOP:   2020-06-27 10:37:51 CEST (1593247071) altimeter: 
> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247071, 
> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
> rainRate: 0.0, usUnits: 17
> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
> LOOP:   2020-06-27 10:37:51 CEST (1593247071) dateTime: 1593247071, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:53 CEST (1593247073) dateTime: 1593247073, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:56 CEST (1593247076) dateTime: 1593247076, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:37:58 CEST (1593247078) dateTime: 1593247078, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:01 CEST (1593247081) dateTime: 1593247081, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:03 CEST (1593247083) dateTime: 1593247083, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:06 CEST (1593247086) dateTime: 1593247086, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:06 CEST (1593247086) altimeter: 
> 1008.6925672055719, barometer: 1009.04207968256, dateTime: 1593247086, 
> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.6018492219138, 
> rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:08 CEST (1593247088) dateTime: 1593247088, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>
>
>
> When set ISS to ID=1, I see the same
>
> LOOP:   2020-06-27 10:38:56 CEST (1593247136) altimeter: 
> 1008.7264350305117, barometer: 1009.075943564148, dateTime: 1593247136, 
> inDewpoint: 17.22, inHumidity: 54.9, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.635713103502, 
> rainRate: 0.0, usUnits: 17
> {'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
> LOOP:   2020-06-27 10:38:56 CEST (1593247136) dateTime: 1593247136, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:38:58 CEST (1593247138) dateTime: 1593247138, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:01 CEST (1593247141) dateTime: 1593247141, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:03 CEST (1593247143) dateTime: 1593247143, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:06 CEST (1593247146) dateTime: 1593247146, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:08 CEST (1593247148) dateTime: 1593247148, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:11 CEST (1593247151) dateTime: 1593247151, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:11 CEST (1593247151) altimeter: 
> 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247151, 
> inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
> 27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
> rainRate: 0.0, usUnits: 17
> LOOP:   2020-06-27 10:39:13 CEST (1593247153) dateTime: 1593247153, 
> maxSolarRad: None, rainRate: 0.0, usUnits: 17
>
> Op zaterdag 27 juni 2020 om 10:17:55 UTC+2 schreef Bastiaan Meelberg:
>
>> Python is pretty new to me, I was unaware of the use of the _packet 
>> underscore method. I will update my code. Thanks for the tip.
>>
>> Have a look at the rain calculations, I found out yesterday, during a 
>> rain shower, setting  the self.rain_previous_period to zero is not a 
>> good idea. If weewx is reloading the diver (and it does) it will add the 
>> daily rain as a whole new rainfall. I will update my repo during the day.
>>
>> Also at midnight WLL will reset the rain_daily, so at that moment the 
>> rain_previous must be reset.
>>
>> I also don't think you need to do all the METRIC and METRICWX 
>> conversions. Weewx will do that for you, if you set the 'usUnits': 
>> weewx.US  in the _packet. The LOOP will be generated and weewx is adding 
>> the record using the set database 

Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread Maarten van der Hoeven
Hello Bastiaan,

The WLL is a wonderful piece of equipment. Now I can run production with 
WeeWX, and start a test-enviroment in a virtual machine, while talking to 
the same WLL.

I've installed your driver. I have running my ISS on ID 2 (and have an 
external temp sensor running on sensor 3).

When ISS set to ID=2, I only seems to see internal sensor data, like:

LOOP:   2020-06-27 10:37:51 CEST (1593247071) altimeter: 
1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247071, 
inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
rainRate: 0.0, usUnits: 17
{'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
LOOP:   2020-06-27 10:37:51 CEST (1593247071) dateTime: 1593247071, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:37:53 CEST (1593247073) dateTime: 1593247073, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:37:56 CEST (1593247076) dateTime: 1593247076, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:37:58 CEST (1593247078) dateTime: 1593247078, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:01 CEST (1593247081) dateTime: 1593247081, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:03 CEST (1593247083) dateTime: 1593247083, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:06 CEST (1593247086) dateTime: 1593247086, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:06 CEST (1593247086) altimeter: 
1008.6925672055719, barometer: 1009.04207968256, dateTime: 1593247086, 
inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
27.057, maxSolarRad: None, pressure: 1008.6018492219138, 
rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:08 CEST (1593247088) dateTime: 1593247088, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17



When set ISS to ID=1, I see the same

LOOP:   2020-06-27 10:38:56 CEST (1593247136) altimeter: 
1008.7264350305117, barometer: 1009.075943564148, dateTime: 1593247136, 
inDewpoint: 17.22, inHumidity: 54.9, inTemp: 
27.057, maxSolarRad: None, pressure: 1008.635713103502, 
rainRate: 0.0, usUnits: 17
{'data': {'broadcast_port': 2, 'duration': 3600}, 'error': None}
LOOP:   2020-06-27 10:38:56 CEST (1593247136) dateTime: 1593247136, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:58 CEST (1593247138) dateTime: 1593247138, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:01 CEST (1593247141) dateTime: 1593247141, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:03 CEST (1593247143) dateTime: 1593247143, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:06 CEST (1593247146) dateTime: 1593247146, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:08 CEST (1593247148) dateTime: 1593247148, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:11 CEST (1593247151) dateTime: 1593247151, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:11 CEST (1593247151) altimeter: 
1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247151, 
inDewpoint: 17.28, inHumidity: 55.1, inTemp: 
27.057, maxSolarRad: None, pressure: 1008.5679853403257, 
rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:13 CEST (1593247153) dateTime: 1593247153, 
maxSolarRad: None, rainRate: 0.0, usUnits: 17

Op zaterdag 27 juni 2020 om 10:17:55 UTC+2 schreef Bastiaan Meelberg:

> Python is pretty new to me, I was unaware of the use of the _packet 
> underscore method. I will update my code. Thanks for the tip.
>
> Have a look at the rain calculations, I found out yesterday, during a rain 
> shower, setting  the self.rain_previous_period to zero is not a good 
> idea. If weewx is reloading the diver (and it does) it will add the daily 
> rain as a whole new rainfall. I will update my repo during the day.
>
> Also at midnight WLL will reset the rain_daily, so at that moment the 
> rain_previous must be reset.
>
> I also don't think you need to do all the METRIC and METRICWX conversions. 
> Weewx will do that for you, if you set the 'usUnits': weewx.US  in the 
> _packet. The LOOP will be generated and weewx is adding the record using 
> the set database metrics.
>
>
>
> On Friday, June 26, 2020 at 6:56:18 PM UTC+2, flor...@pre-vost.fr wrote:
>>
>> Hi everyone and thank you for your support ! I'm very glade to know that 
>> people want to make this driver because there are not a lot.
>>
>> This is my repo :  https://github.com/Drealine/WLLDriver 
>>
>> @Bastiaan it's very nice ! Just, why you use update packet or not simply 
>> do a for _packet in blabla(): It's a udp protocol ?
>>
>> With my driver, you can retrive lost data by using API v2 of Weatherlink. 
>> Depend to your subscription.
>>
>> Glad to work with you, and if you want, it will be 

Re: [weewx-development] Weatherlink Live driver developpment

2020-06-27 Thread Bastiaan Meelberg
Python is pretty new to me, I was unaware of the use of the _packet 
underscore method. I will update my code. Thanks for the tip.

Have a look at the rain calculations, I found out yesterday, during a rain 
shower, setting  the self.rain_previous_period to zero is not a good idea. 
If weewx is reloading the diver (and it does) it will add the daily rain as 
a whole new rainfall. I will update my repo during the day.

Also at midnight WLL will reset the rain_daily, so at that moment the 
rain_previous must be reset.

I also don't think you need to do all the METRIC and METRICWX conversions. 
Weewx will do that for you, if you set the 'usUnits': weewx.US  in the 
_packet. The LOOP will be generated and weewx is adding the record using 
the set database metrics.



On Friday, June 26, 2020 at 6:56:18 PM UTC+2, flor...@pre-vost.fr wrote:
>
> Hi everyone and thank you for your support ! I'm very glade to know that 
> people want to make this driver because there are not a lot.
>
> This is my repo :  https://github.com/Drealine/WLLDriver 
>
> @Bastiaan it's very nice ! Just, why you use update packet or not simply 
> do a for _packet in blabla(): It's a udp protocol ?
>
> With my driver, you can retrive lost data by using API v2 of Weatherlink. 
> Depend to your subscription.
>
> Glad to work with you, and if you want, it will be more often that split 
> some git to one. 
>
> Regards, -fp 
>
> Le vendredi 26 juin 2020 à 18:35:45 UTC+2, Bastiaan Meelberg a écrit :
>
>> Hi, 
>>
>> I’m also working on a wll driver, including The 2,5 UDP packages. It is 
>> running now for a few days with good results (no rain check yet). 
>> The integration with the online fetch sounds interesting! 
>> This is my git fork: 
>> https://github.com/grebleem/WeatherLinkliveUDP 
>>
>> It is feeding my site: https://meteo-otterlo.nl 
>>
>> Cheers, Bastiaan 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/073ec2e6-6d1e-4947-82e2-51d9f1dd4ff2o%40googlegroups.com.


[weewx-development] Re: Syslog use in thread possibly cause thread exit?

2020-06-27 Thread James
On Friday, June 12, 2020 at 4:01:38 PM UTC+10, gjr80 wrote:
>
> Hi, 
>
> Can’t see why syslog is not thread safe, before v4 the WeeWX report engine 
> ran in a separate thread and all logging was done through syslog and I 
> don’t recall there ever being a syslog/thread issue. Likewise a number of 
> WeeWX v3 and earlier 3rd party drivers/services use threading and syslog 
> without issue. 
>
> Gary


Hi Gary,

Thanks.  I've found the cause of the thread exit.  Sometimes a garbled 
string gets received by the radio comms and it is a problem to parse.

WLST: parsing ST%bwater_level 1 0x0 water_level 2 0x0135
Traceback (most recent call last):
  File "/usr/share/weewx/user/water_level.py", line 191, in run
for p in re.split("[,]",line.decode("utf-8")):
  File "/usr/lib/python2.7/encodings/utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xea in position 2: 
invalid continuation byte
WLST: Exit inner while.

(WLST stands for Water Level Server Thread).

I'm not yet sure why my code didn't catch this exception when I was using 
syslog yet, but at least I now have a stable system.  

It is lovely to watch the water volume in our tanks increasing when a 
shower of rain comes over.

Cheers,
James. 

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/c2be3ed0-1cb9-49b5-956d-282f2b57bef9o%40googlegroups.com.