Netatmo app errors

Hi, this is a snippet of what I get which seems to contain errors. I only have access to an iPad and am finding it hard to attach the whole log. I’ve obscured the credentials. Many thanks.

01 09/05/13 19:27:21.388 ctrl_chr[31;1mLuImplementation::StartLua running startup code for 134 I_Netatmo.xml failedctrl_chr[0m <0x2b6b5680>
Info Viewer ajax error - server status is: 200
Info Viewer ajax error - server status is: 200
Info Viewer ajax error - server status is: 500
Info Viewer ajax error - server status is: 500
Info Viewer ajax error - server status is: 500
****** Lua pattern is now set to: Netatmo ******
02 09/05/13 19:31:05.502 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.503 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.503 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.504 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.504 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.505 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.506 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.506 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
02 09/05/13 19:31:05.507 ctrl_chr[33;1mDevice_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1ctrl_chr[0m <0x2b72a000>
09 09/05/13 19:31:14.042 JobHandler_LuaUPnP::Run device 134 Netatmo room 21 type urn:akbooer-com:device:netatmo:1 id parent 0/0xa54468 upnp: 0 <0x2b72a000>
50 09/05/13 19:31:38.103 luup_log:114: device # 134: supports TemperatureSensor1; set watch on variable ‘CurrentTemperature’ for Netatmo <0x2be5d680>
06 09/05/13 19:31:38.379 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mVersionctrl_chr[0m was: 2013.09.01 @akbooer now: 2013.09.01 @akbooer #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 LEAK this:167936 start:1630208 to 0x1744000 <0x2be5d680>
06 09/05/13 19:31:38.379 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mjsonLibraryctrl_chr[0m was: json-dm now: json-dm #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.379 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mClientIDctrl_chr[0m was: 51c2a5bb187759203d00nnnn now: 51c2a5bb187759203d00nnnn #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.380 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mClientSecretctrl_chr[0m was: EfiQ85UIz4D3K32UfK1M4Ee2fGGhOcfQezFz7ayxxxxxx now: EfiQ85UIz4D3K32UfK1M4Ee2fGGhOcfQezFz7ayxxxxxx #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.380 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUsernamectrl_chr[0m was: robjsewell@mac.com now: robjsewell@mac.com #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.380 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mPasswordctrl_chr[0m was: xxxxxxxx now: xxxxxxxx #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.381 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mTokenRefreshctrl_chr[0m was: 120 now: 120 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.381 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mMeasurementPollctrl_chr[0m was: 10 now: 10 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.382 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mBlogFilenamectrl_chr[0m was: /www/Netatmo.txt now: /www/Netatmo.txt #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.382 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mTimeFormatctrl_chr[0m was: %a %H:%M now: %a %H:%M #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:38.382 Device_Variable::m_szValue_set device: 134 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mChildSensorsctrl_chr[0m was: THCPN now: THCPN #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
50 09/05/13 19:31:45.546 luup_log:134: Netatmo: creating child devices… LEAK this:151552 start:2138112 to 0x17c0000 <0x2be5d680>
50 09/05/13 19:31:45.548 luup_log:134: Netatmo: Child = 135 02:00:00:00:49:68-Temperature, units = C <0x2be5d680>
06 09/05/13 19:31:45.548 Device_Variable::m_szValue_set device: 135 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsctrl_chr[0m was: C now: C #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
06 09/05/13 19:31:45.549 Device_Variable::m_szValue_set device: 135 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsDisplayctrl_chr[0m was: (C) now: (C) #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2be5d680>
50 09/05/13 19:31:45.549 luup_log:134: Netatmo: Child = 136 02:00:00:00:49:68-Humidity, units = % <0x2be5d680>

So the high-level symptom is still no readings on the child devices?

I presume you must be using the InfoViewer or LogViewer plugin to retrieve the relevant sections of the log… these are the ajax errors on reboot.

The temperature and humidity devices are being created correctly, but the log stops short of the other children and, indeed, the final error (which I see from the previous run at the very top of your log snippet.) Do temperature and humidity, in fact, update correctly?

What is device 114 in your system? It is setting a watch on the temperature variable. dataMine perhaps?

It would be useful to have a log which continues up to the point of generating the error.

One thought: what names have you given to your Netatmo modules? I imagine that it is possible to generate an invalid Luup variable name if there are odd characters there - I didn’t check for this. I should have done so.

Again, sorry for the inconvenience.

PS: if you include a longer log it helps message formatting and copying if you place it in a code quote.

Could you as an experiment try changing"Master Bedroom" to just “Master” or “MasterBedroom” in the Netatmo.com setup ? I don’t think the space will go down well with Vera.

Thx, changed all names to for example, MasterBedroomTemperature, same results though…

You changed these not in the Vera UI, but at [url=http://my.netatmo.com/app]http://my.netatmo.com/app[/url] under the toolbox icon (top right) under My Stations (the module names there) ??

I note you were an early adopter of Netatmo hardware.
Can you check you are running the latest firmware (mine is 87 and 37 for the two units.)

I’d just like to say I’m grateful for and impressed by all your help. It’s clearly something on my system but still not working. I still have the original code that used Vcontainers, but the scene is now disabled, I’m assuming that shouldn’t interfere? Sorry, this is beyond me, the last programming I did was IBM Assembler/machine code!

You definitely shouldn’t have both the scene and the plugin running at the same time unless you have them registered as separate apps at Netatmo.com and use the correct client keys. But you say that is not the case and the scene is disabled.

I’m perplexed that the child devices (all of them???) seem to be correctly created and yet you get a startup error. Creating the children is the last thing that the startup code does apart from scheduling the access token rotation and device polling.

One more simple thing to try is to change the ChildSensors variable to blank and restart. The child devices should disappear. Does the startup error go away? Wait for ten minutes or so and see if the update time on the plugin device updates… that would indicate a definite problem with the children themselves.

Thanks. Will try this. I should add that the update time is blank as well at present. More later!

Ummm you won’t like this but… When I delete the child string, THCPN from memory, and restart, even restarting the whole Vera, the string is there again, as are the empty child devices. Also I forgot to say that the comms failure variable under advanced was set to 1. I changed it to 0 and restarted but no change. I also changed the clientid string in my old, disabled scene just to make sure it couldn’t interfere if it managed to get executed. So totally lost. Any value in deleting the app and re-installing? If so how would I do that?

Many thanks!

Hmmm. I’m away from my development system for a couple of weeks, so can’t try things out. If you just put TH what happens? You DO have to do a SAVE rather than a Restart in order to save those UI parameters. Did you do that? The comms error variable is not relevant… Just a by-product of any HA device type, and not used. What is the Polling interval parameter set to?

Under the APPS tab there should be an uninstall button to try, and then back to Install apps to put it back. But so much is working, just the tiny detail about not updating the measurements :wink: that I don’t think that’s the problem.

When I’m back online properly in a couple of weeks I can send a single Lua file update with more extensive diagnostic logging. But I’m still keen to find out if TH alone works, or each of the individual letters of T H C P N and then build up. In fact any string without T,H,C,P, or N in it eg “x” should work instead of blank, I’ve just realised, but you must SAVE for it to survive the restart.

OK, the problem seems to be with the pressure sensor units. If you make the sensor string THCN then it should work for the moment without that sensor. What units do you see for pressure from the Netatmo website or the iOS app itself? I think there was something missing from their documentation.

Debug ici : http://forum.micasaverde.com/index.php/topic,16276.new.html#new

Just got back to this and dropped the P from it. Refresh is set at 120 by the way, and all now works. So I guess whatever the pressure related bug you found Isis the issue. Look forward to your next update and many thanks!

Sent from my iPad using Tapatalk HD

Good news, and good timing… I am just back in front of my development system after a long break.

Could you try the latest L_Netatmo.lua file attached below, and put the P back.
I’m particularly interested in knowing:

[ol][li]Does it work?[/li]
[li]What does the log line 'user.administrative.pressureunit = ’ tell you?[/li]
[li]What pressure units does your Netatmo.com web interface (nothing to do with Vera) show?[/li][/ol]

Thanks.

Many thanks. I’ll need to get to my Mac to do this I think. The units are millibars. I’ll answer the other two questions soon!

Cheers, Rob

Sent from my iPad using Tapatalk HD

All working great now thank you, really appreciated.

I think the logs you were interested in are as below, apologies if not. I just cut and pasted two chunks that I thought were relevant.

50 09/19/13 21:44:32.627 luup_log:134: Netatmo: user.administrative.unit = 0 LEAK this:8192 start:2088960 to 0x1a30000 <0x2bc2f680>
50 09/19/13 21:44:32.628 luup_log:134: Netatmo: user.administrative.pressureunit = ? <0x2bc2f680>
50 09/19/13 21:44:32.629 luup_log:134: Netatmo: creating child devices… <0x2bc2f680>
50 09/19/13 21:44:32.632 luup_log:134: Netatmo: Child = 135 02:00:00:00:49:68-Temperature (C) <0x2bc2f680>

50 09/19/13 21:44:32.642 luup_log:134: Netatmo: Child = 142 70:ee:50:00:3d:52-CO2 (ppm) <0x2bc2f680>
06 09/19/13 21:44:32.643 Device_Variable::m_szValue_set device: 142 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsctrl_chr[0m was: ppm now: ppm #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2bc2f680>
06 09/19/13 21:44:32.643 Device_Variable::m_szValue_set device: 142 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsDisplayctrl_chr[0m was: (ppm) now: (ppm) #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2bc2f680>
50 09/19/13 21:44:32.643 luup_log:134: Netatmo: Child = 144 70:ee:50:00:3d:52-Noise (dB) <0x2bc2f680>
06 09/19/13 21:44:32.644 Device_Variable::m_szValue_set device: 144 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsctrl_chr[0m was: dB now: dB #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2bc2f680>
06 09/19/13 21:44:32.644 Device_Variable::m_szValue_set device: 144 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsDisplayctrl_chr[0m was: (dB) now: (dB) #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2bc2f680>
50 09/19/13 21:44:32.645 luup_log:134: Netatmo: Child = 146 70:ee:50:00:3d:52-Pressure (mbar) <0x2bc2f680>
06 09/19/13 21:44:32.646 Device_Variable::m_szValue_set device: 146 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mCalibrationOffsetctrl_chr[0m was: EMPTY now: 0 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc2f680>
06 09/19/13 21:44:32.675 Device_Variable::m_szValue_set device: 146 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsctrl_chr[0m was: EMPTY now: mbar #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc2f680>
06 09/19/13 21:44:32.676 Device_Variable::m_szValue_set device: 146 service: urn:akbooer-com:serviceId:Netatmo1 variable: ctrl_chr[35;1mUnitsDisplayctrl_chr[0m was: EMPTY now: (mbar) #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc2f680>
50 09/19/13 21:44:32.677 luup_log:134: Netatmo: …child devices created <0x2bc2f680>

Sent from my iPad using Tapatalk HD

Really good to hear - thanks for putting up with the hiatus.

I think the logs you were interested in are as below, apologies if not. I just cut and pasted two chunks that I thought were relevant.

[tt]50 09/19/13 21:44:32.628 luup_log:134: Netatmo: user.administrative.pressureunit = ? [/tt]

Yes indeed, that’s the culprit. Apparently the pressure unit setting is missing - why this is so, I have no idea, it’s there on mine. I thought I coded to catch this condition, but apparently not. I have now.

I have a few other things to test out before making another release (see http://forum.micasaverde.com/index.php/topic,16276.msg127538.html#msg127538) which you’re welcome to try when I post the files, but equally, you can just wait for others to be the guinea-pigs.

I’m just grateful you have taken the trouble to write it! Very much appreciated. Can’t wait now for Netatmo to release their rain and wind sensors, which supposedly is before Christmas.

If I may be cheeky enough to ask while I’m writing, do you know of an app or script to return the month or season of the year? I’d like to set some actions or scenes that only run in winter, or for me June to September (Southern Hemisphere winter).

Thanks for all your help and for sticking with it!

Sent from my iPad using Tapatalk HD

Strangely, I have answered that question before… see this thread:
http://forum.micasaverde.com/index.php/topic,14972.msg113727.html#msg113727

I hope it’s clear - if not ask again on that thread or start off a new one, we’ve certainly drifted off topic!