We have moved at community.getvera.com

Author Topic: Netatmo Weather Station plugin  (Read 235669 times)

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: Netatmo Weather Station plugin
« Reply #405 on: November 20, 2014, 07:19:28 am »
Hi akbooer,

I got the latest version working on UI7. On the main device I only keep getting the message: Can't Detect Device. All child devices do show the values.

Cheers Rene.
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #406 on: November 20, 2014, 10:29:24 am »
I have a Veralite and a Netatmo so i tried to install your app today and made the settings with my information :
local s_client_id = "XXXXXXX"
local s_client_secret = "XXXXXXX"
local s_username = "my-Netatmo-mail-account"
local s_password = "my-Netamo-password"
Then i reload.

It's important to check that your actual credentials don't have double quotes around them.

Quote
I tried to understand what to do regarding all pages in this forum but to be honest i'm a little lost :(
I also tried the first post in other forum by CaptainIgloo with the Vcontainers (but i didn't manage too :( ).
And now if i well understood we don't need anymore the Vcontainers !?

No, Vcontainers have nothing to do with it now.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #407 on: November 20, 2014, 10:34:48 am »
I got the latest version working on UI7. On the main device I only keep getting the message: Can't Detect Device. All child devices do show the values.

This isn't, so far as I recall, one of my generated messages, so not sure about this.  WHERE do you see that message?  What does the diagnostic page tell you?  This may well be a UI7 thing.  I've never seen it on UI5.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline antrock

  • Sr. Newbie
  • *
  • Posts: 40
  • Karma: +1/-0
Re: Netatmo Weather Station plugin
« Reply #408 on: November 20, 2014, 10:57:47 am »
I get the same message on UI7. It appears under the name of the device in device list as well as on the device's page. Plugin works normally it is just reporting this error. Slight annoyance.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: Netatmo Weather Station plugin
« Reply #409 on: November 20, 2014, 12:00:36 pm »
Hi akbooer,

In UI7 you get that when http or socket commands fail. However, not sure what is going on. No errors are show in the log and the poll_measurements seems to run without a glitch.

What is odd is that the main device does not look as it should (I have a UI6 box as well and there is looks as it should). Not of the labels show up. I even stripped as much as possible out of the D_Netatmo.json file and nothing seems to change. No errors, but also not any labels. No idea if these two issues are somewhat related or not.

I'll dig some more and will let you know. I did tweak the otehr json files to show the icons. In UI7 the icon location is also different (again, sigh...) and I know there are some solutions people have used to work around all that.

Update: found something. It seems the devicetype is now case sensitive. So I changed it to <deviceType>urn:akbooer-com:device:Netatmo:1</deviceType> (not uppercase N) in the D_Netatmo.xml. I also updated the device_type to match in the Advanced Settings. Now I have the icons and all other lables (with the known UI7 issues for URLs).

If someone wants this to look on UI7 as on UI5 you can use the files attached here. The D_Netatmo.xml does the main device correct on UI7. The zip file has jsons and seem to work on UI5/UI6 and UI7. You also have to copy the icon files to /www/cmh/skins/default/img/devices/device_states

Cheers Rene.
« Last Edit: November 20, 2014, 01:37:47 pm by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline doudoubidou

  • Newbie
  • *
  • Posts: 10
  • Karma: +1/-0
Re: Netatmo Weather Station plugin
« Reply #410 on: November 20, 2014, 04:48:51 pm »
It's important to check that your actual credentials don't have double quotes around them.

Hi,
i didn't leave the quotes.
Should i have to create an automation or else like in the very first proposal of Captain Igloo ?
Cheers,

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #411 on: November 20, 2014, 05:36:00 pm »
The Netatmo app has nothing to do with the CaptainIgloo code, it was just originally inspired by that prototype.
  • Your User name and password should be those that you use to log in to Netatmo
  • the additional IDs are obtained from 'registering an app' on the Netatmo site.
  • upon restart, the plugin should recover your station configuration
What does the diagnostic page tell you? (accessed from the link on the control page in UI5, possibly not working in UI7?, but if not, I'll tell you how to obtain that manually.  Your Vera must be connected to the Internet for it to work.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #412 on: November 20, 2014, 05:43:19 pm »
Update: found something. It seems the devicetype is now case sensitive. So I changed it to <deviceType>urn:akbooer-com:device:Netatmo:1</deviceType> (not uppercase N) in the D_Netatmo.xml. I also updated the device_type to match in the Advanced Settings. Now I have the icons and all other lables (with the known UI7 issues for URLs).

Excellent work!  It's typical that I've just put the latest version on the App Store.  It's obviously an error that I made earlier in but which UI5 simply wasn't sensitive to.  Anyway, I'll update the store version shortly.

Well done and thanks again!
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: Netatmo Weather Station plugin
« Reply #413 on: November 21, 2014, 04:58:31 am »
Hi akbooer,

FYI. I still get the Can't Detect Device message flashing on each poll. Maybe there is some issue with UI7 when doing https requests as all is working and no error messages are shown. I'll send an email to support tonight.

Cheers Rene.
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #414 on: November 21, 2014, 06:22:16 am »
FYI. I still get the Can't Detect Device message flashing on each poll. Maybe there is some issue with UI7 when doing https requests as all is working and no error messages are shown. I'll send an email to support tonight.

OK, much appreciated. Let's try and find a solution before I make another App store release.  Maybe I should get another Vera with UI7 for development... I think I'll wait until I can get a Vera Edge.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: Netatmo Weather Station plugin
« Reply #415 on: November 21, 2014, 07:19:04 am »
There has been some posts about this "Can't Detect Device" message on UI7 and some people say that this is some bogus message produced by allot of plugins for some reason even if the plugins are working fine.

http://forum.micasaverde.com/index.php/topic,28298.msg201999.html#msg201999

There is a way for me to eliminate the error message in UI7.
But the error message is BOGUS ... its complaining about a serial port and the plugin does NOT use a serial port.
It does not effect the operation of the device.
This is a VERA bug .. but most developers are just working around it.
« Last Edit: November 21, 2014, 09:03:16 am by korttoma »
- Tomas

Offline doudoubidou

  • Newbie
  • *
  • Posts: 10
  • Karma: +1/-0
Re: Netatmo Weather Station plugin
« Reply #416 on: November 21, 2014, 03:48:07 pm »
The Netatmo app has nothing to do with the CaptainIgloo code, it was just originally inspired by that prototype.
  • Your User name and password should be those that you use to log in to Netatmo
  • the additional IDs are obtained from 'registering an app' on the Netatmo site.
  • upon restart, the plugin should recover your station configuration
What does the diagnostic page tell you? (accessed from the link on the control page in UI5, possibly not working in UI7?, but if not, I'll tell you how to obtain that manually.  Your Vera must be connected to the Internet for it to work.

Hi and thank you for the answer.

So :
- my Vera is connected to internet.
- I have my account from Netatmo
- I installed your plugin
- I have updated the setting in the advanced tab of the plugin.
- Then i reloaded
And in the messages on the top of my UI5, the connection seems to go correctly and after i have the following message :
"Netatmo : Failed to get device configuration"

cheers,

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: Netatmo Weather Station plugin
« Reply #417 on: November 21, 2014, 04:12:43 pm »
FYI. I still get the Can't Detect Device message flashing on each poll. Maybe there is some issue with UI7 when doing https requests as all is working and no error messages are shown. I'll send an email to support tonight.

OK, much appreciated. Let's try and find a solution before I make another App store release.  Maybe I should get another Vera with UI7 for development... I think I'll wait until I can get a Vera Edge.
I sent vera the log and the lu_status json response that shows the error. If you read the topic on this issue about this error pops up even on Z-wave devices.

Searching some more I did find that this error message can be avoided by adding luup.set_failure(0) to your code. So I gave it a try and it seems to be working  :)

So I put it at the end of the init function:
   log 'Device initialised'
   luup.set_failure(0)
   return true

Lo and behold the message stays away. Nice mistery box isn't it. Good thing we have this forum to make a little sense out of it.

Cheers Rene.
« Last Edit: November 21, 2014, 04:53:36 pm by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +292/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #418 on: November 21, 2014, 06:03:04 pm »
Yup.  I read that, tried that, and got "Lua Error" So must have been doing something wrong!

A final sophistication would be to return status or 1 or 2 if problem getting device configuration or with authorization.  Those two sections obvious in the initialisation code.
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: Netatmo Weather Station plugin
« Reply #419 on: November 22, 2014, 05:06:18 am »
Hi akbooer,

On UI5 it have a true or false as parameter, the 0,1,2 should be UI7 specific. So you may need to build it is conditional. What I use is
    if (luup.version_major >= 7) then
         -- UI7 stuff
        luup.set_failure(0)
    else
         -- Old stuff, notning needed.
    end

Cheers
« Last Edit: November 22, 2014, 05:08:32 am by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.