Page 3 of 4

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Sunday 27 September 2020 11:47
by Aroby
Thanks Xorfor, somehow I didn't found https://github.com/Xorfor/Domoticz-PWS-Plugin/issues/8.
Awesome! The Garni 2055 Arcus is sending it's data to Domoticz now with the iptables rule in between.

Very nice plugin!

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Thursday 15 October 2020 13:01
by atlantica
Hi all,

I've a question about installing this nice PWS plugin for my Ventus W830 ver 1.1.4. I've made a DNS record for wow.metoffice.gov.uk pointed to my domoticz server. (I cannont use Wunderground becase this is in use). The data is actualy into domoticz according to the log:

2020-10-15 12:49:02.304 (Ventus W830) Processing 'onConnectCallback' message
2020-10-15 12:49:02.304 (Ventus W830) Calling message handler 'onConnect'.
2020-10-15 12:49:02.304 (Ventus W830) onConnect IP_PWS:18840=IP_PWS:18840 0-Success
2020-10-15 12:49:02.304 (Ventus W830) Name: 'IP_PWS:18840', Transport: 'TCP/IP', Protocol: 'HTTP', Address: 'IP_PWS', Port: '18840', Baud: 0, Bytes: 325, Connected: True, Last Seen: 2020-10-15 12:49:02, Parent: 'Server'
2020-10-15 12:49:02.304 (Ventus W830) Processing 'ReadEvent' message
2020-10-15 12:49:02.304 (Ventus W830) Received 325 bytes of data
2020-10-15 12:49:02.305 (Ventus W830) 47 45 54 20 68 74 74 70 3a 2f 2f 77 6f 77 2e 6d 65 74 6f 66 GET.http://wow.metof
2020-10-15 12:49:02.305 (Ventus W830) 66 69 63 65 2e 67 6f 76 2e 75 6b 2f 61 75 74 6f 6d 61 74 69 fice.gov.uk/automati
2020-10-15 12:49:02.305 (Ventus W830) 63 72 65 61 64 69 6e 67 3f 73 69 74 65 69 64 3d 63 26 73 69 creading?siteid=c&si
2020-10-15 12:49:02.305 (Ventus W830) 74 65 41 75 74 68 65 6e 74 69 63 61 74 69 6f 6e 4b 65 79 3d teAuthenticationKey=
2020-10-15 12:49:02.305 (Ventus W830) 64 26 64 61 74 65 75 74 63 3d 32 30 32 30 2d 31 30 2d 31 35 d&dateutc=2020-10-15
2020-10-15 12:49:02.305 (Ventus W830) 25 32 30 31 30 3a 34 39 3a 30 26 77 69 6e 64 64 69 72 3d 33 %2010:49:0&winddir=3
2020-10-15 12:49:02.305 (Ventus W830) 31 30 26 77 69 6e 64 73 70 65 65 64 6d 70 68 3d 30 2e 30 26 10&windspeedmph=0.0&
2020-10-15 12:49:02.305 (Ventus W830) 77 69 6e 64 67 75 73 74 6d 70 68 3d 30 2e 30 26 68 75 6d 69 windgustmph=0.0&humi
2020-10-15 12:49:02.305 (Ventus W830) 64 69 74 79 3d 37 35 26 64 65 77 70 74 66 3d 34 35 2e 35 26 dity=75&dewptf=45.5&
2020-10-15 12:49:02.305 (Ventus W830) 74 65 6d 70 66 3d 35 33 2e 32 26 64 61 69 6c 79 72 61 69 6e tempf=53.2&dailyrain
2020-10-15 12:49:02.305 (Ventus W830) 69 6e 3d 30 2e 30 30 26 62 61 72 6f 6d 69 6e 3d 33 30 2e 31 in=0.00&baromin=30.1
2020-10-15 12:49:02.305 (Ventus W830) 38 26 73 6f 66 74 77 61 72 65 74 79 70 65 3d 45 61 73 79 57 8&softwaretype=EasyW
2020-10-15 12:49:02.305 (Ventus W830) 65 61 74 68 65 72 56 31 2e 31 2e 34 20 48 54 54 50 2f 31 2e eatherV1.1.4.HTTP/1.
2020-10-15 12:49:02.305 (Ventus W830) 30 0d 0a 41 63 63 65 70 74 3a 20 2a 2f 2a 0d 0a 48 6f 73 74 0..Accept:.*/*..Host
2020-10-15 12:49:02.305 (Ventus W830) 3a 20 77 6f 77 2e 6d 65 74 6f 66 66 69 63 65 2e 67 6f 76 2e :.wow.metoffice.gov.
2020-10-15 12:49:02.305 (Ventus W830) 75 6b 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 43 6c 6f 73 uk..Connection:.Clos
2020-10-15 12:49:02.306 (Ventus W830) 65 0d 0a 0d 0a .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. e....
2020-10-15 12:49:02.306 (Ventus W830) Pushing 'onMessageCallback' on to queue
2020-10-15 12:49:02.306 (Ventus W830) Processing 'onMessageCallback' message
2020-10-15 12:49:02.306 (Ventus W830) Calling message handler 'onMessage'.
2020-10-15 12:49:02.306 (Ventus W830) onMessage IP_PWS:18840=IP:18840
2020-10-15 12:49:02.306 (Ventus W830) HTTP Details (3):
2020-10-15 12:49:02.306 (Ventus W830) 'Verb: 'GET'
2020-10-15 12:49:02.306 (Ventus W830) 'URL: 'http://wow.metoffice.gov.uk/automaticre ... therV1.1.4'
2020-10-15 12:49:02.306 (Ventus W830) 'Headers' (3):
2020-10-15 12:49:02.306 (Ventus W830) 'Accept': '*/*'
2020-10-15 12:49:02.306 (Ventus W830) 'Host': 'wow.metoffice.gov.uk'
2020-10-15 12:49:02.306 (Ventus W830) 'Connection': 'Close'
2020-10-15 12:49:02.306 (Ventus W830) Request GET
2020-10-15 12:49:02.307 (Ventus W830) strData: siteid=c&siteAuthenticationKey=d&dateutc=2020-10-15%2010:49:0&winddir=310&windspeedmph=0.0&windgustmph=0.0&humidity=75&dewptf=45.5&tempf=53.2&dailyrainin=0.00&baromin=30.18&softwaretype=EasyWeatherV1.1.4
2020-10-15 12:49:02.307 (Ventus W830) data: {'siteid': 'X', 'siteAuthenticationKey': 'X', 'dateutc': '2020-10-15%2010:49:0', 'winddir': '310', 'windspeedmph': '0.0', 'windgustmph': '0.0', 'humidity': '75', 'dewptf': '45.5', 'tempf': '53.2', 'dailyrainin': '0.00', 'baromin': '30.18', 'softwaretype': 'EasyWeatherV1.1.4'}
2020-10-15 12:49:02.307 Error: (Ventus W830) 'onMessage' failed 'TypeError':'unsupported operand type(s) for *: 'int' and 'NoneType''.
2020-10-15 12:49:02.307 Error: (Ventus W830) ----> Line 402 in '../domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage
2020-10-15 12:49:02.307 Error: (Ventus W830) ----> Line 173 in '../domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessageroot
2020-10-15 12:49:04.712 (Ventus W830) Queued asynchronous read aborted (IP_PWS:18840), [2] End of file.
2020-10-15 12:49:04.712 (Ventus W830) Pushing 'DisconnectedEvent' on to queue
2020-10-15 12:49:04.714 (Ventus W830) Processing 'DisconnectedEvent' message


The following Errors occours:
2020-10-15 12:49:02.307 Error: (Ventus W830) 'onMessage' failed 'TypeError':'unsupported operand type(s) for *: 'int' and 'NoneType''.
2020-10-15 12:49:02.307 Error: (Ventus W830) ----> Line 402 in '../domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage
2020-10-15 12:49:02.307 Error: (Ventus W830) ----> Line 173 in '../domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessageroot

Can this error in de plugin.py be corected in the next version?

Kind regards

David

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Thursday 15 October 2020 18:45
by Xorfor
@atlantica: should be fixed in the current version

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Thursday 15 October 2020 20:52
by atlantica
@Xorfor Thanks for the quick response and fix!

It's working now only that there are still errors in the log:

2020-10-15 20:50:22.161 Error: (Ventus W830) 'onMessage' failed 'TypeError':'unsupported operand type(s) for *: 'NoneType' and 'int''.
2020-10-15 20:50:22.161 Error: (Ventus W830) ----> Line 406 in '/domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage
2020-10-15 20:50:22.161 Error: (Ventus W830) ----> Line 353 in '/domoticz/plugins/Domoticz-PWS-Plugin/plugin.py', function onMessage

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Thursday 15 October 2020 22:19
by Xorfor
@atlantic: I made a quick fix. Hopefully this prevents the errors in your log.

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 16 October 2020 7:38
by atlantica
Xorfor wrote: Thursday 15 October 2020 22:19 @atlantic: I made a quick fix. Hopefully this prevents the errors in your log.
Thank Xorfor!!!

The data is importing now; only 3 records are still empty:

Image

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 16 October 2020 7:39
by atlantica
For all Ventus W830 user with version 1.1.4 (First version) is working when youy add the following DNS record in your Router/DNS server:
  • wow.metoffice.gov.uk pointed to my domoticz server.
and add the following nat route to your dmoticz server:
  • Linux (Raspberry PI, etc)
    iptables -t nat -A PREROUTING -s [IP of PWS] -p tcp --dport 80 -j DNAT --to-destination [IP of Domoticz]:5000
    Windows
    netsh interface portproxy add v4tov4 connectaddress=[IP of PWS] connectport=80 listenaddress=[IP of Domoticz] listenport=5000 NOT TESTED YET!!!

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 16 October 2020 8:58
by eddieb
Xorfor wrote: Thursday 15 October 2020 22:19
Hi, is it possible to modify this plugin to work with ObserverIP software ?
That units run a web service which can be read locally. I can produce screendumps if neccesary.
I run a dzevents custom made script that does the job, but it might be usefull to add this to this plugin.

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 16 October 2020 18:25
by Xorfor
atlantica wrote: Friday 16 October 2020 7:38
The data is importing now; only 3 records are still empty:
That is correct that these sensors are still empty: according to your log, your pws is not sending this data!!! :)

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 16 October 2020 18:28
by Xorfor
eddieb wrote: Friday 16 October 2020 8:58 Hi, is it possible to modify this plugin to work with ObserverIP software ?
That units run a web service which can be read locally. I can produce screendumps if neccesary.
I run a dzevents custom made script that does the job, but it might be usefull to add this to this plugin.
Can you send me more information? Something like the json(?) message from your PWS. your dzevents script, etc!
If it is possible to fit this in the plugin, do you want to test this?

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 16 October 2020 18:39
by eddieb
Xorfor wrote: Friday 16 October 2020 18:28 Can you send me more information? Something like the json(?) message from your PWS. your dzevents script, etc!
If it is possible to fit this in the plugin, do you want to test this?
Of course I will, but, I will probably do that tomorrow. Testing is no problem either.
The ObserverIP unit is NOT producing json. It produces a web page which can be read with a http get ...
like this, (I can supply a html dump of the page ...)
Screenshot 2020-10-16 at 18.37.26.png
Screenshot 2020-10-16 at 18.37.26.png (257.19 KiB) Viewed 2275 times

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 16 October 2020 19:01
by Xorfor
eddieb wrote: Friday 16 October 2020 18:39 Of course I will, but, I will probably do that tomorrow. Testing is no problem either.
The ObserverIP unit is NOT producing json. It produces a web page which can be read with a http get ...
like this, (I can supply a html dump of the page ...)
Please send me the information by pm.
And yes, a html dump, url, etc will help.

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Saturday 17 October 2020 7:32
by atlantica
Xorfor wrote: Friday 16 October 2020 18:25
atlantica wrote: Friday 16 October 2020 7:38
The data is importing now; only 3 records are still empty:
That is correct that these sensors are still empty: according to your log, your pws is not sending this data!!! :)
Thanks for that understandig. In that case i have to use the wundergroud..... And I can confirm that is working then

Is it possible make an option to forward the incoming request from the weatherstation to the url from wundergorund in your pluging? All the correct data for wunderround is already in there....

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Sunday 10 April 2022 21:32
by Melissen
Hi

If I will use this plugin, will Domoticz update my devices every 60 seconds?
I understand Wunderground will only update every 10 minutes or longer, as there is a limit for downloads (500) a day.

My old weatherstation (433mhz) updated every 16 seconds the devices in Domoticz.

Hope someone can explain this to me. As I will use the windsensor for screens, so when the windspeed increases I can't wait for 10 minutes to have 'actual' readings

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Monday 11 April 2022 9:55
by eddieb
Melissen wrote: Sunday 10 April 2022 21:32 Hi

If I will use this plugin, will Domoticz update my devices every 60 seconds?
I understand Wunderground will only update every 10 minutes or longer, as there is a limit for downloads (500) a day.

My old weatherstation (433mhz) updated every 16 seconds the devices in Domoticz.

Hope someone can explain this to me. As I will use the windsensor for screens, so when the windspeed increases I can't wait for 10 minutes to have 'actual' readings
I stopped using this plugin and went to wudirect ...
Because sensors are only updated by this plugin when they change it is a little bit difficult to see but in my setup sensors are updated a lot faster. I see wind every 30 seconds...

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Thursday 14 April 2022 19:52
by Xorfor
Melissen wrote: Sunday 10 April 2022 21:32 Hi

If I will use this plugin, will Domoticz update my devices every 60 seconds?
I understand Wunderground will only update every 10 minutes or longer, as there is a limit for downloads (500) a day.

My old weatherstation (433mhz) updated every 16 seconds the devices in Domoticz.

Hope someone can explain this to me. As I will use the windsensor for screens, so when the windspeed increases I can't wait for 10 minutes to have 'actual' readings
The update interval is specified by the setting in WS View. There is a parameter 'Upload Interval' with a default of 60 seconds. If you want, you can change this value.
The data is pushed to the plugin, so by default each 60 sec. the data will be changed in Domoticz.
If you want to have the data updated every 10 seconds, please change the parameter in WS View in 10!

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 26 August 2022 18:12
by bas1502
Hi,

I am new here and have a look around.
I am trying to let te plugin work, but I can't find the type PWS (see screenshot)? Do someone else have the same problem?

Thanks for helping me!

Bas
PWS.png
PWS.png (6.77 KiB) Viewed 1560 times

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Friday 26 August 2022 21:32
by waltervl
bas1502 wrote: Friday 26 August 2022 18:12 Hi,

I am new here and have a look around.
I am trying to let te plugin work, but I can't find the type PWS (see screenshot)? Do someone else have the same problem?

Thanks for helping me
Check if python and more important if all necessary module are installed for using python plugins. See wiki page https://www.domoticz.com/wiki/Using_Python_plugins

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Saturday 27 August 2022 21:06
by bas1502
waltervl wrote: Friday 26 August 2022 21:32
bas1502 wrote: Friday 26 August 2022 18:12 Hi,

I am new here and have a look around.
I am trying to let te plugin work, but I can't find the type PWS (see screenshot)? Do someone else have the same problem?

Thanks for helping me
Check if python and more important if all necessary module are installed for using python plugins. See wiki page https://www.domoticz.com/wiki/Using_Python_plugins
Thanks for your quick reaction. I will check and read the wiki!

Re: Python Plugin: PWS (Personal Weather Station)

Posted: Tuesday 30 August 2022 13:35
by bas1502
Thanks it works, now I can find 'PWS'.

After I added new hardware (PWS), my Domoticz environment isn't stable any more. The language turns into Albanian and I get the message 'Problem saving settings!' when I try to change the settings.

I don't know how to solve. Search the internet but no solution.

Thanks for helping me.