Page 5 of 8
Re: Python script for Netatmo weather station
Posted: Sunday 31 May 2015 15:08
by krazny
Does anyone else also has the problem his Netatmo_settings.xml file is being reset to default?
Every x days (mostly 3/4) the settings file is filled with my devices but ist overwritten with black values.
To fix this I need to re-enter my client_id, password, hardware id's ..etc.
This is happening since last week...
:/
Re: Python script for Netatmo weather station
Posted: Sunday 31 May 2015 17:22
by panser
Hi,
I have tried several times now to include my netatmo sensors in Domoticz. I am not able to get the sensors in "devices" in domotics. I have no idea what im doing wrong. Please can someone help me out?
This is how my netatmo_settings.xml looks like, also with the error message:
Thanks a lot in advance. I really look forward to finally have my netatmo sensors avilable in Domoticz!!
Now I'm able to run the script with no errors:
root@domoticzpi:~# python /home/pi/domoticz/scripts/netatmo.py
root@domoticzpi:~#
However there are still no "NetAtmo" devices in http://domo_ip:8080/#/Devices
Re: Python script for Netatmo weather station
Posted: Sunday 31 May 2015 21:48
by krazny
panser wrote:Hi,
I have tried several times now to include my netatmo sensors in Domoticz. I am not able to get the sensors in "devices" in domotics. I have no idea what im doing wrong. Please can someone help me out?
This is how my netatmo_settings.xml looks like, also with the error message:
Thanks a lot in advance. I really look forward to finally have my netatmo sensors avilable in Domoticz!!

It all looks OK to me.
Are u 110% sure your hardware ID of your dummy hardware is correct?
Re: Python script for Netatmo weather station
Posted: Sunday 31 May 2015 22:38
by panser
Yes, it should be "5" - i have Even tried to add a second one "6" - same result
Code: Select all
{
"Address" : "",
"DataTimeout" : 0,
"Enabled" : "true",
"Mode1" : 0,
"Mode2" : 0,
"Mode3" : 0,
"Mode4" : 0,
"Mode5" : 0,
"Mode6" : 0,
"Name" : "NetAtmo",
"Password" : "",
"Port" : 1,
"SerialPort" : "1",
"Type" : 15,
"Username" : "",
"idx" : "5"
}
Re: Python script for Netatmo weather station
Posted: Monday 01 June 2015 16:04
by panser
krazny wrote:Does anyone else also has the problem his Netatmo_settings.xml file is being reset to default?
Every x days (mostly 3/4) the settings file is filled with my devices but ist overwritten with black values.
To fix this I need to re-enter my client_id, password, hardware id's ..etc.
This is happening since last week...
:/
I have no clue, but maybe you could try to write protect the file?
chattr +i netatmo_settings.xml
Not sure if the Python script needs write permission to xml every run?
Re: Python script for Netatmo weather station
Posted: Monday 01 June 2015 20:03
by krazny
panser wrote:krazny wrote:Does anyone else also has the problem his Netatmo_settings.xml file is being reset to default?
Every x days (mostly 3/4) the settings file is filled with my devices but ist overwritten with black values.
To fix this I need to re-enter my client_id, password, hardware id's ..etc.
This is happening since last week...
:/
I have no clue, but maybe you could try to write protect the file?
chattr +i netatmo_settings.xml
Not sure if the Python script needs write permission to xml every run?
Thnx for your suggestion.
I've now reset the rights to 0444 (read only).
So far, so good.
* It's still weird though..
Re: Python script for Netatmo weather station
Posted: Monday 01 June 2015 20:36
by krazny
krazny wrote:Does anyone else also has the problem his Netatmo_settings.xml file is being reset to default?
Every x days (mostly 3/4) the settings file is filled with my devices but ist overwritten with black values.
To fix this I need to re-enter my client_id, password, hardware id's ..etc.
This is happening since last week...
:/
Hmzz...after a full update of my rPi (sudo apt-get update, sudo apt-get upgrade, sudo rpi-update) and a reboot the problem seems to be gone.
Edit:
Nope!
It's still s*cks. After a few hours the netatmo_settings.xml is missing my credentials, etc again.

Re: Python script for Netatmo weather station
Posted: Thursday 04 June 2015 21:41
by alfredo
Hi,
I started using this app 26. may, and it worked untill 1. june.
Then it suddenly stopped working, and won't give me any feedback no matter what I do.
Have this happened to somebody else? Did something change?
Running on Domoticz 2.2492, under Debian Jessie in a VM.
Re: Python script for Netatmo weather station
Posted: Thursday 04 June 2015 21:47
by fwehrle
Probably the netatmo api. I'll check it. Thank you
Re: Python script for Netatmo weather station
Posted: Thursday 04 June 2015 21:54
by krazny
alfredo wrote:Hi,
I started using this app 26. may, and it worked untill 1. june.
Then it suddenly stopped working, and won't give me any feedback no matter what I do.
Have this happened to somebody else? Did something change?
Running on Domoticz 2.2492, under Debian Jessie in a VM.
Check your netatmo_settings.xml file. Is it also missing your credentials?
Re: Python script for Netatmo weather station
Posted: Thursday 04 June 2015 22:06
by alfredo
fwehrle wrote:Probably the netatmo api. I'll check it. Thank you
Can it be that though, since it works for others?
krazny wrote:Check your netatmo_settings.xml file. Is it also missing your credentials?
The same "gibberish" there now that was there before!
I tried deleting token.xml, and re-ran the script - token is generated but nothing happens on domoticz-end.
I'm not sure if theres a debug-switch or the likes I can use? There's no output from the script what-so-ever....
Re: Python script for Netatmo weather station
Posted: Friday 05 June 2015 0:20
by brakc
Hello,
Netatmo doesn't work since fews days

Domoticz 2516
All devices are off, no data. and xml file doesn't generate ...
Re: Python script for Netatmo weather station
Posted: Friday 05 June 2015 12:08
by Mediacj
For me the same since june 1 I think Netatmo has changed the api.
I have looked in the program but couldn't find anything myself, hopefully someone else can find it.
Re: Python script for Netatmo weather station
Posted: Friday 05 June 2015 13:00
by krazny
alfredo wrote:fwehrle wrote:Probably the netatmo api. I'll check it. Thank you
I tried deleting token.xml, and re-ran the script - token is generated but nothing happens on domoticz-end.
I'm not sure if theres a debug-switch or the likes I can use? There's no output from the script what-so-ever....
Last monday I started all over again and at first it worked. XML is filled with my devices and the hardware was added to Domoticz.
After a few hours its broken again...no updates.
Mostly because the XML file is missing my credentials. These are overwritten b with blank values.
Really hope someone can fix this or knows how to fix this.
Re: Python script for Netatmo weather station
Posted: Friday 05 June 2015 18:48
by RFAH
Hallo,
I also had the problem that my sensors in Domoticz recieved no values.
Also no error was shown.
However, recently Netatmo only accepts https calls and does not support http anymore.
In the netatmo.py script, there are two records with http (line 20 and 21 in my script). I changed that to https and my problem was solved.
Hope this will do the trick for you as well.
I did not have the problem that my settings where gone.
Re: Python script for Netatmo weather station
Posted: Friday 05 June 2015 22:09
by RFAH
Hello,
I just updated Domoticz from version 2.2514 to version 2.2525. With version 2.2525, Domoticz does not receive any values.
Restart and so on does not help.
I restored a previous version (restore an image) and the Domoticz (version 2.2418) does recieve the information again.
So may something in Domoticz has changed?
Re: Python script for Netatmo weather station
Posted: Friday 05 June 2015 22:53
by alfredo
Just for the "fun" of it, I updated to latest SVN (2.2525) and it still doesn't work.
Nothing in the log from domoticz either...
I'm thinking that a debug-log/option somewhere would have helped?
Re: Python script for Netatmo weather station
Posted: Friday 05 June 2015 23:13
by fwehrle
RFAH wrote:Hallo,
I also had the problem that my sensors in Domoticz recieved no values.
Also no error was shown.
However, recently Netatmo only accepts https calls and does not support http anymore.
In the netatmo.py script, there are two records with http (line 20 and 21 in my script). I changed that to https and my problem was solved.
Hope this will do the trick for you as well.
I did not have the problem that my settings where gone.
Ho yes !!
I completly forget it. You're right : netatmo sent me an email few weeks ago.
Replacing http by https in the 2 url do the trick. Thank you
Re: Python script for Netatmo weather station
Posted: Saturday 06 June 2015 11:06
by RFAH
I just found a topic (Json call fail after update) which could be the problem we have if no values are recieved anymore in Domoticz
and if you are using https in stead of http.
http://www.domoticz.com/forum/viewtopic ... ate#p45060
Accoording to this topic, you now need to add the idx if you have Domoticz version 2.2523 or higher.
Because netatmo.py also uses json calls this may be the problem.
I'm not a programmer, so i'm not sure.
Re: Python script for Netatmo weather station
Posted: Saturday 06 June 2015 11:44
by hfbilly
I can confirm this as well. The following call with fails. Note the url below is used by the netatmo script to update the value.
http://192.168.178.31:8080/json.htm?typ ... value=21.2
{
status: "ERR"
}
the following is successfull
http://192.168.178.31:8080/json.htm?typ ... .2&idx=206
{
status: "OK",
title: "Update Device"
}
I have been trying to see if i can get the idx in there but unfortunately the only thing i know about python is they live in the zoo
