i don’t understand. Addon seems to work, except the Internal server error, which i have never seen.
You must have configured the stations in stations.yaml, which is located in \addon_configs\adaeefb4_nfws\ . Also netatmo_token.yaml is there, the content is in your screenshot.
but it looks like your stations.yaml doesn’t have sensor part. In your log, there is a "Registering: " part missing. Can you post your stations.yaml?
you can open a issue here: Issues · GiZMoSK1221/hass-addons · GitHub
Hello. Thank you for this great extension and for your help.
Everything worked perfectly until 2 days back.
Not sure what happened. I also updated git repository with code, logged to my netatmo account (they changed rules so I need to accept).
But I still see not updated value from my favorite weather station. Is there something what I missed?
In logs I just see:
Feb 18 16:43:43 hawat python3[1877639]: 18.02.2025 16:43:43 Starting Netatmo service
Feb 18 16:43:43 hawat python3[1877639]: Run mode: local
Feb 18 16:43:43 hawat python3[1877639]: Config dir:
Feb 18 16:43:43 hawat python3[1877639]: 18.02.2025 16:43:43 Connected to mqtt broker
Feb 18 16:43:43 hawat python3[1877639]: 18.02.2025 16:43:43 Connected to mqtt broker - mqtt_on_connect
and nothing more.
Ok. Looks like netatmo just lost my tokens. But I’m not able to refresh them according to documentation. Strange. But I don’t still give up :).
it looks like there must have been a problem in netatmo API. Addon was stopped since yesterday with these errors:
traceback (most recent call last):
File “/usr/lib/python3.10/site-packages/requests/models.py”, line 974, in json
return complexjson.loads(self.text, **kwargs)
File “/usr/lib/python3.10/json/init.py”, line 346, in loads
return _default_decoder.decode(s)
File “/usr/lib/python3.10/json/decoder.py”, line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python3.10/json/decoder.py”, line 355, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/bin/nfws.py”, line 735, in
json_netatmo = netatmo_getdata()
File “/usr/bin/nfws.py”, line 498, in netatmo_getdata
json_netatmo = response.json()
File “/usr/lib/python3.10/site-packages/requests/models.py”, line 978, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
[13:05:04] WARNING: Halt add-on with exit code 1
I started it again and it is running. Tokens were valid.
check troubleshooting section here: hass-addons/nfws/DOCS.md at ed0dbc113dac4d28322977a7b1edc1dea3ec8cf4 · GiZMoSK1221/hass-addons · GitHub
Thanks.
First, It looks like it hanged on ipv6 connection to netatmo servers. I disabled ipv6 for now.
I just did what is in manual and end up with:
18.02.2025 18:10:56 Starting Netatmo service
Run mode: local
Config dir:
18.02.2025 18:10:56 Connected to mqtt broker - mqtt_on_connect
18.02.2025 18:10:56 Connected to mqtt broker
{
"access_token": "REMOVED",
"expire_in": 10800,
"expires_in": 10800,
"refresh_token": "REMOVED",
"scope": [
"read_station"
]
}
18.02.2025 18:10:56 get data
18.02.2025 18:10:56 Connected to mqtt broker - mqtt_on_connect
18.02.2025 18:10:56 Connected to mqtt broker
18.02.2025 18:10:56 Invalid access token or expired:Invalid access token
Netatmo refresh_token: Wrong response code 400
{'error': 'invalid_grant'}
Retry in 1 min again
I regenerated tokens in Netatmo web, removed netatmo_token.yaml, removed oauth token, restarted, gained code from url and then restarted again.
No luck so far.
Heh. After refresh, seems like tokens are gone from netatmo admin site :D.
Ok. It seems like there was problem with redir url. I was forced to create new app and fill redir url. After filling redir-url and triggered bug (wrong url generated - i need to update it manually) in this extension, it seems like I was able to obtain working code and everything work again.
i’m glad to hear, that everything works. When I have more time, i will try to install the addon from scratch and check the installations steps
Hi. Would be nice. Because I’m back on start :). After server reboot and some time, I triggered same issue.
I’m going to make better notes how to make it work.
Thank you for your time and this great addon.
Hi, I’m unable to get MQTT to discover any sensors or stations. The addon log shows that the configuration is in config/ instead of config/nfws. The station.yaml file is located in addon_config/adaeefb4_nfws.
netatmo_stations:
"70:ee:50:36:ba:a8":
name: Jona #name will be nfws_name_station1_...
sensors: #WindAngle, WindAngleCompass, WindAngleCompassSymbol, GustAngle, GustAngleCompass, GustAngleCompassSymbol, Humidity, Pressure, rain, sum_rain_1, sum_rain_24, WindStrength, GustStrength, Temperature
- WindStrength #name will be nfws_name_station1_WindStrength
- WindAngleCompass
- WindAngleCompassSymbol
- GustStrength
- GustAngleCompass
- GustAngleCompassSymbol
- Humidity
- rain
- sum_rain_1
- sum_rain_24
calculated_sensors: #sensor name = nfws_function_sensor_suffix
- function: min #min, max, avg, first
sensors:
- Temperature #any sensor
- Humidity
suffix: "" #define if you need to have more sensors of one kind/function
stations:
- "70:ee:50:36:ba:a8"
- function: first #especially for wind station, which often disappears
suffix: ""
timeDelta: 30 #netatmo sensor data shoudn't be older than timeDelta (in min). Compared to dashboard_data.time_utc. Default is 30min
sensors:
- WindStrength #only first sensor will be evaluated
- WindAngleCompass #next sensors will be taken from same station+module
- WindAngleCompassSymbol
- WindAngle
- GustStrength
- GustAngleCompass
- GustAngleCompassSymbol
stations: #ordered list
- "70:ee:50:36:ba:a8"
Thanks in advance
can you add to addon configuration tab, into netatmo section line with show_response:
oauth_code: xx
show_response: true
then restart addon and send me the response from log (remove you email from reponse)? then remove the line
scope": [
“read_station”
]
}
13.04.2025 20:57:37 get data
{‘body’: {‘devices’: [{‘_id’: ‘70:ee:50:36:ba:a8’, ‘station_name’: ‘Jona (Pasillo)’, ‘type’: ‘NAMain’, ‘last_status_store’: 1744570044, ‘reachable’: True, ‘favorite’: True, ‘data_type’: [‘Pressure’], ‘place’: {‘altitude’: 515, ‘city’: ‘Vitoria-Gasteiz’, ‘country’: ‘ES’, ‘timezone’: ‘Europe/Madrid’, ‘location’: [-2.708065, 42.850138]}, ‘read_only’: True, ‘dashboard_data’: {‘time_utc’: 1744570040, ‘Pressure’: 1005.9, ‘AbsolutePressure’: 946, ‘pressure_trend’: ‘stable’}, ‘modules’: [{‘_id’: ‘06:00:00:03:40:3c’, ‘type’: ‘NAModule2’, ‘data_type’: [‘Wind’], ‘reachable’: True, ‘last_message’: 1744570038, ‘last_seen’: 1744570038, ‘dashboard_data’: {‘time_utc’: 1744570038, ‘WindStrength’: 11, ‘WindAngle’: 317, ‘GustStrength’: 17, ‘GustAngle’: 330, ‘max_wind_str’: 24, ‘max_wind_angle’: 330, ‘date_max_wind_str’: 1744557624}}, {‘_id’: ‘05:00:00:04:e9:b0’, ‘type’: ‘NAModule3’, ‘data_type’: [‘Rain’], ‘reachable’: True, ‘last_message’: 1744570039, ‘last_seen’: 1744570039, ‘dashboard_data’: {‘time_utc’: 1744570039, ‘Rain’: 0, ‘sum_rain_1’: 0, ‘sum_rain_24’: 4.4}}, {‘_id’: ‘02:00:00:b5:93:34’, ‘type’: ‘NAModule1’, ‘data_type’: [‘Temperature’, ‘Humidity’], ‘reachable’: True, ‘last_message’: 1744570039, ‘last_seen’: 1744570013, ‘dashboard_data’: {‘time_utc’: 1744570013, ‘Temperature’: 11, ‘Humidity’: 87, ‘min_temp’: 11, ‘max_temp’: 13.9, ‘date_max_temp’: 1744550324, ‘date_min_temp’: 1744569398, ‘temp_trend’: ‘stable’}}]}], ‘user’: {‘mail’: ‘@gmail.com’, ‘administrative’: {‘lang’: ‘es’, ‘reg_locale’: ‘es-ES’, ‘country’: ‘ES’, ‘unit’: 0, ‘windunit’: 0, ‘pressureunit’: 0, ‘feel_like_algo’: 0}}}, ‘status’: ‘ok’, ‘time_exec’: 0.05871391296386719, ‘time_server’: 1744570657}
Not used station id: 70:ee:50:36:ba:a8, name: Jona (Pasillo)
I found this in the mosquito-broker addon log, I don’t know if it’s what I’m looking for
2025-04-13 22:30:34: New connection from 172.30.32.2:57176 on port 1883.
2025-04-13 22:30:34: Client closed its connection.
2025-04-13 22:32:34: New connection from 172.30.32.2:36132 on port 1883.
2025-04-13 22:32:34: Client closed its connection.
2025-04-13 22:34:34: New connection from 172.30.32.2:37214 on port 1883.
2025-04-13 22:34:34: Client closed its connection.
2025-04-13 22:36:34: New connection from 172.30.32.2:56824 on port 1883.
2025-04-13 22:36:34: Client closed its connection.
2025-04-13 22:38:34: New connection from 172.30.32.2:56328 on port 1883.
2025-04-13 22:38:34: Client closed its connection.
2025-04-13 22:40:34: New connection from 172.30.32.2:58716 on port 1883.
2025-04-13 22:40:34: Client closed its connection.
2025-04-13 22:42:34: New connection from 172.30.32.2:38400 on port 1883.
2025-04-13 22:42:34: Client closed its connection.
2025-04-13 22:44:34: New connection from 172.30.32.2:40954 on port 1883.
2025-04-13 22:44:34: Client closed its connection
Thanks
no, it looks like station 70:ee:50:36:ba:a8 from response is not paired to same station in config.
That means message: “Not used station id: 70:ee:50:36:ba:a8, name: Jona (Pasillo)”
Can you try to add one more favourite station on netatmo page and also add it to config, only with temperature?
I don’t know if I added the other station correctly
netatmo_stations:
"70:ee:50:b9:41:20":
name: Mi_casa #name will be nfws_name_station1_...
sensors: #WindAngle, WindAngleCompass, WindAngleCompassSymbol, GustAngle, GustAngleCompass, GustAngleCompassSymbol, Humidity, Pressure, rain, sum_rain_1, sum_rain_24, WindStrength, GustStrength, Temperature, min_temp, max_temp
- WindStrength #name will be nfws_name_station1_WindStrength
- WindAngleCompass
- WindAngleCompassSymbol
- GustStrength
- GustAngleCompass
- GustAngleCompassSymbol
- Humidity
- rain
- sum_rain_1
- sum_rain_24
"70:ee:50:71:44:6a":
name: Casa
sensors:
- Temperature
calculated_sensors: #sensor name = nfws_function_sensor_suffix
- function: min #min, max, avg, first
sensors:
- Temperature #any sensor
- Humidity
suffix: "" #define if you need to have more sensors of one kind/function
stations:
- "70:ee:50:b9:41:20"
- "70:ee:50:71:44:6a"
- function: first #especially for wind station, which often disappears
suffix: ""
timeDelta: 30 #netatmo sensor data shoudn't be older than timeDelta (in min). Compared to dashboard_data.time_utc. Default is 30min
sensors:
- WindStrength #only first sensor will be evaluated
- WindAngleCompass #next sensors will be taken from same station+module
- WindAngleCompassSymbol
- WindAngle
- GustStrength
- GustAngleCompass
- GustAngleCompassSymbol
stations: #ordered list
- "70:ee:50:b9:41:20"
- "70:ee:50:71:44:6a"
14.04.2025 11:08:28 get data
{‘body’: {‘devices’: [{‘_id’: ‘70:ee:50:b9:41:20’, ‘station_name’: ‘Mi casa (Estación meteorológica)’, ‘type’: ‘NAMain’, ‘last_status_store’: 1744621689, ‘reachable’: True, ‘favorite’: True, ‘data_type’: [‘Pressure’], ‘place’: {‘altitude’: 523, ‘city’: ‘Vitoria-Gasteiz’, ‘country’: ‘ES’, ‘timezone’: ‘Europe/Madrid’, ‘location’: [-2.6802699000000385, 42.8445539]}, ‘read_only’: True, ‘dashboard_data’: {‘time_utc’: 1744621688, ‘Pressure’: 1002.6, ‘AbsolutePressure’: 942, ‘pressure_trend’: ‘down’}, ‘modules’: [{‘_id’: ‘02:00:00:b9:2e:b8’, ‘type’: ‘NAModule1’, ‘data_type’: [‘Temperature’, ‘Humidity’], ‘reachable’: True, ‘last_message’: 1744621687, ‘last_seen’: 1744621661, ‘dashboard_data’: {‘time_utc’: 1744621661, ‘Temperature’: 14.8, ‘Humidity’: 71, ‘min_temp’: 8.5, ‘max_temp’: 16.8, ‘date_max_temp’: 1744617713, ‘date_min_temp’: 1744607459, ‘temp_trend’: ‘down’}}, {‘_id’: ‘05:00:00:0c:3e:4e’, ‘type’: ‘NAModule3’, ‘data_type’: [‘Rain’], ‘reachable’: False, ‘last_message’: 1744609600, ‘last_seen’: 1744609593}, {‘_id’: ‘06:00:00:08:2b:0e’, ‘type’: ‘NAModule2’, ‘data_type’: [‘Wind’], ‘reachable’: True, ‘last_message’: 1744621687, ‘last_seen’: 1744621687, ‘dashboard_data’: {‘time_utc’: 1744621687, ‘WindStrength’: 3, ‘WindAngle’: 41, ‘GustStrength’: 4, ‘GustAngle’: 41, ‘max_wind_str’: 10, ‘max_wind_angle’: 90, ‘date_max_wind_str’: 1744583760}}]}, {‘_id’: ‘70:ee:50:71:44:6a’, ‘station_name’: ‘Casa (Wether Station)’, ‘type’: ‘NAMain’, ‘last_status_store’: 1744621591, ‘reachable’: True, ‘favorite’: True, ‘data_type’: [‘Pressure’], ‘place’: {‘altitude’: 511, ‘city’: ‘Vitoria-Gasteiz’, ‘country’: ‘ES’, ‘timezone’: ‘Europe/Madrid’, ‘location’: [-2.687409, 42.860641]}, ‘read_only’: True, ‘dashboard_data’: {‘time_utc’: 1744621590, ‘Pressure’: 1003.8, ‘AbsolutePressure’: 944.5, ‘pressure_trend’: ‘down’}, ‘modules’: [{‘_id’: ‘02:00:00:71:30:ea’, ‘type’: ‘NAModule1’, ‘data_type’: [‘Temperature’, ‘Humidity’], ‘reachable’: True, ‘last_message’: 1744621591, ‘last_seen’: 1744621571, ‘dashboard_data’: {‘time_utc’: 1744621571, ‘Temperature’: 14.8, ‘Humidity’: 76, ‘min_temp’: 10.4, ‘max_temp’: 16.9, ‘date_max_temp’: 1744617316, ‘date_min_temp’: 1744607165, ‘temp_trend’: ‘down’}}, {‘_id’: ‘06:00:00:07:24:50’, ‘type’: ‘NAModule2’, ‘data_type’: [‘Wind’], ‘reachable’: True, ‘last_message’: 1744621591, ‘last_seen’: 1744621591, ‘dashboard_data’: {‘time_utc’: 1744621584, ‘WindStrength’: 1, ‘WindAngle’: 180, ‘GustStrength’: 2, ‘GustAngle’: 194, ‘max_wind_str’: 8, ‘max_wind_angle’: 57, ‘date_max_wind_str’: 1744584164}}, {‘_id’: ‘05:00:00:09:2f:28’, ‘type’: ‘NAModule3’, ‘data_type’: [‘Rain’], ‘reachable’: False, ‘last_message’: 1744614592, ‘last_seen’: 1744613112}]}], ‘user’: {‘mail’: ‘@gmail.com’, ‘administrative’: {‘lang’: ‘es’, ‘reg_locale’: ‘es-ES’, ‘country’: ‘ES’, ‘unit’: 0, ‘windunit’: 0, ‘pressureunit’: 0, ‘feel_like_algo’: 0}}}, ‘status’: ‘ok’, ‘time_exec’: 1.206176996231079, ‘time_server’: 1744621708}
I had a problem with the text editor, and now it’s fixed. Everything works fine. I’m not sure if there’s a solution for my head. Excellent add-on, thank you very much.