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

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #15 on: August 30, 2013, 10:22:33 am »
Here are the Beta 3 files - a complete set:
  • icons.zip - unzip and use scp to copy to Vera's /www/cmh/skins/default/icons/
  • luup.zip - unzip and download to Vera's Luup files
There's also a screenshot.

New features:
  • 1 decimal place for temperature even if a round number (eg. 17.0)
  • user-defined timestamp format string (for use on device panel) - this is the variable TimeFormat which uses the syntax of the os.date() Lua function to allow flexibility of formatting the string shown on the Netatmo 'master' device panel in the Vera UI.
  • add child device types: Pressure, Noise, and CO2 - they provide the data in the standard "GenericSensor1" service.  The pressure is in units defined by the Netatmo configuration (mbar / inHg / mmHg).
  • user-defined list of child sensor types - so that the display isn't cluttered with devices you're not interested in, then a string defines the types of sensor for which you want to create child devices.  This is the variable ChildSensors and the string is searched for occurrences of the upper-case letters "THCPN" (Temperature / Humidity / CO2 / Pressure / Noise), everything else is ignored.  Thus "TH" will produce only Temperature and Humidity child devices, "THCPN" (the default) produces everything, as, indeed, does "THe Complete Netatmo Package". 

As ever, I'm sure you'll let me know if this falls short in any way.  Equally, it would be good to know that all is working well.
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.

macrho

  • Guest
Re: Netatmo Weather Station plugin
« Reply #16 on: August 30, 2013, 10:53:03 am »
Installed and is working fantastically; the icons are great!
I see that the temperature shows under the climate tab for devices but humidity, co2 and pressure do not

EDIT:
The pressure is not rounding to one digit
« Last Edit: August 30, 2013, 10:55:25 am by macrho »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #17 on: August 30, 2013, 11:14:06 am »
Installed and is working fantastically; the icons are great!
Quick work!  Glad you like it.

Quote
I see that the temperature shows under the climate tab for devices but humidity, co2 and pressure do not
I can do nothing about the humidity, since that is a standard device.  I'm not sure if if can force the others.  One reason that the icons are monochrome is to subliminally indicate that it's a sort of work in progress.

Quote
The pressure is not rounding to one digit
No indeed.  I left it floating because, actually, you would need two decimal places if you chose units of inHg.  Does it bother you?  Temperature bothered me, but I can live with pressure that way.
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.

macrho

  • Guest
Re: Netatmo Weather Station plugin
« Reply #18 on: August 30, 2013, 11:26:11 am »
It doesn't bother me though preference would to have it rounded to 2 decimal places

I must say, you've done an excellent job with this.  If anyone is reading this thread and doesn't have a netatmo, go buy one now and install this plugin!
« Last Edit: August 30, 2013, 02:10:20 pm by macrho »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #19 on: August 30, 2013, 01:15:47 pm »
It doesn't bother me though preference would to have it rounded to 2 decimal places
Actually, since you mentioned it, it does bother me now...

...so here's an updated file which shows relevant precision (decimal places - dp) for all measurement units:
  • 0 dp: %, dB, ppm
  • 1 dp: C, F, mbar, mmHg
  • 2 dp: inHg

It actually made the code neater because temperature is not now a special case.

Thanks!
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.

macrho

  • Guest
Re: Netatmo Weather Station plugin
« Reply #20 on: August 30, 2013, 02:31:09 pm »
Just installed the update and pressure has 2 digits now :)

One nit pick that probably is best ignored:

Perhaps ClientID could come before ClientSecret in the Advanced setting so it matches the Netatmo oAuth settings order on the Netatmo website?

also thanks for having timeformat available on the device.
My American eyes prefer: %I:%M %m/%d
« Last Edit: August 30, 2013, 02:54:42 pm by macrho »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #21 on: August 30, 2013, 03:11:50 pm »
Perhaps ClientID could come before ClientSecret in the Advanced setting so it matches the Netatmo oAuth settings order on the Netatmo website?
It shall be done.

Quote
also thanks for having timeformat available on the device.
My American eyes prefer: %I:%M %m/%d
I lived there on and off for over eight years... I know you're weird.
I'm almost bilingual.

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 ntk

  • Jr. Member
  • **
  • Posts: 82
  • Karma: +1/-1
Re: Netatmo Weather Station plugin
« Reply #22 on: August 31, 2013, 05:11:18 am »
the plugin look great!  ;)

just a question

i don't have the netatmo yet, but wanted to know if there is a problem using the US ver with the euro ver of vera, this connected to the vera with wifi not rf right ?

and this is a little off topic but, anyone know if amazon us selling the new ver with the waterproof outdoor unit ?

thanks!

Offline capjay

  • Hero Member
  • *****
  • Posts: 675
  • Karma: +9/-3
Re: Netatmo Weather Station plugin
« Reply #23 on: August 31, 2013, 06:45:35 am »
wanted to know if there is a problem using the US ver with the euro ver of vera, this connected to the vera with wifi not rf right ?

Actually Vera uses the cloud to talk to NetAtmo, so it should work. However, the specs say that the NetAtmo modules talk to each other using RF 915 MHz *or* 868 MHz, so I'm guessing that the RF is different per region, so while it would work with Vera, you *may* be violating some RF laws in your country.

Offline ntk

  • Jr. Member
  • **
  • Posts: 82
  • Karma: +1/-1
Re: Netatmo Weather Station plugin
« Reply #24 on: August 31, 2013, 07:20:56 am »
yes i know the rf is different that's why i wanted to know how the plugin works

about the law, in my country (israel) both 868 and 915 and all other zwave frequency are prohibited from use, so this is not really a problem, its always take forever to release the frequencies in here, even for bluetooth we waited few years, also netatmo only ship to Europe (and the US ver is cheaper even after reduction the VAT when shipping to israel)

anyway thanks! :)

(if anyone order lately from AMAZON US and know if the have the new ver please let me know)
« Last Edit: August 31, 2013, 07:22:40 am by ntk »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #25 on: September 03, 2013, 07:46:47 am »
Release 1 of the Netatmo plugin is now available from the App Store - thanks to very quick work from MCV. 
It has a few minor changes from the Beta 3 version:

  • units display on child device panels for Pressure, Noise, and CO2 (pressure units set by Netatmo configuration)
  • Pressure, Noise, and CO2 sensors are category 12 (Generic Sensors) and appear under "Sensors" device tab (with Humidity)
  • user-defined JSON library variable - "json-dm" is the default (so you need dataMine installed for it to work out of the box)

If you like it, please add a review.  Thanks!

« Last Edit: September 03, 2013, 02:56:01 pm by akbooer »
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: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #26 on: September 04, 2013, 09:04:47 am »
For reference, typical log entries on startup are:

Code: [Select]
50   09/04/13 13:14:44.825   luup_log:307: Netatmo: creating child devices...
50   09/04/13 13:14:44.827   luup_log:307: Netatmo: Child = 308 02:00:00:01:4c:2c-Temperature, units = C <0x2b8f5680>
50   09/04/13 13:14:44.828   luup_log:307: Netatmo: Child = 309 02:00:00:01:4c:2c-Humidity, units = % <0x2b8f5680>
50   09/04/13 13:14:44.829   luup_log:307: Netatmo: Child = 310 70:ee:50:01:55:06-Temperature, units = C <0x2b8f5680>
50   09/04/13 13:14:44.830   luup_log:307: Netatmo: Child = 311 70:ee:50:01:55:06-Humidity, units = % <0x2b8f5680>
50   09/04/13 13:14:44.832   luup_log:307: Netatmo: Child = 313 70:ee:50:01:55:06-CO2, units = ppm <0x2b8f5680>
50   09/04/13 13:14:44.833   luup_log:307: Netatmo: Child = 315 70:ee:50:01:55:06-Noise, units = dB <0x2b8f5680>
50   09/04/13 13:14:44.835   luup_log:307: Netatmo: Child = 314 70:ee:50:01:55:06-Pressure, units = mbar <0x2b8f5680>
50   09/04/13 13:14:44.836   luup_log:307: Netatmo: ...child devices created <0x2b8f5680>
50   09/04/13 13:14:44.836   luup_log:307: Netatmo: Device initialised <0x2b8f5680>
50   09/04/13 13:14:54.664   luup_log:307: Netatmo: Access tokens rotated <0x2def5680>
50   09/04/13 13:15:05.849   luup_log:307: Netatmo: Measurements polled <0x2def5680>
50   09/04/13 13:15:05.910   luup_log:307: Netatmo: Luup variables updated <0x2def5680>

Note the later timing for the last three entries.  By default the "Access tokens rotated" action subsequently occurs every two hours, and the "Measurements polled" / "Luup variables updated" happens every 10 minutes.
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 BrianLBeaton

  • Sr. Member
  • ****
  • Posts: 325
  • Karma: +12/-1
Re: Netatmo Weather Station plugin
« Reply #27 on: September 04, 2013, 09:30:19 pm »
I installed your plug-in several minutes ago and I am very impressed.  My Netatmo system consists of one Indoor Module, one Outdoor Module, and one additional indoor Module.  Your plug-in discovered and created child devices for each parameter available from all three modules.

One suggestion for improvement is to coordinate with the PLEG plug-in developer to make your children devices for CO2, Noise, and Pressure to be available for use in PLEG as triggers.  Currently the PLEG plug-in only allows your children devices created for Temperature and Humidity to be selected as input triggers.

Another suggestion is to modify your plug-in to provide Notification functionality for the children devices for CO2, Noise, and Pressure.  Currently your plug-in only provides Notification functionality for the children devices created for Temperature and Humidity.

Thank you for your effort with this plug-in to date.

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6339
  • Karma: +288/-70
  • "Less is more"
Re: Netatmo Weather Station plugin
« Reply #28 on: September 05, 2013, 05:11:26 am »
I installed your plug-in several minutes ago and I am very impressed.  My Netatmo system consists of one Indoor Module, one Outdoor Module, and one additional indoor Module.  Your plug-in discovered and created child devices for each parameter available from all three modules.
Glad you like it and it works for you.

Quote
One suggestion for improvement is to coordinate with the PLEG plug-in developer to make your children devices for CO2, Noise, and Pressure to be available for use in PLEG as triggers.  Currently the PLEG plug-in only allows your children devices created for Temperature and Humidity to be selected as input triggers.
No need for coordination with PLEG development... the fact that it doesn't work is strictly due to my JSON-phobia.

Quote
Another suggestion is to modify your plug-in to provide Notification functionality for the children devices for CO2, Noise, and Pressure.  Currently your plug-in only provides Notification functionality for the children devices created for Temperature and Humidity.
Same as above.  This is nothing to do with the plugin itself, but with my shoddy implementation of the child device type for the new measurements.  I just did enough for them to display the readings.  This will be fixed, but I am away from my development system for the next two weeks, so it may take a little while... unless someone else wants to modify the device files for them.

Quote
Thank you for your effort with this plug-in to date.
You're welcome.  A review in the App Store is always acceptable!
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 captainigloo

  • Sr. Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
  • Domotique-Info
Re: Netatmo Weather Station plugin
« Reply #29 on: September 08, 2013, 08:31:22 am »
Bien jou? Akbooer,

Perso j'obtiens un "Startup Lua Failed" malgr?? une bonne authentification. As-tu une id?e ?
Je joins mon jeu d'ic?nes dans l'esprit Netatmo. Tu peux l'utiliser ... Je n'ai jamais eu le temps de finir mon plugin mais j'aimerai bien que le tien fonctionne...
« Last Edit: September 08, 2013, 08:59:34 am by captainigloo »