[weewx-development] Re: Weatherlink Live driver developpment

2020-07-15 Thread Bastiaan Meelberg
ET is not provided by Weatherlink (similar as barometer), it is calculated 
by weewx. Some values can take a while before they appear in the database. 
There is also a [StdWXCalculate] section in weewx.conf to set your 
preferences.

Op woensdag 15 juli 2020 om 10:35:16 UTC+2 schreef hoev...@gmail.com:

> Yes, ET means evapotranspiration. I'm running the latest version now. 
> Values looking good, except for ET when the first record arrives in the 
> database. I started with empty tables. Repeated it three times, empty 
> tables and restarting weewx: every time the first record contains NULL in 
> et-field. Find attached the syslog, from the point I started weewx.
>
> MariaDB [weewx_import]> select from_unixtime(dateTime),radiation,uv,et 
> from archive order by datetime desc limit 10;
>
> +-+---++---+
> | from_unixtime(dateTime) | radiation | uv | 
> et|
>
> +-+---++---+
> | 2020-07-15 10:26:00 |546.25 | 3.2754 |  
> 0.004741001200203204 |
> | 2020-07-15 10:25:00 |   570 | 2.4253 |  
> 0.004747980364634784 |
> | 2020-07-15 10:24:00 |569.25 | 3.3003 |   
> 0.0047548316325 |
> | 2020-07-15 10:23:00 | 565.5 | 3.26250006 |  
> 0.004813387735026845 |
> | 2020-07-15 10:22:00 |   571.125 | 3.1997 | 
> 0.0048826512000132135 |
> | 2020-07-15 10:21:00 |   573 |3.2 
> |  NULL |
>
> +-+---++---+
> 6 rows in set (0.001 sec)
>
>
> Op dinsdag 14 juli 2020 om 21:09:02 UTC+2 schreef flor...@pre-vost.fr:
>
>> Updated my git for rainfall at midnight and added UV, radiation. Can you 
>> try ?
>>
>> For ET, it is evapotranspiration ? I not found value like ET in API 
>>
>> :) 
>>
>> Le mardi 14 juillet 2020 à 19:08:26 UTC+2, flor...@pre-vost.fr a écrit :
>>
>>> Yeah of course ! Thank a lot for your support !
>>>
>>> Weewx calculate the average of rainRate with the archive interval.
>>>
>>> If you can check the high rainRate between weatherlink.com and the 
>>> daily database of rainRate
>>>
>>> :)
>>>
>>> Le mardi 14 juillet 2020 à 18:55:21 UTC+2, hoev...@gmail.com a écrit :
>>>
 New rain this afternoon! 1.2 mm after starting weewx. Looking good! I 
 will let weewx run at least until tomorrow, to see if midnight-changes 
 (for 
 example daily rain reset) goes okay. I am unknowledgeable about verifying 
 the rainrate. I assume these  values are okay, as they are taken directly 
 from the device.

 MariaDB [weewx_import]> select 
 from_unixtime(datetime),rain,rainrate,radiation,uv,et,extratemp1 from 
 archive order by datetime desc limit 100;

 +-+-+-+---+--+--++
 | from_unixtime(datetime) | rain| rainrate| 
 radiation | uv   | et   | extratemp1 |

 +-+-+-+---+--+--++
 | 2020-07-14 18:50:00 |   0 |  0.9501 
 |  NULL | NULL | NULL | 15.6319446 |
 | 2020-07-14 18:49:00 |   0 |  0.9501 
 |  NULL | NULL | NULL | 15.612 |
 | 2020-07-14 18:48:00 |   0 |  0.9501 
 |  NULL | NULL | NULL | 15.612 |
 | 2020-07-14 18:47:00 |   0 |  0.9501 
 |  NULL | NULL | NULL | 15.612 |
 | 2020-07-14 18:46:00 |   0 |  0.9501 
 |  NULL | NULL | NULL | 15.612 |
 | 2020-07-14 18:45:00 |   0 |  0.9501 
 |  NULL | NULL | NULL | 15.612 |
 | 2020-07-14 18:44:00 |   0 |  0.9501 
 |  NULL | NULL | NULL | 15.557 |
 | 2020-07-14 18:43:00 |   0 |   1 
 |  NULL | NULL | NULL |   15.5 |
 | 2020-07-14 18:42:00 |   0 |  1.1501 
 |  NULL | NULL | NULL |   15.5 |
 | 2020-07-14 18:41:00 |   0 |  1.1501 
 |  NULL | NULL | NULL |   15.5 |
 | 2020-07-14 18:40:00 | 0.20004 | 1.1 
 |  NULL | NULL | NULL |   15.5 |
 | 2020-07-14 18:39:00 |   0 | 1.11875 
 |  NULL | NULL | NULL | 15.4791666 |
 | 2020-07-14 18:38:00 |   0 |  1.3005 
 |  NULL | NULL | NULL | 15.445 |
 | 2020-07-14 18:37:00  

[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-12 Thread Bastiaan Meelberg
It is unable to open socket 2, it looks like an other weewx is running. 

On Sunday, July 12, 2020 at 6:09:14 PM UTC+2, Maarten van der Hoeven wrote:
>
> Strange. I want to use the driver in my 'production'-environment, and got 
> this error. Any clue? As on my 'test'-environment it is running okay.
>
> Jul 12 18:03:16 weewx weewx[907239] INFO __main__: Using configuration 
> file /etc/weewx/weewx.conf
> Jul 12 18:03:16 weewx weewx[907239] INFO __main__: Debug is 1
> Jul 12 18:03:16 weewx weewx[907239] DEBUG __main__: Initializing engine
> Jul 12 18:03:16 weewx weewx[907239] INFO weewx.engine: Loading station 
> type WeatherLinkLiveUDP (user.weatherlinkliveudp)
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__: Caught OSError: 
> [Errno 98] Address already in use
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__:   Traceback 
> (most recent call last):
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__: File 
> "/usr/share/weewx/weewxd", line 148, in main
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__:   
> engine = weewx.engine.StdEngine(config_dict)
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__: File 
> "/usr/share/weewx/weewx/engine.py", line 69, in __init__
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__:   
> self.setupStation(config_dict)
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__: File 
> "/usr/share/weewx/weewx/engine.py", line 92, in setupStation
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__:   
> __import__(driver)
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__: File 
> "/usr/share/weewx/user/weatherlinkliveudp.py", line 50, in 
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__:   
> comsocket.bind(('', 2))
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__:   OSError: 
> [Errno 98] Address already in use
> Jul 12 18:03:16 weewx weewx[907239] CRITICAL __main__:   Waiting 
> 10 seconds then retrying...
>
> Driver:
> maarten@weewx:/usr/share/weewx/user$ ls -las
> total 184
>   4 drwxr-xr-x  4 root root   4096 Jul 12 18:07 .
>   4 drwxr-xr-x 11 root root   4096 Jun  2 11:15 ..
> 112 -rw-rw-r--  1 root root 112300 May 27 19:54 belchertown.py
>   4 -rw-rw-r--  1 root root   1795 Jul 10 11:36 calcdrought.py
>   4 -rw-r--r--  1 root root541 May 25 21:10 extensions.py
>   4 -rw-r--r--  1 root root306 Jun  2 00:16 __init__.py
>   4 drwxr-xr-x  7 root root   4096 Jul 12 18:00 installer
>   4 -rw-r--r--  1 root root   3857 Jun  3 12:17 lastrain.py
>  20 -rw-r--r--  1 root root  19742 May 27 15:25 mqtt.py
>   4 drwxr-xr-x  2 root root   4096 Jul 12 18:00 __pycache__
>  20 -rw-r--r--  1 root root  16841 Jul 12 18:00 weatherlinkliveudp.py
>
>
> Conf:
> 
> # station_type = Vantage
> station_type = WeatherLinkLiveUDP
> 
>
> ##
>
> [WeatherLinkLiveUDP]
> wll_ip = 192.168.2.33
> poll_interval = 10
> driver = user.weatherlinkliveudp
> extra_id = 3
>
>
>
>
> Op woensdag 8 juli 2020 om 19:37:41 UTC+2 schreef Maarten van der Hoeven:
>
>> Hi,
>>
>> I've been testing with the driver for a couple of days now, and all data 
>> is looking fine. I didnt see any strange deviation from the data that comes 
>> from your driver, and the data that comes from my WeatherLink IP (set up in 
>> another environment).
>>
>> So, it look good!
>>
>>
>> Op dinsdag 7 juli 2020 om 23:07:46 UTC+2 schreef Maarten van der Hoeven:
>>
>>> Yes, now the csv (although still empty) is created in the 'root'-dir. No 
>>> need for tmp anymore
>>>
>>> maarten@ubuntu:~/weatherlink$ ls -las
>>> total 36
>>>  4 drwxrwxr-x  2 maarten maarten  4096 Jul  7 23:06 .
>>>  4 drwxr-xr-x 24 maarten maarten  4096 Jul  7 21:41 ..
>>>  0 -rw-rw-r--  1 maarten maarten 0 Jul  7 23:06 davis1594155999.csv
>>>  8 -rw-r--r--  1 maarten maarten  7282 Jul  7 21:43 davis-csv.conf
>>>  4 -rw-r--r--  1 maarten maarten  2242 Jul  7 21:31 README.md
>>> 16 -rw-r--r--  1 maarten maarten 13259 Jul  7 22:53 weewx_weatherlink
>>>
>>>
>>> Op dinsdag 7 juli 2020 om 22:54:33 UTC+2 schreef Bastiaan Meelberg:
>>>
>>>> Somehow the tmp/ dir is not created. I dropped the tmp for now. Can you 
>>>> try again?
>>>>
>>>>
>>>>
>>>> On Tuesday, July 7, 2020 at 9:57:43 PM UTC+2, Maarten van der Hoeven 
>>>> wrote:
>>>>>
>>&g

[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-08 Thread Bastiaan Meelberg
Interesting. I made a small change so the program will show the sensors 
found. 
It looks like the extra temp is dataset 0 (lets skip that for now), 
barometer is set 2, inside is set 3 and the remaining data is set 4. So 
like you figured out, this should give the correct data:

baro_data = weather_data['sensors'][2]['data']
> iss_data = weather_data['sensors'][4]['data']
> indoor_data = weather_data['sensors'][3]['data']
>
>
On Wednesday, July 8, 2020 at 9:53:38 PM UTC+2, Maarten van der Hoeven 
wrote:
>
> maarten@ubuntu:~/weatherlink$ python3 weewx_weatherlink -s 
> 2020-07-07T12:00 -e 2020-07-07T12:30
> Use dates: 2020-07-07 12:00:00 - 2020-07-07 12:30:00
> 1 [1594116000] - [1594117800]: 2020-07-07 12:00:00 - 2020-07-07 12:30:00
> Finding stations:
>
>
>
> Op woensdag 8 juli 2020 om 21:22:33 UTC+2 schreef Bastiaan Meelberg:
>
>> Thanks for testing.
>>
>> The 'problem' with api v2 is that it delivers a HUGE amount of data. With 
>> my setup it works perfect, I can import months at the time.
>>
>> I think indeed of you different setup it is not working. Maybe a 
>> question/answer that the program is showing bit of the data and asks if it 
>> is the data the user wants to import.
>>
>> I added a 'print url' to the latest build, if you can try an import of a 
>> short period, lets say 30 min and use the link to download the JSON data in 
>> a web-browser. (The link is valid for a few minutes, due to the timestamp 
>> in the signature) and post it.
>>
>>
>>
>>
>> On Wednesday, July 8, 2020 at 9:10:36 PM UTC+2, Maarten van der Hoeven 
>> wrote:
>>>
>>> If I change the code to (#2, #0 and #3 are the values in your code), the 
>>> data is imported okay (except extratemp1). I guess it has something to do 
>>> with my ISS not having ID=1, but ID=2. An my external temp sensor running 
>>> on ID=3
>>>
>>> Find attached the resulting csv file
>>>
>>> baro_data = weather_data['sensors'][2]['data'] #2
>>> iss_data = weather_data['sensors'][1]['data'] #0
>>> indoor_data = weather_data['sensors'][3]['data'] #3
>>>
>>>
>>> Op dinsdag 7 juli 2020 om 21:33:57 UTC+2 schreef Bastiaan Meelberg:
>>>
>>>> Hi Maarten,
>>>>
>>>> If you want you can give the importer a try:
>>>>
>>>> https://github.com/grebleem/weewx_wl_import
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> On Tuesday, July 7, 2020 at 1:09:34 PM UTC+2, Maarten van der Hoeven 
>>>> wrote:
>>>>>
>>>>> Hi Bastiaan,
>>>>>
>>>>> something I can test?
>>>>>
>>>>> Op zondag 5 juli 2020 14:02:38 UTC+2 schreef flor...@pre-vost.fr:
>>>>>>
>>>>>> Sorry for that. 
>>>>>>
>>>>>> There was a  misunderstandings . Let's forget this conversation;)  
>>>>>>
>>>>>> -fp 
>>>>>>
>>>>>> Le samedi 4 juillet 2020 à 13:36:23 UTC+2, hoev...@gmail.com a 
>>>>>> écrit :
>>>>>>
>>>>>>> Yes, agree. I like the weather, I like programming, I like to 
>>>>>>> cooperate. It's my current lack of python-knowledge that I want to 
>>>>>>> contribute the best I can do right now, and that is testing both of 
>>>>>>> your 
>>>>>>> drivers. I dont see it as competition, and may the best win. Far from 
>>>>>>> that. 
>>>>>>> In the end, it's my small contribution to the community in testing two 
>>>>>>> drivers, and make them both better working. In hoping that the user 
>>>>>>> pick 
>>>>>>> the driver it feels most comfortably with, or not. 
>>>>>>>
>>>>>>> Op zaterdag 4 juli 2020 12:52:09 UTC+2 schreef Bastiaan Meelberg:
>>>>>>>
>>>>>>>> I just program what I need, because I like programming.
>>>>>>>>  
>>>>>>>> Use my program (you all-ready did I see in you're driver ;-), or 
>>>>>>>> don't use it. That is the good think of open source. 
>>>>>>>>
>>>>>>>> Your importer is doing the calculation e.g. Fahrenheit to Celsius I 
>>>>>>>> don't like that, weewx is way better in making the conversions. 
>>>>>>>> Also I just want to import a date range and not have to figure out 
>>>>>>>> my station_id. So I decided to make my own.
>>>>>>>>
>>>>>>>> But feel free to make a better driver/importer. 
>>>>>>>>
>>>>>>>>
>>>>>>>> On Saturday, July 4, 2020 at 12:38:54 PM UTC+2, Florentin Prevost 
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Like we work on the same functions for Wll driver. Why not to work 
>>>>>>>>> together to developp the driver ? Each one developp the same code and 
>>>>>>>>> it 
>>>>>>>>> would a shame to work 2 times for the same code ...
>>>>>>>>
>>>>>>>>

-- 
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/030685d7-1ad5-4fc6-af67-9812bf28a617o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-08 Thread Bastiaan Meelberg
Thanks for testing.

The 'problem' with api v2 is that it delivers a HUGE amount of data. With 
my setup it works perfect, I can import months at the time.

I think indeed of you different setup it is not working. Maybe a 
question/answer that the program is showing bit of the data and asks if it 
is the data the user wants to import.

I added a 'print url' to the latest build, if you can try an import of a 
short period, lets say 30 min and use the link to download the JSON data in 
a web-browser. (The link is valid for a few minutes, due to the timestamp 
in the signature) and post it.




On Wednesday, July 8, 2020 at 9:10:36 PM UTC+2, Maarten van der Hoeven 
wrote:
>
> If I change the code to (#2, #0 and #3 are the values in your code), the 
> data is imported okay (except extratemp1). I guess it has something to do 
> with my ISS not having ID=1, but ID=2. An my external temp sensor running 
> on ID=3
>
> Find attached the resulting csv file
>
> baro_data = weather_data['sensors'][2]['data'] #2
> iss_data = weather_data['sensors'][1]['data'] #0
> indoor_data = weather_data['sensors'][3]['data'] #3
>
>
> Op dinsdag 7 juli 2020 om 21:33:57 UTC+2 schreef Bastiaan Meelberg:
>
>> Hi Maarten,
>>
>> If you want you can give the importer a try:
>>
>> https://github.com/grebleem/weewx_wl_import
>>
>> Thanks.
>>
>>
>> On Tuesday, July 7, 2020 at 1:09:34 PM UTC+2, Maarten van der Hoeven 
>> wrote:
>>>
>>> Hi Bastiaan,
>>>
>>> something I can test?
>>>
>>> Op zondag 5 juli 2020 14:02:38 UTC+2 schreef flor...@pre-vost.fr:
>>>>
>>>> Sorry for that. 
>>>>
>>>> There was a  misunderstandings . Let's forget this conversation;)  
>>>>
>>>> -fp 
>>>>
>>>> Le samedi 4 juillet 2020 à 13:36:23 UTC+2, hoev...@gmail.com a écrit :
>>>>
>>>>> Yes, agree. I like the weather, I like programming, I like to 
>>>>> cooperate. It's my current lack of python-knowledge that I want to 
>>>>> contribute the best I can do right now, and that is testing both of your 
>>>>> drivers. I dont see it as competition, and may the best win. Far from 
>>>>> that. 
>>>>> In the end, it's my small contribution to the community in testing two 
>>>>> drivers, and make them both better working. In hoping that the user pick 
>>>>> the driver it feels most comfortably with, or not. 
>>>>>
>>>>> Op zaterdag 4 juli 2020 12:52:09 UTC+2 schreef Bastiaan Meelberg:
>>>>>
>>>>>> I just program what I need, because I like programming.
>>>>>>  
>>>>>> Use my program (you all-ready did I see in you're driver ;-), or 
>>>>>> don't use it. That is the good think of open source. 
>>>>>>
>>>>>> Your importer is doing the calculation e.g. Fahrenheit to Celsius I 
>>>>>> don't like that, weewx is way better in making the conversions. 
>>>>>> Also I just want to import a date range and not have to figure out my 
>>>>>> station_id. So I decided to make my own.
>>>>>>
>>>>>> But feel free to make a better driver/importer. 
>>>>>>
>>>>>>
>>>>>> On Saturday, July 4, 2020 at 12:38:54 PM UTC+2, Florentin Prevost 
>>>>>> wrote:
>>>>>>>
>>>>>>> Like we work on the same functions for Wll driver. Why not to work 
>>>>>>> together to developp the driver ? Each one developp the same code and 
>>>>>>> it 
>>>>>>> would a shame to work 2 times for the same code ...
>>>>>>
>>>>>>

-- 
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/6fc1db15-6034-4571-817d-307e46ee377ao%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-07 Thread Bastiaan Meelberg
Somehow the tmp/ dir is not created. I dropped the tmp for now. Can you try 
again?



On Tuesday, July 7, 2020 at 9:57:43 PM UTC+2, Maarten van der Hoeven wrote:
>
> Okay, have played with it.
>
> First I needed to create a tmp-directory. Without it, the csv-file cannot 
> be created.
> Started the importer to import one single day: 2020-01-01. It creates an 
> empty csv-file 
>
>
>

-- 
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/bac54855-1b2a-4e68-a75b-eccd96b63c3co%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-07 Thread Bastiaan Meelberg
Hi Maarten,

If you want you can give the importer a try:

https://github.com/grebleem/weewx_wl_import

Thanks.

On Tuesday, July 7, 2020 at 1:09:34 PM UTC+2, Maarten van der Hoeven wrote:
>
> Hi Bastiaan,
>
> something I can test?
>
> Op zondag 5 juli 2020 14:02:38 UTC+2 schreef flor...@pre-vost.fr:
>>
>> Sorry for that. 
>>
>> There was a  misunderstandings . Let's forget this conversation;)  
>>
>> -fp 
>>
>> Le samedi 4 juillet 2020 à 13:36:23 UTC+2, hoev...@gmail.com a écrit :
>>
>>> Yes, agree. I like the weather, I like programming, I like to cooperate. 
>>> It's my current lack of python-knowledge that I want to contribute the best 
>>> I can do right now, and that is testing both of your drivers. I dont see it 
>>> as competition, and may the best win. Far from that. In the end, it's my 
>>> small contribution to the community in testing two drivers, and make them 
>>> both better working. In hoping that the user pick the driver it feels most 
>>> comfortably with, or not. 
>>>
>>> Op zaterdag 4 juli 2020 12:52:09 UTC+2 schreef Bastiaan Meelberg:
>>>
>>>> I just program what I need, because I like programming.
>>>>  
>>>> Use my program (you all-ready did I see in you're driver ;-), or don't 
>>>> use it. That is the good think of open source. 
>>>>
>>>> Your importer is doing the calculation e.g. Fahrenheit to Celsius I 
>>>> don't like that, weewx is way better in making the conversions. 
>>>> Also I just want to import a date range and not have to figure out my 
>>>> station_id. So I decided to make my own.
>>>>
>>>> But feel free to make a better driver/importer. 
>>>>
>>>>
>>>> On Saturday, July 4, 2020 at 12:38:54 PM UTC+2, Florentin Prevost wrote:
>>>>>
>>>>> Like we work on the same functions for Wll driver. Why not to work 
>>>>> together to developp the driver ? Each one developp the same code and it 
>>>>> would a shame to work 2 times for the same code ...
>>>>
>>>>

-- 
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/aff52eb0-bb75-438d-b421-c9db552fb65ao%40googlegroups.com.


[weewx-development] Re: Reloading of weewx driver

2020-07-04 Thread Bastiaan Meelberg
Thanks a lot! I know what to do now.

On Saturday, July 4, 2020 at 11:41:38 PM UTC+2, gjr80 wrote:
>
> The line you highlighted is a consequence of the error rather than the 
> cause. When WeeWX reloads the driver WeeWX essentially does a soft restart, 
> it shuts everything down beforehand. 
>
> Here is you error: 
>
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: Caught OSError: 
> timed out 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   Traceback 
> (most recent call last): 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: File 
> "/home/weewx/bin/weewxd", line 154, in main 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:  
>  engine.run() 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: File 
> "/home/weewx/bin/weewx/engine.py", line 188, in run 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   for 
> packet in self.console.genLoopPackets(): 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: File 
> "/home/weewx/bin/user/weatherlinkliveudp.py", line 414, in genLoopPackets 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   data, 
> wherefrom = comsocket.recvfrom(2048) 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:  
>  socket.timeout: timed out 
> Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   Waiting 10 
> seconds then retrying... 
> Jul  4 18:43:00 celsius weewx[900] INFO __main__: retrying... 
>
> If you don’t want a driver reload you need to alter weatherlinkliveudp.py 
> to tolerate a socket.timeout error. This is a common requirement when you 
> have a driver (or for that matter a service) that relies on an external 
> system; your driver/service needs to be able to handle the case where the 
> external service does not respond. 
>
> Gary

-- 
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/21e9ca10-634e-4e33-9edd-b587a3a2e85eo%40googlegroups.com.


[weewx-development] Re: Reloading of weewx driver

2020-07-04 Thread Bastiaan Meelberg
Hi Gary,

That is very interesting! 

I looked at the log's and the reload happens when weewx.restx is doing a 
Shut down. I think my driver is creating the shut down due to a time out of 
the comsocket.

Jul  4 18:42:20 celsius weewx[900] INFO weewx.restx: MQTT: Published record 
2020-07-04 18:42:20 CEST (1593880940)
Jul  4 18:42:23 celsius weewx[900] INFO weewx.restx: MQTT: Published record 
2020-07-04 18:42:23 CEST (1593880943)
Jul  4 18:42:25 celsius weewx[900] INFO weewx.restx: MQTT: Published record 
2020-07-04 18:42:25 CEST (1593880945)
Jul  4 18:42:28 celsius weewx[900] DEBUG urllib3.connectionpool: Starting 
new HTTP connection (1): 192.168.1.47:80
Jul  4 18:42:28 celsius weewx[900] DEBUG urllib3.connectionpool: 
http://192.168.1.47:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul  4 18:42:28 celsius weewx[900] INFO weewx.restx: MQTT: Published record 
2020-07-04 18:42:28 CEST (1593880948)
Jul  4 18:42:28 celsius weewx[900] INFO weewx.restx: MQTT: Published record 
2020-07-04 18:42:28 CEST (1593880948)
Jul  4 18:42:30 celsius weewx[900] INFO weewx.restx: MQTT: Published record 
2020-07-04 18:42:30 CEST (1593880950)
Jul  4 18:42:50 celsius weewx[900] INFO weewx.engine: Main loop exiting. 
Shutting engine down.
Jul  4 18:42:50 celsius weewx[900] INFO weewx.engine: Shutting down 
StdReport thread
Jul  4 18:42:50 celsius weewx[900] DEBUG weewx.engine: StdReport thread has 
been terminated
Jul  4 18:42:50 celsius weewx[900] DEBUG weewx.restx: Shut down MQTT thread.
Jul  4 18:42:50 celsius weewx[900] DEBUG weewx.restx: Shut down WOW thread.
Jul  4 18:42:50 celsius weewx[900] DEBUG weewx.restx: Shut down PWSWeather 
thread.
Jul  4 18:42:50 celsius weewx[900] DEBUG weewx.restx: Shut down 
Wunderground-PWS thread.
Jul  4 18:42:50 celsius weewx[900] DEBUG weewx.restx: Shut down 
StationRegistry thread.
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: Caught OSError: timed 
out
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   Traceback 
(most recent call last):
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: File 
"/home/weewx/bin/weewxd", line 154, in main
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:  
 engine.run()
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: File 
"/home/weewx/bin/weewx/engine.py", line 188, in run
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   for 
packet in self.console.genLoopPackets():
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__: File 
"/home/weewx/bin/user/weatherlinkliveudp.py", line 414, in genLoopPackets
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   data, 
wherefrom = comsocket.recvfrom(2048)
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:  
 socket.timeout: timed out
Jul  4 18:42:50 celsius weewx[900] CRITICAL __main__:   Waiting 10 
seconds then retrying...
Jul  4 18:43:00 celsius weewx[900] INFO __main__: retrying...
Jul  4 18:43:00 celsius weewx[900] INFO __main__: Using configuration file 
/home/weewx/weewx.conf
Jul  4 18:43:00 celsius weewx[900] INFO __main__: Debug is 1
Jul  4 18:43:00 celsius weewx[900] DEBUG __main__: Initializing engine
Jul  4 18:43:00 celsius weewx[900] INFO weewx.engine: Loading station type 
WeatherLinkLiveUDP (user.weatherlinkliveudp)
Jul  4 18:43:00 celsius weewx[900] INFO user.weatherlinkliveudp: WLL UDP 
driver version is 0.2.6
Jul  4 18:43:00 celsius weewx[900] INFO user.weatherlinkliveudp: HTTP 
polling interval is 10.0
Jul  4 18:43:00 celsius weewx[900] DEBUG urllib3.connectionpool: Starting 
new HTTP connection (1): 192.168.1.47:80



On Saturday, July 4, 2020 at 10:44:02 PM UTC+2, gjr80 wrote:
>
> Hi,
>
> Ideally a driver should not be reloaded, though WeeWX will reload a driver 
> under certain error conditions. This (reload) should be logged and I would 
> expect some sort of error would also be logged. I would suggest posting a 
> log extract covering the period a few minutes before the reload through 
> until a few minutes after the reload.
>
> Gary
>
>

-- 
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/b6a63158-3c36-4446-a32a-5e5e5e16aaa4o%40googlegroups.com.


[weewx-development] Reloading of weewx driver

2020-07-04 Thread Bastiaan Meelberg
A question about the loading of drivers. I noticed that the weewx is 
reloading the driver every hour, is that correct? 
That is fine for the driver I am working on for the Weatherlink Live, but I 
could miss some rain because of this reload.

At this moment I store the daily_ran and current date from Davis at driver 
loading, then when the daily rain is increased I use the difference between 
the new and old value. Also with every Loop I check if the date is changed 
and I reset my daily rain and set the new rain value.

But if the driver is reset at midnight and it is raining, I would miss that 
rain. this situation is Very unlikely, but it could happen. Is there a way 
to prevent the driver of resetting during midnight (I think I know the 
answer ;-) .
Luckily the Davis also provides a 15 and 60 min last rainfall, so an extra 
check could be implemented is the reset was done properly.

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/8c3e6a0e-89b2-4b2a-8721-f58449a340e5o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-04 Thread Bastiaan Meelberg
I just program what I need, because I like programming.
 
Use my program (you all-ready did I see in you're driver ;-), or don't use 
it. That is the good think of open source. 

Your importer is doing the calculation e.g. Fahrenheit to Celsius I don't 
like that, weewx is way better in making the conversions. 
Also I just want to import a date range and not have to figure out my 
station_id. So I decided to make my own.

But feel free to make a better driver/importer. 


On Saturday, July 4, 2020 at 12:38:54 PM UTC+2, Florentin Prevost wrote:
>
> Like we work on the same functions for Wll driver. Why not to work 
> together to developp the driver ? Each one developp the same code and it 
> would a shame to work 2 times for the same code ...

-- 
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/d961df85-5d4d-421f-85cf-8634364b9e51o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-04 Thread Bastiaan Meelberg
What do you mean?


On Saturday, July 4, 2020 at 12:30:23 PM UTC+2, Florentin Prevost wrote:
>
> Why do you copy idea ?
> I'm glad to work together for the wll driver but it seems that you work to 
> same fonctions...

-- 
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/dd1aaf50-e4c1-4d9e-a62c-a15e3a2e8f32o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-02 Thread Bastiaan Meelberg
Sorry about that. I was surprised as well. I accidentally comment out the 
rain to get in the Loop, during debugging.

It should be good in the current master build:

https://github.com/grebleem/weewx-weatherlinkliveudp/archive/master.zip


I'm also working on a weatherlink import, at this moment the program will 
produce a .cvs and wee_import can import this file. Keep you posted!


On Thursday, July 2, 2020 at 2:50:13 PM UTC+2, Maarten van der Hoeven wrote:
>
> A question. Is 'rain' still work in progress? I notice a repeating 
> NULL-value (no worries, testing against a test-database within a virtual 
> machine. fully seperated from my 'production'-site)
>
> mysql> select datetime,from_unixtime(datetime),outtemp,extratemp1,rain,ET 
> from archive order by datetime desc limit 10;
>
> ++-+++--+---+
> | datetime   | from_unixtime(datetime) | outtemp| 
> extratemp1 | rain | ET|
>
> ++-+++--+---+
> | 1593693840 | 2020-07-02 14:44:00 | 20 |  
> 21.64814814814815 | NULL |  0.004293896657547285 |
> | 1593693780 | 2020-07-02 14:43:00 | 20 | 
> 21.832 | NULL |  0.004304368552713827 |
> | 1593693720 | 2020-07-02 14:42:00 | 20 | 
> 21.832 | NULL |  0.004311294113859122 |
> | 1593693660 | 2020-07-02 14:41:00 | 20 | 
> 21.832 | NULL |  0.004316451537816886 |
> | 1593693600 | 2020-07-02 14:40:00 | 20.0416664 | 
> 21.9305554 | NULL |  0.004321999760490444 |
> | 1593693540 | 2020-07-02 14:39:00 | 20.054 | 
> 22.074074074074073 | NULL |  0.004325689825000265 |
> | 1593693480 | 2020-07-02 14:38:00 | 20.082 | 
> 22.164 | NULL |  0.004326424995698886 |
> | 1593693300 | 2020-07-02 14:35:00 |  20.09259259259259 | 
> 22.275 | NULL | 0.0042999357683097044 |
> | 1593693240 | 2020-07-02 14:34:00 |  20.11 |   
> 22.2037037037037 | NULL |   0.00429406704665147 |
> | 1593693180 | 2020-07-02 14:33:00 |  20.12962962962963 |  
> 22.11 | NULL |  0.004320916570420523 |
>
> ++-+++--+---+
> 10 rows in set (0.01 sec)
>
>
> Op donderdag 2 juli 2020 om 13:44:43 UTC+2 schreef Maarten van der Hoeven:
>
>> Yes, that makes a difference! Also showing okay on the website!
>>
>> mysql> select 
>> datetime,from_unixtime(datetime),outtemp,extratemp1,extratemp2,extratemp3 
>> from archive order by datetime desc limit 10;
>>
>> ++-+++++
>>
>> | datetime   | from_unixtime(datetime) | outtemp| 
>> extratemp1 | extratemp2 | extratemp3 |
>>
>> ++-+++++
>> | 1593690180 | 2020-07-02 13:43:00 | 19.443 |  
>> 20.24074074074074 |   NULL |   NULL |
>> | 1593690120 | 2020-07-02 13:42:00 | 19.393 |  
>> 20.12962962962963 |   NULL |   NULL |
>> | 1593690060 | 2020-07-02 13:41:00 |  19.347222 | 
>> 19.918 |   NULL |   NULL |
>> | 159369 | 2020-07-02 13:40:00 | 19.332 | 
>> 19.832 |   NULL |   NULL |
>> | 1593689940 | 2020-07-02 13:39:00 | 19.332 | 
>> 19.740740740740737 |   NULL |   NULL |
>> | 1593689820 | 2020-07-02 13:37:00 | 19.332 
>> |   NULL |   NULL |   NULL |
>> | 1593689760 | 2020-07-02 13:36:00 | 19.332 
>> |   NULL |   NULL |   NULL |
>> | 1593689700 | 2020-07-02 13:35:00 | 19.332 
>> |   NULL |   NULL |   NULL |
>> | 1593676680 | 2020-07-02 09:58:00 |  16.72 
>> |   NULL |   NULL |   NULL |
>> | 1593676620 | 2020-07-02 09:57:00 |  16.72 
>> |   NULL |   NULL |   NULL |
>>
>> ++-+++++
>>
>> 10 rows in set (0.00 sec)
>>
>>
>>
>> Op donderdag 2 juli 2020 om 12:10:15 UTC+2 schreef Bastiaan Meelberg:
>>
>>> Very helpful! 
>>> Just found out that the extra_id from the .conf file is a

[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-02 Thread Bastiaan Meelberg
Very helpful! 
Just found out that the extra_id from the .conf file is a str type. 
Comparing this to an int will never match. 
Try this build please:
https://github.com/grebleem/weewx-weatherlinkliveudp/archive/Debug1.zip


On Thursday, July 2, 2020 at 9:57:25 AM UTC+2, Maarten van der Hoeven wrote:
>
> No data in whatever extratemp. I got the external sensor on channel id = 3 
> (hence extra_id=3), but I suspect the data comes into extratemp1. I d not 
> have any preference on that. Mysql-output, and three json files of current 
> conditions
>
>
>>

-- 
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/a63ab09e-38c8-40c7-ad2a-30412503325ao%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-01 Thread Bastiaan Meelberg
umidity: 45.2, 
> inTemp: 27.332, interval: 1.0, maxSolarRad: None, outHumidity: 
> 72.1, outTemp: 17.72, pressure: 1006.7393357345647, radiation: 
> 16.0, rainRate: 0.0, signal1: 0.0, txBatteryStatus: 0.0, usUnits: 17, UV: 
> 0.0, windchill: 17.72, windDir: 253.651796853672, windGust: 
> 3.57632, windGustDir: 260, windrun: 0.1028192, windSpeed: 1.71365333
> LOOP:   2020-07-01 21:36:17 CEST (1593632177) altimeter: 
> 1006.7959690570649, appTemp: 16.346030181760423, barometer: 
> 1007.1118384320345, beaufort: 2, cloudbase: 621.1850988795652, dateTime: 
> 1593632177, dewpoint: 12.612, heatindex: 17.72, 
> humidex: 20.314658361183554, inDewpoint: 14.445, inHumidity: 
> 45.2, inTemp: 27.332, maxSolarRad: None, outHumidity: 72.1, 
> outTemp: 17.72, pressure: 1006.7054718529766, radiation: 16, 
> rainRate: 0.0, signal1: 0, txBatteryStatus: 0, usUnits: 17, UV: 0.0, 
> windchill: 17.72, windDir: 265, windGust: 3.57632, windGustDir: 
> 260, windSpeed: 3.12928
> LOOP:   2020-07-01 21:36:19 CEST (1593632179) beaufort: 2, dateTime: 
> 1593632179, maxSolarRad: None, rainRate: 0.0, usUnits: 17, windDir: 257, 
> windGust: 3.57632, windGustDir: 252, windSpeed: 3.12928
>
>
>
> Op woensdag 1 juli 2020 09:41:55 UTC+2 schreef Bastiaan Meelberg:
>>
>> Good to hear!
>>
>> If you have time, can you check the latest development build: 
>> https://github.com/grebleem/weewx-weatherlinkliveudp/archive/development.zip
>>  
>> If you add this to the stanza
>> extra_id =3
>>
>> You should have the extra sensor data in weewx.
>>
>>
>> On Tuesday, June 30, 2020 at 10:08:26 PM UTC+2, Maarten van der Hoeven 
>> wrote:
>>>
>>> Yes, running nice! 
>>>
>>> I have an external temp sensor; willing to test also!
>>>
>>> Op dinsdag 30 juni 2020 19:11:01 UTC+2 schreef Bastiaan Meelberg:
>>>>
>>>> Made a lot of changes the last few days to make this driver more solid. 
>>>> For those who is interested please check out the latest development 
>>>> branch:
>>>>
>>>> https://github.com/grebleem/weewx-weatherlinkliveudp/tree/development
>>>>
>>>> Make shure the stanza in weewx.conf look something like this:
>>>> [WeatherLinkLiveUDP]
>>>> wll_ip = 192.168.1.47
>>>> poll_interval = 20# number of seconds (min. is 10 seconds)
>>>> driver = user.weatherlinkliveudp
>>>>
>>>> The next implementation will be extra temp sensor.
>>>>
>>>>

-- 
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/5299789e-b624-48ec-95cb-7740819d5dd6o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-07-01 Thread Bastiaan Meelberg
Good to hear!

If you have time, can you check the latest development build: 
https://github.com/grebleem/weewx-weatherlinkliveudp/archive/development.zip
 
If you add this to the stanza
extra_id =3

You should have the extra sensor data in weewx.


On Tuesday, June 30, 2020 at 10:08:26 PM UTC+2, Maarten van der Hoeven 
wrote:
>
> Yes, running nice! 
>
> I have an external temp sensor; willing to test also!
>
> Op dinsdag 30 juni 2020 19:11:01 UTC+2 schreef Bastiaan Meelberg:
>>
>> Made a lot of changes the last few days to make this driver more solid. 
>> For those who is interested please check out the latest development 
>> branch:
>>
>> https://github.com/grebleem/weewx-weatherlinkliveudp/tree/development
>>
>> Make shure the stanza in weewx.conf look something like this:
>> [WeatherLinkLiveUDP]
>> wll_ip = 192.168.1.47
>> poll_interval = 20# number of seconds (min. is 10 seconds)
>> driver = user.weatherlinkliveudp
>>
>> The next implementation will be extra temp sensor.
>>
>>

-- 
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/ebf88323-e47a-4a42-a3a1-987b960a0727o%40googlegroups.com.


[weewx-development] Re: Weatherlink Live driver developpment

2020-06-30 Thread Bastiaan Meelberg
Ik like the idea of getting missing data from Weatherlink to weewx. But 
isn't it better to make it a separate program (say like a 'reverse' 
wunderfixer)? 
This way the driver is the most clean, getting and filling de database with 
old data can be very time consuming and slow the current collection down.



On Sunday, June 21, 2020 at 7:18:41 PM UTC+2, Florentin Prevost wrote:
>
> Hi,
>
> I worked with the fork of 
> https://github.com/vinceskahan/weewx-weatherlinklive-json and I would 
> like to ask some questions about driver developpment. 
>
> - How can I passed argument of weewx.conf to my driver ? I work to request 
> lost data from Weewx on Weatherlink.com because WeatherLink Live don't have 
> API to take archive directly and I would like to passed some arguments like 
> archive_interval, sql password & etc 
> - How work genArchiveRecords when it call? It run as each report ? Or it 
> is a loop that waiting to have return values ?
>
>
> Thank you for your answer and support. 
>
>

-- 
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/08981aef-3112-466b-bc3b-1849a5ac0b98o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-06-30 Thread Bastiaan Meelberg
Made a lot of changes the last few days to make this driver more solid. 
For those who is interested please check out the latest development branch:

https://github.com/grebleem/weewx-weatherlinkliveudp/tree/development

Make shure the stanza in weewx.conf look something like this:
[WeatherLinkLiveUDP]
wll_ip = 192.168.1.47
poll_interval = 20# number of seconds (min. is 10 seconds)
driver = user.weatherlinkliveudp

The next implementation will be extra temp sensor.

-- 
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/42e6c053-33fa-4ceb-81eb-1d23c28efbe8o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-06-28 Thread Bastiaan Meelberg
You are right. It needs a better solution, but it works for now.

The problem with multiple sensors is that there is a second conditions in 
data with the data_structure_type. But some values are 'null' and some are 
'0' (e.g. rain_rate_last).
I will change it in the future that the user can set a tx_id for ISS, wind 
and so on.


On Sunday, June 28, 2020 at 12:00:39 PM UTC+2, flor...@pre-vost.fr wrote:
>
> Bastiaan,
>
> How can I find lsid without make a request to know in json format ?
>
> I don't know if the best practice is to check via lsid or 
> data_structure_type ?
>
> Thank's,
>
> Le dimanche 28 juin 2020 à 11:51:02 UTC+2, hoev...@gmail.com a écrit :
>
>> Driver updated, data is okay now!
>>
>> Also running MQTT and bechertown: I see windspeed reported as km/h, 
>> although I've set the unit to m/s in weewx.conf
>>
>> Yes, tx_id 3 is an extra temp sensor. I've got the ISS on ID=2, and the 
>> temp sensor on ID=3
>>
>> Op zondag 28 juni 2020 om 11:48:59 UTC+2 schreef Bastiaan Meelberg:
>>
>>> Very helpful Maarten! Thank you.
>>>
>>> The temp with tx_id 3 that is an 'extra' temp sensor?
>>>
>>>

-- 
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/26a2faee-5022-40d3-b739-6bcef553ff74o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-06-28 Thread Bastiaan Meelberg
The MQTT is sending the wind in kph:

{"dateTime": "1593338025.0", "windSpeed_kph": "4.828032", "winDir": "319.0", 
"windGust_kph": "25.749504", "windGustDir": "169.0", "rain_cm": "0.0", 
"rainRate_mm_per_hour": "0.0", "beaufort_count": "1.0", "maxSolarRad_Wpm2": 
"822.1835611108015", "hourRain_cm": "0.0", "rain24_cm": "0.06", "dayRain_mm"
: "0.0", "usUnits": "16.0"}


The Belchertown skin is not altering the MQTT message, so I made this 
change to the weewx.conf file to display the correct unit:

# Various options for customizing your reports.

[[Defaults]]
[[[Units]]]
Groups
group_speed = km_per_hour# Options are 'mile_per_hour', 
'km_per_hour', 'knot', or 'meter_per_second'

If you need another MQTT need to send it.



On Sunday, June 28, 2020 at 11:51:02 AM UTC+2, Maarten van der Hoeven wrote:
>
> Driver updated, data is okay now!
>
> Also running MQTT and bechertown: I see windspeed reported as km/h, 
> although I've set the unit to m/s in weewx.conf
>
> Yes, tx_id 3 is an extra temp sensor. I've got the ISS on ID=2, and the 
> temp sensor on ID=3
>
> Op zondag 28 juni 2020 om 11:48:59 UTC+2 schreef Bastiaan Meelberg:
>
>> Very helpful Maarten! Thank you.
>>
>> The temp with tx_id 3 that is an 'extra' temp sensor?
>>
>>

-- 
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/8347a821-0921-44ca-8596-75d4e970b2e5o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-06-28 Thread Bastiaan Meelberg
Very helpful Maarten! Thank you.

The temp with tx_id 3 that is an 'extra' temp sensor?

-- 
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/9329d3e9-fdaf-4c4e-83bb-43cd27f96012o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-06-28 Thread Bastiaan Meelberg
Yes! That would be great to get one solid WLL driver.

Cheers,
Bastiaan

On Sunday, June 28, 2020 at 11:41:35 AM UTC+2, flor...@pre-vost.fr wrote:
>
> Hi !
> Nice to have a driver for udp request !
>
> I'm very glad to work with you to develop the driver to have in futur a 
> single driver :) 
>
> Le dimanche 28 juin 2020 à 11:28:58 UTC+2, Bastiaan Meelberg a écrit :
>
>> The last few weeks I have been working on a weewx driver for Davis 
>> Weather Link Live. This device can give regular intervals of full ISS data 
>> and a 2.5 seconds interval of UDP data containing wind and rain. See this 
>> site for more information 
>> https://weatherlink.github.io/weatherlink-live-local-api/
>>
>> At this moment there is a working beta version: 
>> https://github.com/grebleem/WeatherLinkliveUDP for who is interested. 
>> The driver can be seen in action here https://meteo-otterlo.nl 
>>
>> However, the JSON data can be a bit odd when using multiple stations. 
>> That is if a second ISS for an anemometer or a separate temperature sensor 
>> is installed. 
>>
>> So if you have a Davis Weather Link Live (WLL), it would helpful if you 
>> post the JSON response from a http://1.2.3.4:80/v1/current_conditions 
>> request in a web browser (where 1.2.3.4 is the ip address of the WLL). So I 
>> can implement multiple sensors in this driver. 
>>
>> Also at the davis-udp.py program will write the UDP JSON to a file, these 
>> also would be very helpful!
>>
>> Thanks,
>> 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/37950807-7193-4938-897c-beea7cf7e825o%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-06-28 Thread Bastiaan Meelberg
Maarten,

The driver is updated. Try again please.

On Sunday, June 28, 2020 at 11:37:58 AM UTC+2, Maarten van der Hoeven wrote:
>
> Running the beta, it throws an error instantly:
>
>

-- 
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/d27c7641-b4cb-4097-a48e-72101587d09ao%40googlegroups.com.


[weewx-development] Re: Davis Weather Link Live driver with UDP

2020-06-28 Thread Bastiaan Meelberg
I see I still use the lsid of mine station in some part of the driver, will 
update is in a few minutes.


On Sunday, June 28, 2020 at 11:37:58 AM UTC+2, Maarten van der Hoeven wrote:
>
> Running the beta, it throws an error instantly:
>
>

-- 
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/207ef048-24a8-404a-89e1-ea654b98a812o%40googlegroups.com.


[weewx-development] Davis Weather Link Live driver with UDP

2020-06-28 Thread Bastiaan Meelberg
The last few weeks I have been working on a weewx driver for Davis Weather 
Link Live. This device can give regular intervals of full ISS data and a 
2.5 seconds interval of UDP data containing wind and rain. See this site 
for more information 
https://weatherlink.github.io/weatherlink-live-local-api/

At this moment there is a working beta version: 
https://github.com/grebleem/WeatherLinkliveUDP for who is interested. The 
driver can be seen in action here https://meteo-otterlo.nl 

However, the JSON data can be a bit odd when using multiple stations. That 
is if a second ISS for an anemometer or a separate temperature sensor is 
installed. 

So if you have a Davis Weather Link Live (WLL), it would helpful if you 
post the JSON response from a http://1.2.3.4:80/v1/current_conditions 
request in a web browser (where 1.2.3.4 is the ip address of the WLL). So I 
can implement multiple sensors in this driver. 

Also at the davis-udp.py program will write the UDP JSON to a file, these 
also would be very helpful!

Thanks,
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/18937d15-d8ee-4699-943b-ede791eda6c7o%40googlegroups.com.
from socket import *
import struct
import time
import requests
import json

# WLL ip address
URL = 'http://192.168.1.47:80/v1/real_time?duration=20'


def main():
global URL
UDP_PORT = 2
comsocket = socket(AF_INET, SOCK_DGRAM)
comsocket.bind(('', 2))
comsocket.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
resp = requests.get(URL)
i = 0
BigJson = {}

while 1:
while i < 6:
## print("HTTP Response Code:", resp)
data, wherefrom = comsocket.recvfrom(2048)
json_data = json.loads(data.decode("utf-8"))
if json_data["conditions"] == None:
print(json_data["error"])
else:
BigJson[i] = json_data
## print(json.dumps(json_data))
i = i + 1
print(f'test{round(time.time())}.json is created.')
with open(f'test{round(time.time())}.json', 'w') as outfile:
json.dump(BigJson, outfile)
i = 0
comsocket.close()


if __name__ == "__main__":
main()


[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.


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
 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 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/570a5f72-e95c-4d80-8e16-deb50a044b14o%40googlegroups.com.


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.


Re: [weewx-development] Database data in driver

2020-06-26 Thread Bastiaan Meelberg
Thanks for you answer! Sometimes the solutions is so simple.

On Saturday, June 27, 2020 at 3:56:42 AM UTC+2, Tom Keffer wrote:
>
> This is explained in the guidelines for writing a new driver 
> <http://www.weewx.com/docs/customizing.htm#Implement_the_driver> in the 
> Customizing Guide. In particular, the paragraph:
>
> A couple of observation types are tricky. In particular, rain. Generally, 
>> WeeWX expects to see a packet with the amount of rain that fell in that 
>> packet period included as observation rain. It then sums up all the 
>> values to get the total rainfall and emits that in the archive record. If 
>> your hardware does not provide this value, you might have to infer it from 
>> changes in whatever value it provides, for example changes in the daily or 
>> monthly rainfall. 
>
>
> This means you save the first value for daily rain you see, and compare it 
> to the next value. The field 'rain' is the difference.
>
> -tk
>
> On Fri, Jun 26, 2020 at 4:17 PM Bastiaan Meelberg  > wrote:
>
>> Hi,
>>
>> I'm working on a Weatherlink Live driver, WLL is giving a daily rain. The 
>> driver looks for a difference and adds the difference to the loop and sets 
>> the old value. 
>> Starting weewxd this counter is set to zero. But if there was rainfall 
>> all this rain is added again to the loop.
>>
>> So e.g. if there was 2 mm of rain fell during the day, and after a 
>> restart, the driver adds this 2 mm to the loop (again), and is seen as new 
>> rain.
>>
>> Is there a way to get this daily rain data from the database and set it 
>> in python as the starting variable?
>>
>> -- 
>> 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-de...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-development/b2d94112-1e1b-4061-bb66-5ab08ce3d444o%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/weewx-development/b2d94112-1e1b-4061-bb66-5ab08ce3d444o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/fd6d66d0-4582-487f-ab7c-3c0090704ba4o%40googlegroups.com.


[weewx-development] Database data in driver

2020-06-26 Thread Bastiaan Meelberg
Hi,

I'm working on a Weatherlink Live driver, WLL is giving a daily rain. The 
driver looks for a difference and adds the difference to the loop and sets 
the old value. 
Starting weewxd this counter is set to zero. But if there was rainfall all 
this rain is added again to the loop.

So e.g. if there was 2 mm of rain fell during the day, and after a restart, 
the driver adds this 2 mm to the loop (again), and is seen as new rain.

Is there a way to get this daily rain data from the database and set it in 
python as the starting variable?

-- 
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/b2d94112-1e1b-4061-bb66-5ab08ce3d444o%40googlegroups.com.


Re: [weewx-development] Weatherlink Live driver developpment

2020-06-26 Thread Bastiaan Meelberg
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/3b397228-95e6-4075-9dc6-1088d8932b83o%40googlegroups.com.