Python Plugin: PWS (Personal Weather Station)
Moderator: leecollings
Python Plugin: PWS (Personal Weather Station)
I have written a Python plugin, to capture data directly from my weather station. So no need to upload the data first to WeatherUnderground, Ecowitt, WeatherCloud, WOW, etc.
The README describes the use of WS View to connect your weather station to your router and upload data to Domoticz.
https://github.com/Xorfor/Domoticz-PWS-Plugin
In general, if the station is supplied with 'EasyWeather' software, it is likely that the station will work with this Domoticz plugin!
Please tell me your experience, which weather station you are using, which tool (WS Tool, WS View) you used, etc.
The README describes the use of WS View to connect your weather station to your router and upload data to Domoticz.
https://github.com/Xorfor/Domoticz-PWS-Plugin
In general, if the station is supplied with 'EasyWeather' software, it is likely that the station will work with this Domoticz plugin!
Please tell me your experience, which weather station you are using, which tool (WS Tool, WS View) you used, etc.
Last edited by Xorfor on Monday 16 September 2019 23:39, edited 4 times in total.
Re: Python Plugin: Personal Weather Station (PWS)
Final version is available, with some extra devices.
Re: Python Plugin: Personal Weather Station (PWS)
Added some improvements for the Rain sensor.
Re: Python Plugin: Personal Weather Station (PWS)
Added extra device for wind direction.
Extra documentation to link your PWS to Domoticz.
Extra documentation to link your PWS to Domoticz.
Re: Python Plugin: PWS (Personal Weather Station)
Some code cleanup (Black formatting) and more documentation https://github.com/Xorfor/Domoticz-PWS- ... /README.md
Re: Python Plugin: PWS (Personal Weather Station)
I removed the extra checks on WeatherUnground and Ecowitt protocols. And added extra documentation about EasyWeatherV1.4.5 which is available now for weatherstations.
Re: Python Plugin: PWS (Personal Weather Station)
New version available and also tested on the latest EasyWeather version.
Fixed: Sometimes the total precipitation from a day was added to the next day, because of different times settings on the PWS and Domoticz server.
Fixed: Sometimes the total precipitation from a day was added to the next day, because of different times settings on the PWS and Domoticz server.
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
I'm using a Alecto WS-5500 weather station and WSView software to setup the device and its work very well, today i updated to the latest release because i encountered the rain gauge issue. A few minutes ago at 00:00h the rain value of the previous day is still copied to the next day I will see tomorrow if the problem still exists.
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
Re: Python Plugin: PWS (Personal Weather Station)
I have seen the same problem. Also with my latest fix. It is difficult to debug this. Now I am not sure if it is a bug in my plugin or in Domoticz.
-
- Posts: 67
- Joined: Sunday 16 February 2014 17:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: NL
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
Using Alecto WS-5500 software version 1.4.4 working great, selected for now Ecowitt protocol.
Thanks Xorfor all the work.
Do you know what the difference is between Ecowitt and Weather Underground protocol only the "Dew point"?
Thanks Xorfor all the work.
Do you know what the difference is between Ecowitt and Weather Underground protocol only the "Dew point"?
Re: Python Plugin: PWS (Personal Weather Station)
Also WindChill is not reported in the Ecowitt protocolDo you know what the difference is between Ecowitt and Weather Underground protocol only the "Dew point"?
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
The issue still exists. 1 minute after midnight the total rainfall of the previous day is visibleandreo wrote:I'm using a Alecto WS-5500 weather station and WSView software to setup the device and its work very well, today i updated to the latest release because i encountered the rain gauge issue. A few minutes ago at 00:00h the rain value of the previous day is still copied to the next day I will see tomorrow if the problem still exists.
Verstuurd vanaf mijn MHA-L29 met Tapatalk
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
Re: Python Plugin: PWS (Personal Weather Station)
I didn't have this problem this time. In my log I saw that the correct data was send and the sensor showed this data.
I am running an other test, and it seems that updating the Rain sensor does not work as expected! At this moment I have a plugin with a rain sensor and I send 1.5 as total precipitation, but the sensor still displays 0.0!!! I will do some more investigation...
I am running an other test, and it seems that updating the Rain sensor does not work as expected! At this moment I have a plugin with a rain sensor and I send 1.5 as total precipitation, but the sensor still displays 0.0!!! I will do some more investigation...
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
Maybe this can help you, on 23:59 hour the last update is written to the graph, on 00:00 hour the value of the day total resets to 0mm. After 1 minute the total previous day total becomes negative and will be displayed as a positive value in the day graph. (Donderdag) see database.
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
After viewing the log there is 1 hour difference in time visible, is this possibly causing the double count?Xorfor wrote: ↑Tuesday 22 October 2019 21:29 I didn't have this problem this time. In my log I saw that the correct data was send and the sensor showed this data.
I am running an other test, and it seems that updating the Rain sensor does not work as expected! At this moment I have a plugin with a rain sensor and I send 1.5 as total precipitation, but the sensor still displays 0.0!!! I will do some more investigation...
2019-11-04 22:38:00.598 (WS5500) utcdate: 2019-11-04 21:37:58
2019-11-04 22:38:00.599 (WS5500) datetime.strptime(utcdate, '%Y-%m-%d %H:%M:%S'): 2019-11-04 21:37:58
2019-11-04 22:38:00.600 (WS5500) Protocol: Wunderground
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
Re: Python Plugin: PWS (Personal Weather Station)
No that is not the problem, just a debug line added by me. Later on in the code, this utc time is converted to the local (time on the Domoticz) time, to be sure that the PWS is sending data for the correct date.andreo wrote: ↑Monday 04 November 2019 22:45 After viewing the log there is 1 hour difference in time visible, is this possibly causing the double count?
2019-11-04 22:38:00.598 (WS5500) utcdate: 2019-11-04 21:37:58
2019-11-04 22:38:00.599 (WS5500) datetime.strptime(utcdate, '%Y-%m-%d %H:%M:%S'): 2019-11-04 21:37:58
2019-11-04 22:38:00.600 (WS5500) Protocol: Wunderground
Meanwhile, I have found 2 problems in Domoticz with this rain counter. These problems are NOT related to python plugins, but can also be seen in other hardware like Buienradar!!!
1. You will see that almost every day, the first hour has no data (also no 0 mm). As you can see in your table of data, that Domoticz (so not the plugin) stores the data every 5 minutes (sometimes 1 second later). At the beginning of a new day Domoticz resets its own internal counter to 0. If the PWS sends in the first hour its total precipitation, this value is stored at dd-mm-yyyy 01:00:00, not at dd-mm-yyyy 00:59:59. The graph should not show 00:00, or store the total rain fall at hh:59:59.
2. Sometimes the 00:00 shows the value 0, but then you will see a negative value at 01:00. For the day total this is used as positive value for the new day. See image as an example. I can not fix this. Hopefully the Domoticz programmers can do some more investigation.
Re: Python Plugin: PWS (Personal Weather Station)
I think I found a workaround for the problem in the Domoticz Rain device. I also addded a new Rain rate device.
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
tested the latest version for two days and now displays the correct amount of rain.
Verstuurd vanaf mijn MHA-L29 met Tapatalk
Verstuurd vanaf mijn MHA-L29 met Tapatalk
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
-
- Posts: 2
- Joined: Monday 09 December 2019 15:58
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
The script worked for the evening, but the next day this error appeared:
2019-12-09 16:00:33.739 Error: (Weathi) 'onMessage' failed 'TypeError':'attribute of type 'NoneType' is not callable'.
2019-12-09 16:00:33.739 Error: (Weathi) ----> Line 380 in '/home/pi/domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage
2019-12-09 16:00:33.739 Error: (Weathi) ----> Line 161 in '/home/pi/domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage
What is going wrong here? Thanks
2019-12-09 16:00:33.739 Error: (Weathi) 'onMessage' failed 'TypeError':'attribute of type 'NoneType' is not callable'.
2019-12-09 16:00:33.739 Error: (Weathi) ----> Line 380 in '/home/pi/domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage
2019-12-09 16:00:33.739 Error: (Weathi) ----> Line 161 in '/home/pi/domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage
What is going wrong here? Thanks
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Python Plugin: PWS (Personal Weather Station)
try once to completely reset domoticz, i have had this if you only restart the service.
Verstuurd vanaf mijn MHA-L29 met Tapatalk
Verstuurd vanaf mijn MHA-L29 met Tapatalk
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
Who is online
Users browsing this forum: Droll and 1 guest