matthewwall / weewx-netatmo Goto Github PK
View Code? Open in Web Editor NEWweewx driver for netatmo weather station
License: GNU General Public License v3.0
weewx driver for netatmo weather station
License: GNU General Public License v3.0
netatmo - weewx driver for netatmo weather stations Copyright 2015 Matthew Wall Distributed under terms of the GPLv3 This driver has two modes of operation. It can use the netatmo API to obtain data from the netatmo servers, or it can parse the packets sent from a netatmo station. The latter works only with netatmo firmware 101 (circa early 2015). Firmware 102 introduced arbitrary encryption in response to a poorly chosen decision to include the wifi password in network traffic sent to the netatmo servers. Unfortunately, the encryption blocks end-users from accessing their data, while the netatmo stations might still send information such as the wifi password to the netatmo servers. By default this driver will operate in 'cloud' mode. Communication with the netatmo servers requires 4 things: username, password, client_id, and client_secret. The username and password are the credentials used to access data at netatmo.com. The client_id and client_secret must be obtained via the dev.netatmo.com web site. Using these 4 things, the driver automatically obtains and updates the tokens needed to get data from the server. =============================================================================== Installation instructions: 1) download the driver: wget -O weewx-netatmo.zip https://github.com/matthewwall/weewx-netatmo/archive/master.zip 2) install the driver: sudo wee_extension --install weewx-netatmo.zip 3) select and configure the driver: sudo wee_config --reconfigure 4) start weewx: sudo /etc/init.d/weewx start
The rainfall total reported by weewx via weewx-netatmo is much higher than through the netatmo app. As an example, at one point today netatmo was reporting 1.0mm and weewx 3.0mm.
Could a cm to inches conversion be at fault?
Hello,
I wondered why the netatmo connection was not working until I realised that it was caused by the hash in my netatmo password. Maybe other special characters are also affected?!
Could you please escape those hashes or otherwise add a hint in the readme?
Thank you very much in advance!
With kind regards,
Michael
Hi,
i am new here.
So i have a litte problem with the Netatmo driver.
in my whew.config i can see the login credentials fo netatmo.
But in the log file i can see them.
is it a security thing or do i use the wrong config file.
So can you please tell me were i have to insert the credentials ?
Thanks a lot.
hopefully you can see the screenshot?
I have a working weewx with this addon for my netatmo station. Can I add some graphs missing by default:
Main indoor unit (central): co2, noise, humidity
Additional indoor unit: co2, humidity
Also, battery levels are "low", but there are all fresh batteries.
I have Netamo weather with wind and rain modules.
Installed the extension but i cant figuring out how to configuring to skins so it reads all info like battery, co2, noise dB, pm2 etc.
In search on my Raspberry pi 4 command line
I get all stats.
Weewxd command:
LOOP: 2020-12-22 11:12:53 CET (1608631973) altimeter: 1000.7784445402908, appTemp
: 5.70319891286533, barometer: 1000.7195037486399, cloudbase: 196.3515156542606, co
2: 673, dateTime: 1608631973, dewpoint: 5.571522483355761, heatindex: 6.21555555555
5557, humidex: 7.1, inDewpoint: 9.477263529775787, inHumidity: 42, inTemp: 23.1, ma
xSolarRad: 69.7032833582255, noise: 39, out_battery_vp: 5968, outHumidity: 90, out_
rf_status: 77, outTemp: 7.1, outTempBatteryStatus: 98, pressure: 999.5, rain: 0.0,
rainBatteryStatus: 100, rain_battery_vp: 6150, rainRate: 0.0, rain_rf_status: 73, r
ain_total: 0.06, usUnits: 17, wifi_status: 46, windBatteryStatus: 100, wind_battery
_vp: 6044, windchill: 7.1000000000000005, windDir: 185, windGust: 1.666666668, wind
GustDir: 154, wind_rf_status: 63, windSpeed: 0.555555556
And syslog get this
RaspberryPi /weewxd: netatmo: MainThread: data: {'70:ee:50:65:3d:c0
.NAMain.time_utc': 1608631771, '70:ee:50:65:3d:c0.NAMain.wifi_status': 46, '70:ee:5
0:65:3d:c0.NAMain.co2_calibrating': False, '70:ee:50:65:3d:c0.NAMain._id': '70:ee:5
0:65:3d:c0', '70:ee:50:65:3d:c0.NAMain.module_name': 'NetatmoForecast', '70:ee:50:6
5:3d:c0.NAMain.last_status_store': 1608631773, '70:ee:50:65:3d:c0.NAMain.firmware':
179, '70:ee:50:65:3d:c0.NAMain.last_setup': 1605898056, '70:ee:50:65:3d:c0.NAMain.
date_setup': 1605898056, '70:ee:50:65:3d:c0.NAMain.Temperature': 23.1, '70:ee:50:65
:3d:c0.NAMain.Humidity': 42, '70:ee:50:65:3d:c0.NAMain.AbsolutePressure': 999.5, '7
0:ee:50:65:3d:c0.NAMain.Pressure': 1000.6, '70:ee:50:65:3d:c0.NAMain.CO2': 673, '70
:ee:50:65:3d:c0.NAMain.Noise': 39, '02:00:00:65:02:32.NAModule1.time_utc': 16086317
24, '02:00:00:65:02:32.NAModule1.rf_status': 77, '02:00:00:65:02:32.NAModule1.batte
ry_vp': 5968, '02:00:00:65:02:32.NAModule1._id': '02:00:00:65:02:32', '02:00:00:65:
02:32.NAModule1.module_name': 'Outdoor', '02:00:00:65:02:32.NAModule1.last_seen': 1
608631724, '02:00:00:65:02:32.NAModule1.battery_percent': 98, '02:00:00:65:02:32.NA
Module1.firmware': 50, '02:00:00:65:02:32.NAModule1.last_setup': 1605898013, '02:00
:00:65:02:32.NAModule1.Temperature': 7.1, '02:00:00:65:02:32.NAModule1.Humidity': 9
0, '05:00:00:07:f3:1e.NAModule3.time_utc': 1608631763, '05:00:00:07:f3:1e.NAModule3
.rf_status': 73, '05:00:00:07:f3:1e.NAModule3.battery_vp': 6150, '05:00:00:07:f3:1e
.NAModule3._id': '05:00:00:07:f3:1e', '05:00:00:07:f3:1e.NAModule3.module_name': 'O
utdoor', '05:00:00:07:f3:1e.NAModule3.last_seen': 1608631763, '05:00:00:07:f3:1e.NA
Module3.battery_percent': 100, '05:00:00:07:f3:1e.NAModule3.firmware': 12, '05:00:0
0:07:f3:1e.NAModule3.last_setup': 1605982034, '05:00:00:07:f3:1e.NAModule3.Rain': 0
.0, '05:00:00:07:f3:1e.NAModule3.sum_rain_24': 0.06, '05:00:00:07:f3:1e.NAModule3.s
um_rain_1': 0.0, '06:00:00:04:d3:ec.NAModule2.time_utc': 1608631769, '06:00:00:04:d
3:ec.NAModule2.rf_status': 63, '06:00:00:04:d3:ec.NAModule2.battery_vp': 6044, '06:
00:00:04:d3:ec.NAModule2._id': '06:00:00:04:d3:ec', '06:00:00:04:d3:ec.NAModule2.mo
dule_name': 'Outdoor', '06:00:00:04:d3:ec.NAModule2.last_seen': 1608631769, '06:00:
00:04:d3:ec.NAModule2.battery_percent': 100, '06:00:00:04:d3:ec.NAModule2.firmware'
: 25, '06:00:00:04:d3:ec.NAModule2.last_setup': 1605982333, '06:00:00:04:d3:ec.NAMo
dule2.WindStrength': 2, '06:00:00:04:d3:ec.NAModule2.WindAngle': 185, '06:00:00:04:
d3:ec.NAModule2.GustStrength': 6, '06:00:00:04:d3:ec.NAModule2.GustAngle': 154}
Dec 22 11:22:20 RaspberryPi /weewxd: netatmo: MainThread: packet: {'dateTime': 1608
632541, 'usUnits': 16, 'pressure': 999.5, 'inTemp': 23.1, 'inHumidity': 42, 'co2':
673, 'noise': 39, 'wifi_status': 46, 'outTemp': 7.1, 'outHumidity': 90, 'out_rf_sta
tus': 77, 'out_battery_vp': 5968, 'outTempBatteryStatus': 98, 'windSpeed': 2, 'wind
Dir': 185, 'windGust': 6, 'windGustDir': 154, 'wind_rf_status': 63, 'wind_battery_v
p': 6044, 'windBatteryStatus': 100, 'rain': 0.0, 'rain_total': 0.06, 'rain_rf_statu
s': 73, 'rain_battery_vp': 6150, 'rainBatteryStatus': 100}
Dec 22 11:22:20 RaspberryPi weewx[11445] INFO weewx.manager: Added record 2020-12-2
2 11:20:00 CET (1608632400) to database 'weewx.sdb'
Dec 22 11:22:20 RaspberryPi weewx[11445] INFO weewx.manager: Added record 2020-12-2
2 11:20:00 CET (1608632400) to daily summary in 'weewx.sdb'
But i dont know how to formatting it so the skins reading it.
Right now im using seasons skin.
Hope for som help i to configuring so it reads all Netatmo data in weewx skin.
I'm having an issue with the latest release (v0.10) where the rain data I'm getting is still inaccurate. The main issue is that it doesn't seem to be consistently inaccurate. Sometimes it's 4x greater than actual, and sometimes it's 10x greater than actual. I'm been unsuccessful in trying to figure out the cause. Any suggestions on where to look / what to test for?
Hi,
I'm using Weewx an Netatmo weather station. All works fine. But I have a second extramodule, but how my I have this extramodule data in Weewx ?
My I need to modify netatmo.py and add more field data ?
'extraTemp2': '.NAModule5.Temperature',
'extraHumid2': '.NAModule5.Humidity',
'extra_rf_status_2': '.NAModule5.rf_status',
'extra_battery_vp_2': '.NAModule5.battery_vp',
'extra2BatteryStatus': '*.NAModule5.battery_percent',
My I rebuild my SQL database ?
Thank's for your help.
Gilles.
Hi,
since yesterday weewx can't collect data via the driver anymore, the only thing i have found inside the logs is this part:
Aug 12 09:24:07 torpi weewx[7604]: netatmo: netatmo-client: failed attempt 1 of 5 to get data: <urlopen error [Errno 111] Verbindungsaufbau abgelehnt>
Aug 12 09:24:17 torpi weewx[7604]: netatmo: netatmo-client: failed attempt 2 of 5 to get data: <urlopen error [Errno 111] Verbindungsaufbau abgelehnt>
Aug 12 09:24:27 torpi weewx[7604]: netatmo: netatmo-client: failed attempt 3 of 5 to get data: <urlopen error [Errno 111] Verbindungsaufbau abgelehnt>
Aug 12 09:24:37 torpi weewx[7604]: netatmo: netatmo-client: failed attempt 4 of 5 to get data: <urlopen error [Errno 111] Verbindungsaufbau abgelehnt>
Aug 12 09:24:47 torpi weewx[7604]: netatmo: netatmo-client: failed attempt 5 of 5 to get data: <urlopen error [Errno 111] Verbindungsaufbau abgelehnt>
Aug 12 09:24:57 torpi weewx[7604]: netatmo: netatmo-client: failed to get data after 5 attempts
I checked the app on dev.netatmo.com and it is not banned and still active, any clues what the problem might be ?
No Update on DB since Today 15:42.
Log;
Nov 20 16:28:45 weewx2 weewx[1198]: netatmo: netatmo-client: cloud units: {'windunit': 0, 'unit': 0, 'pressureunit': 0}
Nov 20 16:28:45 weewx2 weewx[1198]: netatmo: netatmo-client: exception in netatmo-client: 'dashboard_data'
Nov 20 16:28:45 weewx2 weewx[1198]: *** Traceback (most recent call last):
Nov 20 16:28:45 weewx2 weewx[1198]: *** File "/usr/share/weewx/user/netatmo.py", line 319, in collect_data
Nov 20 16:28:45 weewx2 weewx[1198]: *** CloudClient.get_data(self._sd, self._device_id)
Nov 20 16:28:45 weewx2 weewx[1198]: *** File "/usr/share/weewx/user/netatmo.py", line 349, in get_data
Nov 20 16:28:45 weewx2 weewx[1198]: *** data = CloudClient.extract_data(d, units_dict)
Nov 20 16:28:45 weewx2 weewx[1198]: *** File "/usr/share/weewx/user/netatmo.py", line 364, in extract_data
Nov 20 16:28:45 weewx2 weewx[1198]: *** if 'time_utc' in x['dashboard_data']:
Nov 20 16:28:45 weewx2 weewx[1198]: *** KeyError: 'dashboard_data'
Nov 20 16:28:45 weewx2 weewx[1198]: netatmo: netatmo-client: failed to get data after 5 attempts
Nov 20 16:28:45 weewx2 weewx[1198]: netatmo: netatmo-client: next update in 300 seconds
root@weewx2 ~ # wee_extension --list
Extension Name Version Description
netatmo 0.12 Driver for netatmo weather stations.
I get this error to but i can't fix it.
weewx 3.9.1
failed attempt 5 of 5 to get data: HTTP Error 400
Netatmo.py
DRIVER_VERSION = "0.14"
changed line 270 from net to com
changed line 523 to "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
weewx config netatmo wrote manually
netatmo-client: failed attempt 1 of 5 to get data: HTTP Error 400:
Feb 21 20:32:43 raspberrypi weewx[22182]: netatmo: netatmo-client: waiting 10 seconds before retry
Feb 21 20:32:53 raspberrypi weewx[22182]: netatmo: netatmo-client: url: https://api.netatmo.com/oauth2/token data: username=myuser%40t-online.de&grant_type=password&client_id=myid&scope=read_station&client_secret=mysecret&password=mypw hdr: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}
Feb 21 20:33:24 raspberrypi weewx[22182]: netatmo: netatmo-client: failed attempt 5 of 5 to get data: HTTP Error 400:
Feb 21 20:33:24 raspberrypi weewx[22182]: netatmo: netatmo-client: waiting 10 seconds before retry
Feb 21 20:33:34 raspberrypi weewx[22182]: netatmo: netatmo-client: failed to get data after 5 attempts
Feb 21 20:33:34 raspberrypi weewx[22182]: netatmo: netatmo-client: next update in 300 seconds
In my experience, rainfallen data reported by Netatmo through the API are very inconsistent
I understand that WeeWX derives all rain relevant data from the ammount of rain reported for each observation period. As said, this parameter is wrongly reported by Netatmo, consequently rainfall data presented by WeeWx are wrong as well (sometimes too high, some times too low in comprison to the Rain_24 vaue)
Is somebody else having the same issues? Am I doing something wrong?
Thanks
Emilio
Hi - not sure this is an issue, or just a case of using new credentials, but Netatmo sent this email below recently.
Does this affect weewx-netatmo?
Thanks
To improve the security of our products, we inform you that the Client Credentials grant type method will be completely removed. It will no longer be possible to authenticate with the username and password of the user. The effective date of this update is October 2022.
https://dev.netatmo.com/apidocumentation/oauth#authorization-code
Hi
I appear to be loosing data, I suspect this is due to the access to the Netatmo servers.
I reduced the query period from 5 to 10 minutes, but still lost data. Going to the Netatmo site the data appears complete. Is there away to catch up and download the missing data?
Thanks
PS can you confirm your code uses the config setting for the query, as I have found fixed values in the netatmo.py code (300 seconds)
I use WeeWX together with the WeeWX driver for Netatmo weather stations to control my OpenSprinkler garden watering system. Instead of sending the data to Wunderground the data is forwarded to the OpenSprinkler server process, which uses the same data format as Wunderground.
Additionally, I use Meteoware as the service to push the weather data to Wunderground. The Netatmo weather station and my.netatmo.com site is reporting correct rain accumulation data. Unfortunately, the rain totals reported by WeeWX differ from this and results in less rainfall data.
Below is an extract of the Meteoware data forwarded on August 18th to Wunderground:
Time Temp. Dewp. Hum. Wind dir Wind speed Wind gust Bar. 1h Prec. 24h Prec.
01:32 17 14.6 86 216 0.3 0.6 1013.7 0.0000 0.0000
01:42 17 14.6 86 230 0.3 0.6 1013.5 0.1010 0.1000
01:52 16.9 14.5 86 232 0.3 0.6 1013.3 0.1010 0.1000
02:02 16.8 14.4 86 270 0.3 0.6 1013.1 0.1010 0.1000
02:12 16.7 14.5 87 270 0.3 0.6 1013.1 0.1010 0.1000
02:22 16.6 14.4 87 270 0.3 0.6 1013.1 0.1010 0.1000
02:32 16.5 14.3 87 206 0.3 1.1 1013.1 0.1010 0.1000
02:43 16.5 14.5 88 217 0.3 1.1 1012.9 0.0000 0.1000
…..
18:41 30.2 18 48 60 0.3 1.1 1009.1 0.0000 0.1000
19:08 27.5 18.2 57 225 1.7 3.3 1010.3 5.1510 5.3000
19:18 25.5 17.9 63 255 1.7 3.9 1010 5.2520 5.4000
19:28 24.2 17.9 68 246 1.4 3.9 1010.5 5.2520 5.4000
19:39 23.2 17.4 70 251 1.7 3.9 1010.4 5.2520 5.4000
19:49 22.4 17.1 72 283 1.7 3.9 1010.7 5.2520 5.4000
19:59 21.6 16.8 74 253 1.4 3.9 1010.6 4.9490 5.4000
20:09 21.2 16.6 75 240 1.4 3.1 1010.5 0.1010 5.4000
20:19 20.8 16.6 77 238 1.4 3.3 1010.6 0.0000 5.4000
20:29 20.6 16.8 79 236 1.1 3.1 1010.6 0.0000 5.4000
There was about 0.1 mm rain falling at 1:40 in the morning followed by a heavy rainfall of 5.3 mm between 18:58 and 20:29 the same day. The total rainfall sums up to 5.4 mm on this day, which can be also found in the Netatmo reports.
If this is compared with the WeeWX Syslog extract between 18:56 and 20:31 on August 18th it can be seen that less rainfall is summarized:
Aug 18 18:56:06 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.749","dewptf":"64.3","humidity":"048","dateutc":"2019-08-18 16:55:00","dailyrainin":"0.01","winddir":"060","tempf":"86.4","windspeedmph":"0.6","windgustmph":"2.5","rainin":"0.00"}
Aug 18 19:01:08 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.749","dewptf":"64.3","humidity":"048","dateutc":"2019-08-18 17:00:00","dailyrainin":"0.01","winddir":"060","tempf":"86.4","windspeedmph":"0.6","windgustmph":"2.5","rainin":"0.00"}
Aug 18 19:06:09 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.804","dewptf":"63.8","humidity":"050","dateutc":"2019-08-18 17:05:00","dailyrainin":"0.02","winddir":"225","tempf":"84.6","windspeedmph":"1.2","windgustmph":"5.6","rainin":"0.01"}
Aug 18 19:11:10 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.804","dewptf":"63.8","humidity":"050","dateutc":"2019-08-18 17:10:00","dailyrainin":"0.03","winddir":"225","tempf":"84.6","windspeedmph":"1.2","windgustmph":"5.6","rainin":"0.02"}
Aug 18 19:16:10 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.795","dewptf":"64.8","humidity":"057","dateutc":"2019-08-18 17:15:00","dailyrainin":"0.04","winddir":"225","tempf":"81.5","windspeedmph":"3.7","windgustmph":"7.5","rainin":"0.03"}
Aug 18 19:21:12 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.795","dewptf":"64.8","humidity":"057","dateutc":"2019-08-18 17:20:00","dailyrainin":"0.05","winddir":"225","tempf":"81.5","windspeedmph":"3.7","windgustmph":"7.5","rainin":"0.04"}
Aug 18 19:26:12 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.793","dewptf":"64.3","humidity":"063","dateutc":"2019-08-18 17:25:00","dailyrainin":"0.05","winddir":"255","tempf":"77.9","windspeedmph":"3.7","windgustmph":"8.7","rainin":"0.04"}
Aug 18 19:31:14 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.793","dewptf":"64.3","humidity":"063","dateutc":"2019-08-18 17:30:00","dailyrainin":"0.06","winddir":"255","tempf":"77.9","windspeedmph":"3.7","windgustmph":"8.7","rainin":"0.05"}
Aug 18 19:36:14 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.814","dewptf":"64.2","humidity":"068","dateutc":"2019-08-18 17:35:00","dailyrainin":"0.06","winddir":"246","tempf":"75.6","windspeedmph":"3.1","windgustmph":"8.7","rainin":"0.05"}
Aug 18 19:41:16 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.814","dewptf":"64.2","humidity":"068","dateutc":"2019-08-18 17:40:00","dailyrainin":"0.06","winddir":"246","tempf":"75.6","windspeedmph":"3.1","windgustmph":"8.7","rainin":"0.05"}
Aug 18 19:46:16 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.814","dewptf":"63.4","humidity":"070","dateutc":"2019-08-18 17:45:00","dailyrainin":"0.06","winddir":"251","tempf":"73.8","windspeedmph":"3.7","windgustmph":"8.7","rainin":"0.05"}
Aug 18 19:51:18 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.814","dewptf":"63.4","humidity":"070","dateutc":"2019-08-18 17:50:00","dailyrainin":"0.06","winddir":"251","tempf":"73.8","windspeedmph":"3.7","windgustmph":"8.7","rainin":"0.05"}
Aug 18 19:56:18 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.826","dewptf":"62.8","humidity":"072","dateutc":"2019-08-18 17:55:00","dailyrainin":"0.06","winddir":"283","tempf":"72.3","windspeedmph":"3.7","windgustmph":"8.7","rainin":"0.05"}
Aug 18 20:01:20 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.826","dewptf":"62.8","humidity":"072","dateutc":"2019-08-18 18:00:00","dailyrainin":"0.06","winddir":"283","tempf":"72.3","windspeedmph":"3.7","windgustmph":"8.7","rainin":"0.05"}
Aug 18 20:06:20 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.826","dewptf":"62.2","humidity":"074","dateutc":"2019-08-18 18:05:00","dailyrainin":"0.06","winddir":"253","tempf":"70.9","windspeedmph":"3.1","windgustmph":"8.7","rainin":"0.04"}
Aug 18 20:16:22 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.825","dewptf":"61.9","humidity":"075","dateutc":"2019-08-18 18:15:00","dailyrainin":"0.06","winddir":"240","tempf":"70.2","windspeedmph":"3.1","windgustmph":"6.8","rainin":"0.02"}
Aug 18 20:21:24 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.825","dewptf":"61.9","humidity":"075","dateutc":"2019-08-18 18:20:00","dailyrainin":"0.06","winddir":"240","tempf":"70.2","windspeedmph":"3.1","windgustmph":"6.8","rainin":"0.01"}
Aug 18 20:26:24 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.829","dewptf":"61.9","humidity":"077","dateutc":"2019-08-18 18:25:00","dailyrainin":"0.06","winddir":"238","tempf":"69.4","windspeedmph":"3.1","windgustmph":"7.5","rainin":"0.00"}
Aug 18 20:31:26 raspberrypi npm[31824]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"anyText","PASSWORD":"anyText","softwaretype":"weewx-3.9.1","baromin":"29.829","dewptf":"61.9","humidity":"077","dateutc":"2019-08-18 18:30:00","dailyrainin":"0.06","winddir":"238","tempf":"69.4","windspeedmph":"3.1","windgustmph":"7.5","rainin":"0.00"}
The daily rainfall in inch sums up to only 0.06 inch = 1.5 mm for this day, which seems to be not Ok!
I have seen this error mostly if there is a heavy rainfall in a short period of time. Any idea what goes wrong or need to be changed! A correct total rainfall reporting is very important for me, as this data will be used for calculating the time the sprinkler will be running.
Installed the driver using the provided instructions, however not option to choose Netatmo driver after running wee_config --reconfigure. When manually setting the driver, the following is shown in syslog:
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Initializing weewx version 4.0.0
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Using Python 3.7.3 (default, Dec 20 2019, 18:57:59) #012[GCC 8.3.0]
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Platform Linux-4.19.97-v7+-armv7l-with-debian-10.4
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: Locale is 'en_US.UTF-8'
May 12 23:44:14 HapPiHyper weewx[996] INFO __main__: PID file is /var/run/weewx.pid
May 12 23:44:14 HapPiHyper weewx[1000] INFO __main__: Using configuration file /etc/weewx/weewx.conf
May 12 23:44:14 HapPiHyper weewx[1000] INFO weewx.engine: Loading station type netatmo (user.netatmo)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: Caught unrecoverable exception:
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** Missing parentheses in call to 'print'. Did you mean print("Specify the mode for obtaining data, either 'cloud' or 'sniff'")? (netatmo.py, line 101)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** Traceback (most recent call last):
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** File "/usr/share/weewx/weewxd", line 148, in main
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** engine = weewx.engine.StdEngine(config_dict)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 69, in __init__
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** self.setupStation(config_dict)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 92, in setupStation
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** __import__(driver)
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** File "/usr/share/weewx/user/netatmo.py", line 101
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** print "Specify the mode for obtaining data, either 'cloud' or 'sniff'"
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** ^
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Specify the mode for obtaining data, either 'cloud' or 'sniff'")?
May 12 23:44:14 HapPiHyper weewx[1000] CRITICAL __main__: **** Exiting.
May 12 23:44:14 HapPiHyper weewx[984]: Starting weewx weather system: weewx.
May 12 23:44:14 HapPiHyper systemd[1]: Started LSB: weewx weather system.
This is on a Rpi 3 with Buster release and WeeWX installed using these instruction:
12 wget -qO - http://weewx.com/keys.html | sudo apt-key add -
13 wget -qO - http://weewx.com/apt/weewx-python3.list | sudo tee /etc/apt/sources.list.d/weewx.list
14 sudo apt update
15 sudo apt install weewx
From syslog...
Nov 8 12:36:16 nas weewx[26867]: restx: WOW: Posting not enabled.
Nov 8 12:36:16 nas weewx[26867]: restx: AWEKAS: Posting not enabled.
Nov 8 12:36:16 nas weewx[26867]: engine: Starting up weewx version 3.7.1
Nov 8 12:36:16 nas weewx[26867]: engine: Starting main packet loop.
Nov 8 12:36:16 nas weewx[26867]: netatmo: netatmo-client: failed attempt 1 of 5 to get data: HTTP Error 400:
Nov 8 12:36:27 nas weewx[26867]: netatmo: netatmo-client: failed attempt 2 of 5 to get data: HTTP Error 400:
Nov 8 12:36:38 nas weewx[26867]: netatmo: netatmo-client: failed attempt 3 of 5 to get data: HTTP Error 400:
Nov 8 12:36:48 nas weewx[26867]: netatmo: netatmo-client: failed attempt 4 of 5 to get data: HTTP Error 400:
Nov 8 12:36:59 nas weewx[26867]: netatmo: netatmo-client: failed attempt 5 of 5 to get data: HTTP Error 400: Bad Request
Nov 8 12:37:09 nas weewx[26867]: netatmo: netatmo-client: failed to get data after 5 attempts
What am I missing in my setup? I have my keys entered and set the netatmo "app" active.
I'm using two NETATMO Stations, one with indoor+outdoor module, the second with indoor+outdoor+rain module.
I installed weewx + weewx-netatmo modules and configured the NETATMO part, no other configurations were done by me.
After starting weewx service i got the first generated reports after about 5 mins with data.
After checking the Data i found interesting mix of output, i.e. Outside temp from Module 1, inside temp from Module 2, and so on.
Is there any problem with the weewx-netatmo module when there is more than one NETATMO station?
Here some log-output from debugging test mode:
Jun 16 17:49:58 xubuntu-zfs wee_netatmo[8599]: netatmo: netatmo-client: url: https://api.netatmo.net/api/getstationsdata data: access_token=546d95881977598d5eb3d860%7C1beba35d4b9632ed7918a36bdeee9383 hdr: {'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8'}
Jun 16 17:49:59 xubuntu-zfs wee_netatmo[8599]: netatmo: netatmo-client: resp_obj: {u'body': {u'user': {u'mail': u'[email protected]', u'administrative': {u'lang': u'de-DE', u'reg_locale': u'de-AT', u'windunit': 0, u'feel_like_algo': 0, u'pressureunit': 0, u'country': u'AT', u'unit': 0}}, u'devices': [{u'last_setup': 1416468284, u'data_type': [u'Temperature', u'CO2', u'Humidity', u'Noise', u'Pressure'], u'last_upgrade': 1439971552, u'firmware': 132, u'date_setup': 1416468284, u'modules': [{u'last_setup': 1416468242, u'rf_status': 71, u'data_type': [u'Temperature', u'Humidity'], u'last_message': 1529164091, u'firmware': 44, u'dashboard_data': {u'date_min_temp': 1529118734, u'Temperature': 23.4, u'time_utc': 1529164053, u'temp_trend': u'stable', u'Humidity': 50, u'date_max_temp': 1529143189, u'min_temp': 12.5, u'max_temp': 27.4}, u'module_name': u'Au\xdfenmodul', u'battery_vp': 5240, u'_id': u'02:00:00:04:e5:cc', u'type': u'NAModule1', u'battery_percent': 68, u'last_seen': 1529164053}], u'co2_calibrating': False, u'last_status_store': 1529164099, u'wifi_status': 17, u'place': {u'timezone': u'Europe/Vienna', u'city': u'Linz', u'altitude': 261, u'location': [14.3130331, 48.2550091], u'country': u'AT'}, u'dashboard_data': {u'CO2': 2058, u'Temperature': 23, u'time_utc': 1529164059, u'pressure_trend': u'down', u'temp_trend': u'stable', u'Humidity': 66, u'Pressure': 1009.8, u'Noise': 38, u'AbsolutePressure': 979, u'date_max_temp': 1529107528, u'min_temp': 20.1, u'date_min_temp': 1529126331, u'max_temp': 23.1}, u'cipher_id': u'enc:16:CCPhlZ4LjzbYveTobgYmd53oavmNAL3es2AcfP8xH+NVTY2PiyOFzH+/2KmZ5udd', u'module_name': u'Indoor', u'station_name': u'Wetter-LK', u'_id': u'70:ee:50:04:cb:c2', u'type': u'NAMain'}, {u'last_setup': 1524835848, u'data_type': [u'Temperature', u'CO2', u'Humidity', u'Noise', u'Pressure'], u'last_upgrade': 1525498902, u'firmware': 134, u'date_setup': 1524835848, u'modules': [{u'last_setup': 1524835614, u'rf_status': 74, u'data_type': [u'Temperature', u'Humidity'], u'last_message': 1529163885, u'firmware': 46, u'dashboard_data': {u'date_min_temp': 1529113641, u'Temperature': 12.5, u'time_utc': 1529163834, u'temp_trend': u'down', u'Humidity': 84, u'date_max_temp': 1529138763, u'min_temp': 8, u'max_temp': 21.2}, u'module_name': u'Outdoor-Reunion', u'battery_vp': 5954, u'_id': u'02:00:00:2c:e9:56', u'type': u'NAModule1', u'battery_percent': 98, u'last_seen': 1529163885}, {u'last_setup': 1525938257, u'rf_status': 73, u'data_type': [u'Rain'], u'last_message': 1529163885, u'firmware': 8, u'dashboard_data': {u'time_utc': 1529163872, u'sum_rain_24': 0, u'sum_rain_1': 0, u'Rain': 0}, u'module_name': u'LK-Reunion-Rain', u'battery_vp': 6044, u'_id': u'05:00:00:04:64:b0', u'type': u'NAModule3', u'battery_percent': 100, u'last_seen': 1529163885}], u'co2_calibrating': False, u'last_status_store': 1529163891, u'wifi_status': 55, u'place': {u'timezone': u'Indian/Reunion', u'city': u'La Plaine des Cafres', u'altitude': 1323, u'location': [55.5607501, -21.236416], u'country': u'RE'}, u'dashboard_data': {u'CO2': 505, u'Temperature': 20.8, u'time_utc': 1529163880, u'pressure_trend': u'stable', u'temp_trend': u'stable', u'Humidity': 60, u'Pressure': 1033.6, u'Noise': 43, u'AbsolutePressure': 881.4, u'date_max_temp': 1529155413, u'min_temp': 18.4, u'date_min_temp': 1529122153, u'max_temp': 21.8}, u'cipher_id': u'enc:16:58sD8hoDQHY0W158VIn4UafeyoqdH65MiKbOMmIAv7SumpZfDfNHTal/bvkn11Qv', u'module_name': u'Indoor', u'station_name': u'JK-Reunion', u'_id': u'70:ee:50:2c:d3:d6', u'type': u'NAMain'}]}, u'status': u'ok', u'time_exec': 0.12150311470032, u'time_server': 1529164198}
Jun 16 17:49:59 xubuntu-zfs wee_netatmo[8599]: netatmo: netatmo-client: cloud units: {'windunit': 0, 'unit': 0, 'pressureunit': 0}
Jun 16 17:49:59 xubuntu-zfs wee_netatmo[8599]: netatmo: netatmo-client: next update in 300 seconds
Jun 16 17:49:59 xubuntu-zfs wee_netatmo[8599]: netatmo: MainThread: data: {u'70:ee:50:04:cb:c2.NAMain.Noise': 38, u'02:00:00:2c:e9:56.NAModule1.last_seen': 1529163885, u'02:00:00:04:e5:cc.NAModule1._id': u'02:00:00:04:e5:cc', u'02:00:00:04:e5:cc.NAModule1.Humidity': 50, u'70:ee:50:2c:d3:d6.NAMain.date_setup': 1524835848, u'05:00:00:04:64:b0.NAModule3.last_setup': 1525938257, u'70:ee:50:04:cb:c2.NAMain.date_setup': 1416468284, u'02:00:00:2c:e9:56.NAModule1.last_setup': 1524835614, u'02:00:00:2c:e9:56.NAModule1.firmware': 46, u'02:00:00:04:e5:cc.NAModule1.battery_percent': 68, u'70:ee:50:2c:d3:d6.NAMain.firmware': 134, u'05:00:00:04:64:b0.NAModule3.Rain': 0.0, u'02:00:00:2c:e9:56.NAModule1.Temperature': 12.5, u'70:ee:50:2c:d3:d6.NAMain.wifi_status': 55, u'70:ee:50:2c:d3:d6.NAMain.CO2': 505, u'02:00:00:04:e5:cc.NAModule1.module_name': u'Au\xdfenmodul', u'02:00:00:04:e5:cc.NAModule1.battery_vp': 5240, u'70:ee:50:2c:d3:d6.NAMain.co2_calibrating': False, u'70:ee:50:04:cb:c2.NAMain.CO2': 2058, u'05:00:00:04:64:b0.NAModule3.sum_rain_24': 0.0, u'05:00:00:04:64:b0.NAModule3.battery_percent': 100, u'70:ee:50:2c:d3:d6.NAMain.AbsolutePressure': 881.4, u'70:ee:50:2c:d3:d6.NAMain.Noise': 43, u'70:ee:50:2c:d3:d6.NAMain.time_utc': 1529163880, u'70:ee:50:04:cb:c2.NAMain.Humidity': 66, u'05:00:00:04:64:b0.NAModule3.time_utc': 1529163872, u'70:ee:50:2c:d3:d6.NAMain._id': u'70:ee:50:2c:d3:d6', u'02:00:00:2c:e9:56.NAModule1._id': u'02:00:00:2c:e9:56', u'70:ee:50:04:cb:c2.NAMain.AbsolutePressure': 979, u'05:00:00:04:64:b0.NAModule3.battery_vp': 6044, u'70:ee:50:04:cb:c2.NAMain._id': u'70:ee:50:04:cb:c2', u'02:00:00:04:e5:cc.NAModule1.Temperature': 23.4, u'70:ee:50:04:cb:c2.NAMain.last_status_store': 1529164099, u'70:ee:50:04:cb:c2.NAMain.Temperature': 23, u'02:00:00:2c:e9:56.NAModule1.module_name': u'Outdoor-Reunion', u'70:ee:50:04:cb:c2.NAMain.last_setup': 1416468284, u'70:ee:50:04:cb:c2.NAMain.time_utc': 1529164059, u'05:00:00:04:64:b0.NAModule3.rf_status': 73, u'02:00:00:04:e5:cc.NAModule1.rf_status': 71, u'70:ee:50:2c:d3:d6.NAMain.module_name': u'Indoor', u'70:ee:50:2c:d3:d6.NAMain.Temperature': 20.8, u'02:00:00:04:e5:cc.NAModule1.last_seen': 1529164053, u'02:00:00:04:e5:cc.NAModule1.last_setup': 1416468242, u'70:ee:50:04:cb:c2.NAMain.last_upgrade': 1439971552, u'70:ee:50:2c:d3:d6.NAMain.Humidity': 60, u'70:ee:50:04:cb:c2.NAMain.wifi_status': 17, u'05:00:00:04:64:b0.NAModule3._id': u'05:00:00:04:64:b0', u'70:ee:50:04:cb:c2.NAMain.firmware': 132, u'02:00:00:04:e5:cc.NAModule1.firmware': 44, u'02:00:00:2c:e9:56.NAModule1.Humidity': 84, u'70:ee:50:04:cb:c2.NAMain.module_name': u'Indoor', u'05:00:00:04:64:b0.NAModule3.last_seen': 1529163885, u'70:ee:50:04:cb:c2.NAMain.Pressure': 1009.8, u'70:ee:50:2c:d3:d6.NAMain.last_setup': 1524835848, u'02:00:00:2c:e9:56.NAModule1.battery_vp': 5954, u'05:00:00:04:64:b0.NAModule3.module_name': u'LK-Reunion-Rain', u'02:00:00:2c:e9:56.NAModule1.time_utc': 1529163834, u'70:ee:50:04:cb:c2.NAMain.co2_calibrating': False, u'02:00:00:2c:e9:56.NAModule1.battery_percent': 98, u'70:ee:50:2c:d3:d6.NAMain.Pressure': 1033.6, u'70:ee:50:2c:d3:d6.NAMain.last_status_store': 1529163891, u'05:00:00:04:64:b0.NAModule3.firmware': 8, u'05:00:00:04:64:b0.NAModule3.sum_rain_1': 0.0, u'02:00:00:04:e5:cc.NAModule1.time_utc': 1529164053, u'02:00:00:2c:e9:56.NAModule1.rf_status': 74, u'70:ee:50:2c:d3:d6.NAMain.last_upgrade': 1525498902}
Jun 16 17:49:59 xubuntu-zfs wee_netatmo[8599]: netatmo: MainThread: packet: {'inTemp': 23, 'noise': 38, 'co2': 505, 'outTemp': 12.5, 'outHumidity': 50, 'outTempBatteryStatus': 68, 'rain': 0.0, 'dateTime': 1529164199, 'pressure': 881.4, 'wifi_status': 55, 'rain_rf_status': 73, 'out_battery_vp': 5240, 'rain_battery_vp': 6044, 'inHumidity': 66, 'rainBatteryStatus': 100, 'rain_total': 0.0, 'usUnits': 16, 'out_rf_status': 71}
Jun 16 17:50:50 xubuntu-zfs weewx[25402]: manager: Added record 2018-06-16 17:50:00 CEST (1529164200) to database 'weewx.sdb'
Jun 16 17:50:50 xubuntu-zfs weewx[25402]: manager: Added record 2018-06-16 17:50:00 CEST (1529164200) to daily summary in 'weewx.sdb'
Hi!
I installed weewx and the Netatmo driver on my Raspberry Pi. I've been able to get weewx working fine in simulator mode, but haven't been able to get the Netatmo driver working. I looked at my SYSLOG (see end of my post below) and it is reporting "HTTP Error 400:Bad Request". So I assume that there's some problem retrieving data using the Netatmo API.
I checked /etc/weewx/weewx.config and noticed that the Netatmo section at the end of the file still had default values (e.g., "INSERT_USERNAME_HERE") in the four required keys. I tried manually updating those values in the config file with the correct username, password, client_id, and client_secret values, but that didn't fix the problem. I had originally used wee_config to set up those keys after I installed the Netatmo driver, so I don't know why they didn't get updated (or do they get updated somewhere else?).
Do you have any suggestions about what's wrong and how I can fix it?
Thanks!
-Dave
-----SYSLOG OUTPUT-----
Dec 26 13:41:22 raspberrypi weewx[7827]: netatmo: netatmo-client: failed attempt 1 of 5 to get data: HTTP Error 400: Bad Request
Dec 26 13:41:33 raspberrypi weewx[7827]: netatmo: netatmo-client: failed attempt 2 of 5 to get data: HTTP Error 400: Bad Request
Dec 26 13:41:44 raspberrypi weewx[7827]: netatmo: netatmo-client: failed attempt 3 of 5 to get data: HTTP Error 400: Bad Request
Dec 26 13:41:55 raspberrypi weewx[7827]: netatmo: netatmo-client: failed attempt 4 of 5 to get data: HTTP Error 400: Bad Request
Dec 26 13:42:07 raspberrypi weewx[7827]: netatmo: netatmo-client: failed attempt 5 of 5 to get data: HTTP Error 400: Bad Request
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.