Page 1 of 3

interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Friday 06 January 2017 12:31
by BakSeeDaa
Intercept reports on Raspberry Pi from your WH2600 personal weather station and send updates to Domoticz and Weather Underground.

For just a few bucks (192,95 €) You can buy a Personal Weather Station and get a whole lot of sensors to play around with in Domoticz. The interceptWH2600 software is aimed for Renkforce WH2600 sold by conrad.de and conrad.se. This PWS is also known as HP1000 and it's re-branded by Aercus, Ambient Observer, Conrad and Froggit. It comes with a built in web server where You can see the data, it's not fancy at all.

The PWS normally sends it's weather reports directly to Weather Underground which allows you to see the weather data on their web site. You may also set up a "scraper" to pull data from Weather Underground if you wish, that's what the Weather Underground Plugin for Domoticz is doing. (There is also another solution developed by @vanesp that scrapes the weather station and sends the data to Domoticz)

This software uses a different approach. You set up your WH2600 to send the reports directly to Your Raspberry Pi. The interceptWH2600 service will clean the data received, enrich it and update Your Domoticz devices for You. It will also pass the weather data on to Weather Underground. There is already a huge project WeeWX that can do many of these things but it can not update Domoticz though. This software is more lightweight and specialized to work with Domoticz. It will only update Domoticz devices when needed (when there has been a change in the reported data or the device needs an update not to time-out). Among many other nice features, the interceptWH2600 service saves wind data and calculates 2-minutes and 10-minutes resultant wind directions and average wind speeds.

I've been working on the code for quite many days now. The first version is running on my Raspberry Pi and now I'm learning how to set up this project on GitHub to allow others to contribute and improve it.

I haven't had the time yet to make an installation instruction. The goal is to be able to install everything by a single command but we are not there yet. If You are interested in this project, please make sure to subscribe to this thread. I will post more here very soon. This initial post will be updated.

Below are some screen shots from the sensors in Domoticz:
domo1.png
domo2.png

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Friday 06 January 2017 12:31
by BakSeeDaa
Reserved post for additional info.

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 18 April 2017 13:26
by harsl
Hi,
Can you help me out how to configure this script?
Managed to install but gives error on line 45 at first run and have no clue what to fill in all the variables.
Thanks and keep up the good work.
har

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 18 April 2017 15:40
by BakSeeDaa
harsl wrote:Hi,
Can you help me out how to configure this script?
Managed to install but gives error on line 45 at first run and have no clue what to fill in all the variables.
Thanks and keep up the good work.
har
I should try to finish the installation instruction soon in case someone is interested. I could try to help You but then I would need to know at what stage and where You receive the error message. I would also need the error message text of course. Quoting your config file would also be helpful.

Cheers!

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Wednesday 19 April 2017 8:23
by BakSeeDaa
I've now added further installation instructions at https://github.com/BakSeeDaa/interceptWH2600/wiki

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 11:48
by sryback
Hi All !

Great job BakSeeDaa, you have done a beautiful project !

But I've got an exception at interceptWH2600.py launch :

----------------------------------------
Exception happened during processing of request from ('192.168.1.224', 58114)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "./interceptWH2600.py", line 95, in do_GET
updateDomoticz(jsonQs)
File "./interceptWH2600.py", line 124, in updateDomoticz
updateDomoDevice(c, jsonQs)
File "./interceptWH2600.py", line 185, in updateDomoDevice
domoValue = round(r['result'][0]['Barometer'], 0)
KeyError: 'Barometer'
----------------------------------------
Is my config.json incorrect ?

Thank's a lot !
Sryback

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 12:58
by BakSeeDaa
sryback wrote: Tuesday 05 September 2017 11:48 Hi All !

Great job BakSeeDaa, you have done a beautiful project !

But I've got an exception at interceptWH2600.py launch :

----------------------------------------
Exception happened during processing of request from ('192.168.1.224', 58114)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "./interceptWH2600.py", line 95, in do_GET
updateDomoticz(jsonQs)
File "./interceptWH2600.py", line 124, in updateDomoticz
updateDomoDevice(c, jsonQs)
File "./interceptWH2600.py", line 185, in updateDomoDevice
domoValue = round(r['result'][0]['Barometer'], 0)
KeyError: 'Barometer'
----------------------------------------
Is my config.json incorrect ?

Thank's a lot !
Sryback
1) Did this happen all of a sudden or are you installing new?

2) If You look at your configuration file, you will find a Barometer device and has a domoticzIdx value. Do You have a Domoticz device with that idx number?

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 14:19
by sryback
BakSeeDaa wrote: Tuesday 05 September 2017 12:58

1) Did this happen all of a sudden or are you installing new?

2) If You look at your configuration file, you will find a Barometer device and has a domoticzIdx value. Do You have a Domoticz device with that idx number?
1) It's a new installation.

2) Yes, in my config.json, i've got a baramoter with exact idx from domoticz
Here is my config.json :
{
"categoryName":"Indoor Temp + Humidity",
"domoticzSensorType":82,
"domoticzIdx":1,
"enabled":true
},
{
"categoryName":"Outdoor Temp + Humidity",
"domoticzSensorType":82,
"domoticzIdx":2,
"enabled":true
},
{
"categoryName":"Barometer",
"domoticzSensorType":1,
"domoticzIdx":3,
"enabled":true
},
{
"categoryName":"Rain",
"domoticzSensorType":85,
"domoticzIdx":4,
"enabled":true
},
{
"categoryName":"Wind",
"domoticzSensorType":86,
"domoticzIdx":5,
"enabled":true
},
{
"categoryName":"UV",
"domoticzSensorType":87,
"domoticzIdx":6,
"enabled":true
},
{
"categoryName":"Solar Radiation",
"domoticzSensorType":20,
"domoticzIdx":7,
"enabled":true
},
{
"categoryName":"Battery Alert",
"domoticzSensorType":7,
"domoticzIdx":8,
"enabled":true
}
All is good from idx 1 to 2. But after, no information in Domoticz.

Maybe it's a system problem ?? I've installed Dietpi on my raspberry...

Thank's a lot for your help !

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 14:36
by BakSeeDaa
So, if you open a browser in your LAN and write

Code: Select all

http://YOURDOMOTICZID:8080/json.htm?type=devices&rid=3
Replace YOURDOMOTICZID with your actual domoticz IP address or host name (The same that you put in your config file)
in the address bar, what is the result?

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 14:49
by sryback
I will do the test in few hours.
Now i'm in my office and un can't do it.
See you soon ;)

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 19:33
by sryback
BakSeeDaa wrote: Tuesday 05 September 2017 14:36 So, if you open a browser in your LAN and write

Code: Select all

http://YOURDOMOTICZID:8080/json.htm?type=devices&rid=3
Replace YOURDOMOTICZID with your actual domoticz IP address or host name (The same that you put in your config file)
in the address bar, what is the result?
Here is the result :

Code: Select all

{
   "ActTime" : 1504632640,
   "ServerTime" : "2017-09-05 19:30:40",
   "Sunrise" : "07:17",
   "Sunset" : "20:24",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "0.0 Bar",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "WH2600",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveTimeout" : true,
         "ID" : "00082003",
         "LastUpdate" : "2017-09-05 10:23:35",
         "Name" : "Barometer",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Pressure" : 0.0,
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Pressure",
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "gauge",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "3"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 19:43
by BakSeeDaa
sryback wrote: Tuesday 05 September 2017 19:33
BakSeeDaa wrote: Tuesday 05 September 2017 14:36 So, if you open a browser in your LAN and write

Code: Select all

http://YOURDOMOTICZID:8080/json.htm?type=devices&rid=3
Replace YOURDOMOTICZID with your actual domoticz IP address or host name (The same that you put in your config file)
in the address bar, what is the result?
Here is the result :

Code: Select all

{
   "ActTime" : 1504632640,
   "ServerTime" : "2017-09-05 19:30:40",
   "Sunrise" : "07:17",
   "Sunset" : "20:24",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "0.0 Bar",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "WH2600",
         "HardwareType" : "Dummy (Does nothing, use for virtual switches only)",
         "HardwareTypeVal" : 15,
         "HaveTimeout" : true,
         "ID" : "00082003",
         "LastUpdate" : "2017-09-05 10:23:35",
         "Name" : "Barometer",
         "Notifications" : "false",
         "PlanID" : "0",
         "PlanIDs" : [ 0 ],
         "Pressure" : 0.0,
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "Pressure",
         "Timers" : "false",
         "Type" : "General",
         "TypeImg" : "gauge",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "3"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}
That is not a Barometer device. That is a pressure device. Delete it and create a new Barometer device. Edit the config file with the new idx and it will work like a charm ;)

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 05 September 2017 21:24
by sryback
BakSeeDaa wrote: Tuesday 05 September 2017 19:43 That is not a Barometer device. That is a pressure device. Delete it and create a new Barometer device. Edit the config file with the new idx and it will work like a charm ;)
ARG ! :o
you have found my problem !! no error when l launch .py !! :mrgreen:

But, i don't understand...
I've followed perfectly your wiki.
My WS is the CONRAD model, Renkforce
Maybe is not really a WH2600 ??

Do you know what is the "domoticzSensorType" for "pressure" ??

Thank a lot for your help !! :)

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Wednesday 06 September 2017 7:26
by BakSeeDaa
sryback wrote: Tuesday 05 September 2017 21:24 But, i don't understand...
I've followed perfectly your wiki.
My WS is the CONRAD model, Renkforce
Maybe is not really a WH2600 ??
Not really, it says you should create a Barometer type device. ;)
sryback wrote: Tuesday 05 September 2017 21:24 Do you know what is the "domoticzSensorType" for "pressure" ??
I don't know.
sryback wrote: Tuesday 05 September 2017 21:24 Thank a lot for your help !! :)
I'm happy it works now :D

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Saturday 30 September 2017 12:29
by sryback
Hi BackSeeDaa

What do you think about this :

Code: Select all

----------------------------------------
Exception happened during processing of request from ('192.168.1.224', 19248)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "./interceptWH2600.py", line 95, in do_GET
    updateDomoticz(jsonQs)
  File "./interceptWH2600.py", line 124, in updateDomoticz
    updateDomoDevice(c, jsonQs)
  File "./interceptWH2600.py", line 198, in updateDomoDevice
    domoValue = round(float(r['result'][0]['Data'].split(';')[1]), 0)
IndexError: list index out of range
----------------------------------------
I've got some problems with devices like rain or wind for example... :roll:

I've taken a look in the intercept.py and i've found this : you have to convert inches in mm for rain during the process.
So i've changed my stationserver config from mm to inches but usually the same problem ...
I've changed many parameters like devicesidx, config.json file ... but, i'dont know where is my mistake....

I need your help !
Many thank's in advance

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Monday 30 October 2017 16:11
by Doudy
Why does the temperature update very regularly and not the wind speed?
:?:
The temperature of Domoticz adapts at the same time as 'My PWS'.

The wind speed varies several times in 'My PWS' before the variation is visible in 'Domoticz'.
Image
Left picture = Domoticz - Right picture = My PWS
Image

Is it possible to speed up the update of Domoticz for wind speed?

;)

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Tuesday 31 October 2017 11:36
by Doudy
Hello,

Winter time

interceptWH2600 : date-time 2017-10-31 10:31:52
date-time pi : mardi 31 octobre 2017, 11:31:52 (UTC+0100)

How to change to have the correct time?
:?: :idea:

:) Find solution : :)

Code: Select all

I using datetime.now() instead of datetime.utcnow(). 
That works fine.

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Saturday 04 November 2017 9:36
by Doudy
Remark

in wiki there is

Code: Select all

sudo update-rc.d /etc/init.d/interceptWH2600.sh defaults
il is

Code: Select all

sudo update-rc.d interceptWH2600.sh defaults
;)

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Monday 06 November 2017 16:44
by BakSeeDaa
Doudy wrote: Monday 30 October 2017 16:11 Why does the temperature update very regularly and not the wind speed?
:?:
The temperature of Domoticz adapts at the same time as 'My PWS'.

The wind speed varies several times in 'My PWS' before the variation is visible in 'Domoticz'.
Image
Left picture = Domoticz - Right picture = My PWS
Image

Is it possible to speed up the update of Domoticz for wind speed?

;)
Wind data is updated at the same interval as for temperature but for wind data it's using last 10 minutes average values when updating Domoticz. (It won't update Domoticz unless it's changed). It seems useless to update Domoticz with momentary wind data every minute. It would fluctuate a lot.

Re: interceptWH2600 - WH2600 Weather Station Interceptor

Posted: Monday 06 November 2017 17:21
by Doudy
It's a way of seeing things.
I would prefer live variations.

;)