Netatmo on UI7

[quote=“akbooer, post:80, topic:185616”]If you download the attachment on this thread: [url=http://forum.micasaverde.com/index.php/topic,30478.0.html]http://forum.micasaverde.com/index.php/topic,30478.0.html[/url]

…and then upload to Vera using the Apps > Develop apps > Luup files > Upload button, then it should install that version.

Ask again if you still have problems (and welcome to the board!)[/quote]

Hi akbooer,
I have downloaded the file, and then I did upload it to “Loop files” on my Vera Egde (Firmware 1.7.1018) but the message is always the same: “Authorisation failed” and “Netatmo Lua Failure Can’t Detect Device”
I followed all your instructions but the plugin still does not work.

The test file was created and everything is correct
ClientID = 5522654a197759694b74d8d3
ClientSecret = vWuQXks3ttVFStk7nN4eCVEhmiTVZtDlqeiO2V2
Username = xxxxx@xxxx (overshadowed)
Password = xxxx (overshadowed)

Now I have two options: 1) I surrender, or 2) I can still ask for your help, please, and I can send you all screenshots of my system settings. So if you have time you can look them and tell me where is the error.
Thanks in advance for what you can do.

Do you have any non alphanumeric characters in your password? If so, change it. Otherwise we’ll keep on looking to fix it. Most other people have this working :slight_smile:

[quote=“Matteo41, post:81, topic:185616”][quote=“akbooer, post:80, topic:185616”]If you download the attachment on this thread: [url=http://forum.micasaverde.com/index.php/topic,30478.0.html]http://forum.micasaverde.com/index.php/topic,30478.0.html[/url]

…and then upload to Vera using the Apps > Develop apps > Luup files > Upload button, then it should install that version.

Ask again if you still have problems (and welcome to the board!)[/quote]

Hi akbooer,
I have downloaded the file, and then I did upload it to “Loop files” on my Vera Egde (Firmware 1.7.1018) but the message is always the same: “Authorisation failed” and “Netatmo Lua Failure Can’t Detect Device”
I followed all your instructions but the plugin still does not work.

The test file was created and everything is correct
ClientID = 5522654a197759694b74d8d3
ClientSecret = vWuQXks3ttVFStk7nN4eCVEhmiTVZtDlqeiO2V2
Username = xxxxx@xxxx (overshadowed)
Password = xxxx (overshadowed)

Now I have two options: 1) I surrender, or 2) I can still ask for your help, please, and I can send you all screenshots of my system settings. So if you have time you can look them and tell me where is the error.
Thanks in advance for what you can do.[/quote]

Hi, I’m still me, sorry

I clicked on “wiew” file L_Netatmo.lua (ver. 2015.02.01) in “Loop file” in Vera system and the browser showed me what you see in the attachment, What do you think?

I think you shouldn’t do that. What are you trying to achieve? If you want to view the file, try download instead.

What was the answer about your password characters?

If I try to view that file I get:

XML Parsing Error: syntax error
Location: http://172.16.42.14/cgi-bin/cmh/view_upnp_file.sh?rand=0.2512911597285632&file=L_Netatmo.lua.lzo
Line Number 2, Column 1:local version = "2015.02.02  @akbooer" 

Note that I DON’T get anything saying that it’s empty. How did you upload your updated file?

Hi Akbooer,

FYI, with the 7.06 release the hidden
in variables is fixed.

However, the issue with HTML characters is still there so passwords etc cannot have <>&;# and maybe some more in them.

Cheers Rene

This should not be a problem if the variable is encoded. Stripping out HTML from the variable is not the answer if you want to support these characters. Decoding it before use is the answer. If you pass this along in a url it will need to be encoded differently as well. Pattern matching in lua makes short work of this task.

Actually, this seems to have been a problem with Luup variables, rather than specifically one of encoding. It’s on the list to fix in the Netatmo plugin, but since there’s a work-around I have better things to do at the moment.

Ahh now that makes more sense.

Hi,

I’m still having “Netatmo : Authorisation failed” despite checking that everything is ok. I have:

[ul][li]Double checked the username, password, client ID and secret[/li]
[li]Uninstalled the plugin[/li]
[li]Restarted[/li]
[li]Installed the plugin again[/li]
[li]Restarted[/li]
[li]Updated the login details again[/li]
[li]Updated the lua file per the sticky post[/li]
[li]Restarted[/li][/ul]

So far no luck. I also don’t have anything other than letters and numbers in my password. Any ideas about what I should check next?

Thanks,
Pete

OK, sorry to hear.

[ul][li]What version number shows in the device variables?[/li]
[li]What Vera is this running on?[/li]
[li]Is your app actually enabled on the Netatmo developers site?[/li][/ul]

I’m assuming your internet connection is fine.

Hi,

Version number in the variables is “2015.02.01 @akbooer
Vera version is “1.7.583”
App is enabled yup. I have tried cycling the status as well

Internet connection is fine yes, other code on the vera pulls information from the internet.

When I was looking up the variables I notice it says “Netatmo.Lua Failure.Can’t Detect Device” if that helps?

Thanks

There should be at least two entries in the log file from the Netatmo plugin, indicating the start of initialization, which might shed some light…

…you have the fix for the embedded hidden
characters, so it shouldn’t be that.

However, the main cause for the “Netatmo : Authorisation failed” message IS that the authorisation has failed. Can you re-type the credentials into the device variables and restart.

Hi,

I’ve tried copying and pasting the login details to make sure they were perfect, I even tried creating a new app on the Netatmo site and getting the ID and secret in case that was the issue.

The log file gives the following:

06 05/26/15 21:10:25.099 Device_Variable::m_szValue_set device: 439 service: urn:akbooer-com:serviceId:Netatmo1 variable: Syslog was: EMPTY now: #hooks: 0 upnp: 0 skip: 0 v:(nil)/NONE duplicate:0 LEAK this:311296 start:1843200 to 0x1a96000 <0x2b78a680>
50 05/26/15 21:10:25.152 luup_log:439: Netatmo: Netatmo initialisation… LEAK this:8192 start:1851392 to 0x1a98000 <0x2b78a680>
06 05/26/15 21:10:25.739 Device_Variable::m_szValue_set device: 238 service: urn:upnp-org:serviceId:TemperatureSensor1 variable: CurrentTemperature was: 22 now: 22 #hooks: 1 upnp: 0 skip: 0 v:0xfcb988/NONE duplicate:1 LEAK this:188416 start:2039808 to 0x1ac6000 <0x2b04b000>
50 05/26/15 21:10:28.294 luup_log:439: Netatmo: HTTPS error = 400 LEAK this:131072 start:2170880 to 0x1ae6000 <0x2b78a680>
50 05/26/15 21:10:28.294 luup_log:439: Netatmo: Authorisation failed <0x2b78a680>

Thanks

Just as an added note, I ran the code from the other post to test the authentication and it got back the passed ok message. Not sure if that helps or not?

Thanks for all your work in advance, I know it can be a pain troubleshooting things.

Since the test code works, the only difference can be the way the credentials are set. Vera has previously screwed up the contents of variables from their interface. Perhaps there are other hidden characters there too.

One test would be to hardcode your credentials into the Lua code. Is that something you know how to do?

So I hard coded all my details and that seems to pass authentication, but it now gets the following error.

50 05/31/15 19:18:02.033 luup_log:439: Netatmo: HTTPS error = 406 <0x2b742680>
50 05/31/15 19:18:02.033 luup_log:439: Netatmo: Failed to get device configuration <0x2b742680>
50 05/31/15 19:18:02.034 luup_log:439: Netatmo: ??? <0x2b742680>
01 05/31/15 19:18:02.035 LuaInterface::CallFunction_Startup device 439 function init took 8 seconds <0x2b742680>
01 05/31/15 19:18:02.035 LuaInterface::CallFunction_Startup-2 device 439 function init failed Netatmo with return false <0x2b742680>
01 05/31/15 19:18:02.087 LuImplementation::StartLua running startup code for 439 I_Netatmo.xml failed <0x2b742680>

Well, this is odd, because what you describe now is two problems:

[ol][li]Vera credentials not being entered/saved properly[/li]
[li]An HTTP accept error for the data once it is authorized correctly[/li][/ol]

I don’t know how to push much further ahead with diagnosing this, because the indications are that it’s specific to your system/network. Do you have a strange firewall?

Have plugin updated with proper modification for UI7?
Please put it on marketplace?
I have problem with cirrent version of plugin (Netatmo.Lua Failure.Can’t Detect Device)

You’ve installed the version from here? http://forum.micasaverde.com/index.php/topic,30478.msg247304.html#msg247304

You’re right, the MiOS Market does need an update, but the above should work.