The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Netatmo Weather Station Plugin => Topic started by: akbooer on August 28, 2013, 06:49:04 am

Title: Netatmo Weather Station plugin
Post by: akbooer on August 28, 2013, 06:49:04 am
--- The Netatmo plugin is now available from the App Store --- http://apps.mios.com/plugin.php?id=4456 (http://apps.mios.com/plugin.php?id=4456)

BUT SEE THIS POST: for the latest: http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917 (http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917) with support for the Rain Gauge AND the updated API.

Following the discussion on this thread http://forum.micasaverde.com/index.php/topic,13489.0.html (http://forum.micasaverde.com/index.php/topic,13489.0.html),  here is a second beta version of a Netatmo plugin with these features (see screenshot attached):
A few more specifics:
All the configuration variables required are accessed under the Advanced tab of the master device.

Installation and Configuration:

This requires a json module (inevitably).  I've used 'json-dm' because I already have dataMine installed (who wouldn't?)

---[Edit: Restarts and browser refreshes are useful after installing the plugin from the App Store]---

You should now have a startup error for the Netatmo plugin with 'Authorisation failure'.  Critical fields to be filled in under the Advanced tab are:
You already have Username and Password for your Netatmo account.  In order to get keys for ClientSecret and ClientID, you need to register your application at http://dev.netatmo.com/dev/createapp (http://dev.netatmo.com/dev/createapp)

The final required inputs, set to sensible defaults, are:

If this goes smoothly, I will release it in the App Store (if someone tells me how !)

--- The Netatmo plugin is now available from the App Store --- http://apps.mios.com/plugin.php?id=4456 (http://apps.mios.com/plugin.php?id=4456)

BUT SEE THIS POST: for the latest: http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917 (http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917) with support for the Rain Gauge AND the updated API.

Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on August 28, 2013, 07:17:53 am
Again great job. Will you also in the future have the CO and db shown? Or is this not possible?
Title: Re: Netatmo Weather Station plugin
Post by: watou on August 28, 2013, 07:26:20 am
Very cool!  I'm going to have to get one of these weather stations!

Child temperature measurements are presented in the units selected in the Netatmo configuration itself (so you can have Fahrenheit or Celcius).

I do wonder if that is the best way to go, instead of using the temperature format of the Vera.  Here is a code snippet I use in my thermostat plugins to find out what temperature scale Vera uses:

Code: [Select]
    local function getVeraTemperatureScale()
      local code, data = luup.inet.wget("http://localhost:3480/data_request?id=lu_sdata")
     
      if (code == 0) then
        data = json.decode(data)
      end

      veraTemperatureScale = ((code == 0) and (data ~= nil) and (data.temperature ~= nil)) and data.temperature or "F"
    end

(You may have reasons to ignore Vera's temperature scale, but I think it might lead to confusion.)

Great job!

watou
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 28, 2013, 07:37:53 am
Again great job. Will you also in the future have the CO and db shown? Or is this not possible?

Thanks.  As I mentioned, there is no standard UPnP service for pressure, noise, or CO2, as far as I can tell.  The same is true for wind, rain, etc...

A number of developers here are anxious not to break a standard, but at the same time want to push on with providing this sort of functionality in Vera.  See discussion at: http://forum.micasaverde.com/index.php/topic,11815.0.html (http://forum.micasaverde.com/index.php/topic,11815.0.html)

I would consider breaking these out into generic child devices, but really need a way to control the proliferation of children for those who don't want them (no real-life analogies here, please! ).  The Vera UI is not really my thing, so I use external apps, HomeWave in particular.  Whilst these can display generic data, it's not pretty.  There's nothing to stop you writing a simple scheduled script and creating a dummy device to display these values individually. 

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 28, 2013, 07:47:44 am
You may have reasons to ignore Vera's temperature scale, ...

Well, yes.  This is just temperature, whereas the Netatmo also gives pressure (and windspeed, ... and more in future).
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on August 28, 2013, 07:57:46 am


...
  There's nothing to stop you writing a simple scheduled script and creating a dummy device to display these values individually.
[/quote]

I could only dream of writing any script....also in my real life I am the annoying guy asking the developers "I am sure you can fix/built/change this functionality......."
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 28, 2013, 09:14:04 am
I could only dream of writing any script...
would you like to learn so that you can get CO2 and noise levels in separate devices??

Quote
also in my real life I am the annoying guy asking the developers "I am sure you can fix/built/change this functionality......."
As I have been, but I was sure they could, because I could too (and they knew it) !
Title: Re: Netatmo Weather Station plugin
Post by: capjay on August 28, 2013, 06:27:48 pm
As I mentioned, there is no standard UPnP service for pressure, noise, or CO2, as far as I can tell.  The same is true for wind, rain, etc...

I guess you can always dump these into a VContainer  :)
Title: Re: Netatmo Weather Station plugin
Post by: Shaigan on August 29, 2013, 03:13:39 am
Or in a "generic sensor"
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 29, 2013, 03:26:17 am
Or in a "generic sensor"
I tried that already, but unfortunately, the "out of the box" implementation of GenericSensor is a crudely and incompletely modified light sensor which does not display its value on the Vera UI panel.   --- Edit: that bit is wrong, my mistake ---

If display is all that you're after, then it's easy enough to fashion specific child devices for pressure, etc.  I may add the option to specify which classes of measurement should be split out into child devices.
Title: Re: Netatmo Weather Station plugin
Post by: Shaigan on August 29, 2013, 07:02:11 am
What about customize a device like the heliotrope one ?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 29, 2013, 08:37:18 am
What about customize a device like the heliotrope one ?

I would have liked to have used a standard device available on every Vera, and known to UPnP.
Writing something custom is not really a problem, but just leads to a non-standard solution.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 29, 2013, 11:42:30 am
OK, is this more like it (see attached screen shot) ?

I have added a user-defined variable to select which sensor types from {Temperature, Humidity, CO2, Pressure, Noise} separate child devices will be created.  The new devices are customisations (so that they can have individual icons) but they provide the data in the standard "GenericSensor1" service.  The icons are all public domain from http://www.iconarchive.com/ (http://www.iconarchive.com/)

Other changes:

I'll release the files when someone tells me what is the meaning of the 'pressureunit' parameter in the Netatmo API.  Until then, I can't do a units conversion on the pressure child device so it's in mbar.
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on August 29, 2013, 12:33:46 pm
Absolutely brilliant
Title: Re: Netatmo Weather Station plugin
Post by: Shaigan on August 29, 2013, 02:31:37 pm
I prefer this way ;)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 30, 2013, 10:22:33 am
Here are the Beta 3 files - a complete set:
There's also a screenshot.

New features:

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.
Title: Re: Netatmo Weather Station plugin
Post by: macrho 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
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.
Title: Re: Netatmo Weather Station plugin
Post by: macrho 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!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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:

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

Thanks!
Title: Re: Netatmo Weather Station plugin
Post by: macrho 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
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.

Title: Re: Netatmo Weather Station plugin
Post by: ntk 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!
Title: Re: Netatmo Weather Station plugin
Post by: capjay 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.
Title: Re: Netatmo Weather Station plugin
Post by: ntk 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)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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:


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

Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton 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.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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!
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo 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...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 08, 2013, 09:22:47 am
@captainigloo

mon inspiration! Je suis d?sol? que vous rencontrez des probl?mes . vous n'?tes pas le seul. quelques id?es ? essayer ici

http://forum.micasaverde.com/index.php/topic,16399.0.html (http://forum.micasaverde.com/index.php/topic,16399.0.html)

-------

My inspiration!

I am sorry that you are having problems.  You are not the only one.  Some ideas to try here
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 10:38:19 am
Sur un d?sinstallation et r?installation une multiplication de modules enfants :

Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 11:12:31 am
Pour la multiplication des objets enfants c'est simplement en raison du partage Netatmo (plusieurs stations).
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 08, 2013, 11:43:44 am
Pour la multiplication des objets enfants c'est simplement en raison du partage Netatmo (plusieurs stations).

Donc, vous avez acc?s ? quatre stations Netatmo dans votre installation? Je crois que la raison de l'erreur de d?marrage Lua parce qu'il essaie de cr?er des noms de variables ill?gales en utilisant les noms de modules .

-------
So you have access to four Netatmo stations in your setup?

I believe the reason for the Lua startup error is because it is trying to create illegal variable names using the module names.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 01:09:46 pm
J'ai supprim? le partage des diff?rentes stations, puis r?install? le plugin,. Un seule station cr??e avec ses objets enfants. J'ai renomm? les modules sans accents et sans espace (plus de probl?me unicode). Par contre rien n'est stock? dans les variables des objets enfants.

50   09/08/13 19:03:55.996   luup_log:82: Netatmo: creating child devices... __LEAK__ this:233472 start:958464 to 0x1288000 <0x2bc07680>
50   09/08/13 19:03:55.998   luup_log:82: Netatmo: Child = 83 70:ee:50:00:1f:f2-Temperature, units = C <0x2bc07680>
06   09/08/13 19:03:55.998   Device_Variable::m_szValue_set device: 83 service: urn:akbooer-com:serviceId:Netatmo1 variable: CalibrationOffset was: EMPTY now: 0 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
06   09/08/13 19:03:56.020   Device_Variable::m_szValue_set device: 83 service: urn:akbooer-com:serviceId:Netatmo1 variable: Units was: EMPTY now: C #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
06   09/08/13 19:03:56.021   Device_Variable::m_szValue_set device: 83 service: urn:akbooer-com:serviceId:Netatmo1 variable: UnitsDisplay was: EMPTY now: (C) #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
50   09/08/13 19:03:56.021   luup_log:82: Netatmo: Child = 84 70:ee:50:00:1f:f2-Humidity, units = % <0x2bc07680>
06   09/08/13 19:03:56.022   Device_Variable::m_szValue_set device: 84 service: urn:akbooer-com:serviceId:Netatmo1 variable: CalibrationOffset was: EMPTY now: 0 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
06   09/08/13 19:03:56.022   Device_Variable::m_szValue_set device: 84 service: urn:akbooer-com:serviceId:Netatmo1 variable: Units was: EMPTY now: % #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
06   09/08/13 19:03:56.023   Device_Variable::m_szValue_set device: 84 service: urn:akbooer-com:serviceId:Netatmo1 variable: UnitsDisplay was: EMPTY now: (%) #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
50   09/08/13 19:03:56.023   luup_log:82: Netatmo: Child = 85 70:ee:50:00:1f:f2-CO2, units = ppm <0x2bc07680>
06   09/08/13 19:03:56.024   Device_Variable::m_szValue_set device: 85 service: urn:akbooer-com:serviceId:Netatmo1 variable: CalibrationOffset was: EMPTY now: 0 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
06   09/08/13 19:03:56.024   Device_Variable::m_szValue_set device: 85 service: urn:akbooer-com:serviceId:Netatmo1 variable: Units was: EMPTY now: ppm #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
06   09/08/13 19:03:56.025   Device_Variable::m_szValue_set device: 85 service: urn:akbooer-com:serviceId:Netatmo1 variable: UnitsDisplay was: EMPTY now: (ppm) #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2bc07680>
01   09/08/13 19:03:56.026   LuaInterface::CallFunction_Startup-1 device 82 function init failed [string "..."]:459: attempt to index field '?' (a nil value) <0x2bc07680>
01   09/08/13 19:03:56.027   LuImplementation::StartLua running startup code for 82 I_Netatmo.xml failed <0x2bc07680>
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 08, 2013, 01:41:44 pm
Excellent! Enfin , un message d' erreur dans le journal que je peux utiliser !

---

Excellent! At last, an error message in the log that I can use!

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 08, 2013, 01:48:51 pm
pourriez-vous changer le variable ChildSensors ? juste TH, puis sur Enregistrer, et voyez si cela fonctionne pour juste temp?rature et l'humidit? ?
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 02:18:25 pm
Cela fonctionne, mais les autres modules ont disparu.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 02:27:52 pm
Alors tous les variables sont charg?es dans le module p?re.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 02:35:11 pm
Ok, donc en testant chaque module un par un, je vois que seul l'affichage de la pression Atm g?n?re une erreur.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 03:45:41 pm
Je crois que le script n'arrive pas ? r?cup?rer l'unit? de pression dans l'API.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 08, 2013, 04:09:16 pm
Ok, donc en testant chaque module un par un, je vois que seul l'affichage de la pression Atm g?n?re une erreur.

OK. pouvez -vous me dire quelles unit?s vous voyez ? la pression de la Netatmo ? est-il hPa ?
ou autre chose?

---


OK. can you tell me what units you see for pressure from the Netatmo ?  is it hPa ??
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 08, 2013, 04:13:08 pm
Justement le script doit bloquer ? la recuperation de la "pressureunit".
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 08, 2013, 04:18:25 pm
il doit ?tre un type de mesure qui n'est pas d?finie.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 01:37:01 am
L'incident se produit ici dans ton script (Ligne 459).
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 02:44:08 am
Si je force la valeur variable ? "xxx" :
Pourquoi les unit?s avec les fl?ches rouges n?apparaissent pas ?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 09, 2013, 03:09:27 am
L'incident se produit ici dans ton script (Ligne 459).

Oui, c'est vrai.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 09, 2013, 03:17:49 am
Si je force la valeur variable ? "xxx" :
Pourquoi les unit?s avec les fl?ches rouges n?apparaissent pas ?

Les modules de temperature et d'humidite sont des logiciels de Vera standard et n'ont pas la fonctionnalite de montrer unit?s.

----

The temperature and humidity modules are standard Vera software and do not have the ability to display measurement units.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 09, 2013, 03:24:58 am
Donc, maintenant je sais comment resoudre ce probleme correctement, mais il va falloir attendre plus d'une semaine jusqu'a ce que je me retrouvais avec mon systeme de developpement. il serait utile de savoir quelles unites vous utilisez pour faire pression.

----

So, now i know how to fix this problem properly, but it will have to wait for over one week until i am reunited with my development system.  It would help to know what units you use for pressure.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 04:05:21 am
mb / mbar / hPa ...

Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 04:07:02 am
Suite ic?nes :
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 04:17:23 am
Si je force la valeur variable ? "xxx" :
Pourquoi les unit?s avec les fl?ches rouges n?apparaissent pas ?

Les modules de temperature et d'humidite sont des logiciels de Vera standard et n'ont pas la fonctionnalite de montrer unit?s.

----

The temperature and humidity modules are standard Vera software and do not have the ability to display measurement units.

Il suffit de cr?e les fichier xml sur la base des generic xml ? De plus cela permettrait d'utiliser d'autres ic?nes que celles natives ...
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 05:07:35 am
Les images sont en accord avec les couleurs Netatmo.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 09, 2013, 05:25:06 am
Il suffit de cr?e les fichier xml sur la base des generic xml ? De plus cela permettrait d'utiliser d'autres ic?nes que celles natives ...

Si vous changez l'icone d'un appareil standard puis tous ces dispositifs vont changer. Si vous creez un nouveau fichier, puis d'autres applications peuvent ne pas etre capable de l'utiliser.

---

If you change the icon on a standard device then ALL those devices will change.  If you make a new device file then other apps may not be able to use it.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 05:28:56 am
Je pr?vois un article sur le plugin Netatmo. Lorsque que la nouvelle release sera publi?e, je difuserai un article sur le site web http://www.domotique-info.fr/.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 05:36:01 am
Il suffit de cr?e les fichier xml sur la base des generic xml ? De plus cela permettrait d'utiliser d'autres ic?nes que celles natives ...

Si vous changez l'icone d'un appareil standard puis tous ces dispositifs vont changer. Si vous creez un nouveau fichier, puis d'autres applications peuvent ne pas etre capable de l'utiliser.

---

If you change the icon on a standard device then ALL those devices will change.  If you make a new device file then other apps may not be able to use it.

D'accord mais c'est dommage, d'ailleurs il serait plus int?ressant d'avoir un fichier XML copie du fichier generique pour utiliser les d?clencheurs.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 09, 2013, 05:46:49 am
D'accord mais c'est dommage, d'ailleurs il serait plus int?ressant d'avoir un fichier XML copie du fichier generique pour utiliser les d?clencheurs.

Les declencheurs seront fixes, voir ma reponse ici:

Triggers will be fixed, see my reply here:

http://forum.micasaverde.com/index.php/topic,16276.msg125437.html#msg125437 (http://forum.micasaverde.com/index.php/topic,16276.msg125437.html#msg125437)
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 05:52:39 am
Avec un Github, nous pourrions t'aider.
Pourquoi ne pas mettre ton projet en Github ?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 09, 2013, 06:10:26 am
Vera a son propre rererentiel de code a...

Vera has its own code repository at...

http://code.mios.com/ (http://code.mios.com/)
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 09, 2013, 06:16:03 am
Oui je connais mais c'est loin de permettre le travail collaboratif comme Github.
Title: Re: Netatmo Weather Station plugin
Post by: futzle on September 09, 2013, 06:46:48 am
(Keep it up. I've almost got enough bilingual text to crack the code. Eat your heart out, Champollion.)
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on September 09, 2013, 07:29:57 am
Bonjour.....

Something new is announced for the 12th of Sept at Netatmo according to their facebook..........
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 09, 2013, 04:26:53 pm
(Keep it up. I've almost got enough bilingual text to crack the code. Eat your heart out, Champollion.)
He didn't have Google Translate  ;)
Title: Re: Netatmo Weather Station plugin
Post by: futzle on September 09, 2013, 05:45:02 pm
Eat your heart out, Champollion.
He didn't have Google Translate  ;)
Google Translate hasn't got Ancient Egyptian or Coptic.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 10, 2013, 03:26:38 am
Google Translate hasn't got Ancient Egyptian or Coptic.
A small project for later...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 12, 2013, 05:58:36 am
Something new is announced for the 12th of Sept at Netatmo according to their facebook..........

Sadly not new hardware but just a widget for smartphones and Android.
Title: Re: Netatmo Weather Station plugin
Post by: cWal on September 12, 2013, 09:11:21 am
Hello !
Thanks for this great plugin, but unfortunately I can't have it working on my Vera Lite and I can't understand why...

I reset my box to factory default to be sure nothing was wrong at the very beginning...
Json lib has been installed via Putty.
Installed the last Netatmo plugin from the Micasaverde store.
Created 3 Vcontainers (I have 4 Netatmo modules, base in/out + 2 adds).
Entered my IDs in the 4 lines (tried both @ and %40 as I read the whole thread).
Replaced the numbers of the containers with the right ones.

Well, been trying everything for 3 days but all what I can get is a "Startup Lua Failed"... Now I am in lack of new ideas...
Any clue ? Any help welcome, I could give access to my box if you need for help, there is nothing confidential in and only Netatmo is installed.
Thank you.


Well, I installed the Google Calendar plugin and now I can read values from Netatmo. May be the json thing was wrong with the first manual installation.
But still getting this "Startup Lua Failed" everytime and can't understand what goes wrong...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 12, 2013, 12:42:18 pm
It's not great if it doesn't work...

Where in the world are you?
Glad you have the json thing sorted out.
Can you change the ChildSensors variable to THCN then do a SAVE and see what happens?
The plugin has nothing to do with VContainers, or the original scene script... it makes separate child devices itself.

If the above doesn't work, send me a log with all the Netatmo lines, if you can.
Otherwise you can PM me.

Sorry for the inconvenience.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 19, 2013, 10:20:50 am
I got one of these yesterday and it has already set the gold standard for ease of installation and operation (using its own website and iOS app). 

I have to say that adding an additional module today confirmed this very positive experience...
A few clicks, put in the batteries, a final click and your done! 

If ONLY adding Z-Wave modules to Vera was as easy!

However, once included in the Netatmo system, the new sensors appear, coutersy of the plugin, on the next Luup Restart with no further intervention at all.
Title: Re: Netatmo Weather Station plugin
Post by: captainigloo on September 19, 2013, 10:29:41 am
Do you plan to update the plugin ?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 19, 2013, 12:07:54 pm
Bien sur!

...and I have some extras for you:
I need to test the updated Lua file on the previous post - can you try it out with pressure?

Merci
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 19, 2013, 12:24:57 pm
I need to test the updated Lua file on the previous post - can you try it out with pressure?

Sorry, it was on a different thread...  try this please!
Title: Re: Netatmo Weather Station plugin
Post by: a-lurker on September 19, 2013, 06:39:44 pm
Just on the sound level: Netatmo have never specified the sound reference level. dBs are ratios ie multipliers or dividers expressed in a logarithmic fashion. They are meaningless unless a reference is stated. For example 60 dB can be considered to be 10 times the sound pressure level, when the sound was 40 dB but what is the absolute sound pressure?

Hopefully the sound units measured by the Netatmo device are dB SPL, where 0 dB is the threshold of human hearing (for most of us) and is equivalent to a pressure level of 20 micro Pascals. In which case, the units should be stated as dB SPL, not just dB.

Regardless accurate sound measurements are difficult to make and are rarely accurate when simple equipment is used. But the Netatmo device can still let you know if the dog is barking while you're out.

Great to see this plugin come to life.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 20, 2013, 05:58:36 am
[...] In which case, the units should be stated as dB SPL, not just dB.

Yes, it's true.  The documentation states that the measured range is:
Quote
- The usual human ear cannot distinguish sounds below 30 dB.
- A prolongated exposure to sounds levels over 65 dB noticeably disminishes your ability to concentrate.
- In many countries, continuous exposure to noise during a workday is limited to an 85 dB level.
- Sounds over 95 dB can put your hearing at risk.

So I really just think of it as "relative to the level that the Netatmo folks have chosen", and carry on regardless...
...I could have written it as 'dB re ?', but that's just messy.

Title: Re: Netatmo Weather Station plugin
Post by: a-lurker on September 20, 2013, 06:36:14 am
Still laughing - maybe it should be "dB re Netatmo".  :)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 20, 2013, 10:28:17 am
Here's a teaser for the new Netatmo plugin UI5 functionality - I have finally cracked the mysteries of the static JSON file - I will post the files separately.

The image shows the optional Netatmo-style icons (thanks to @captainigloo) for a base station with one outdoor and one additional indoor module - hence 3x temperature, 3x humidity, 2x CO2, 1x noise, and 1x pressure sensor.  The switch between these and the original Vera-style ones is done at Luup Restart.

Note that the outdoor module icons for temperature and humidity are different from the indoor ones.

At the same time, I'm showing some temperature and humidity measurements from the Wunderground plugin which have the normal Vera-style icons.  Just for fun I have made new icon versions for minimum and maximum temperature readings.

Note that all the temperature and humidity devices are standard Vera ones with the usual functionality (including access from third-party apps), just the static JSON file is updated.  As a bonus this also includes the option to add a units display, as per the Netatmo-style devices.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 20, 2013, 11:48:06 am
In the jpg file, there is a device in Atmospheric 2 named "Temperature Statistics".  What plug-in created that device and what does it indicate?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 20, 2013, 12:44:56 pm
In the jpg file, there is a device in Atmospheric 2 named "Temperature Statistics".  What plug-in created that device and what does it indicate?

That's a separate device of mine which calculates temperature minimum/maximum on a running basis, resetting at midnight and storing yesterday's min/max also.  In addition, it calculates 'heating degree days' which has a high correlation with the energy used to heat my home.  See attached snap of the Advanced tab showing the variables.  If you want more info, let's start a new thread.

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 21, 2013, 02:35:55 pm
Here are the files for the Beta 1.1 version, which I expect to morph into release 2 on MiOS Apps if there are no problems.

Two zip files:

Not included here are modifications to the temperature and humidity json files and additional icons because I want to keep these apart as a separate, conscious decision to do so.  They should not modify the standard device functionality in any way other than visual appearance on Vera UI5.  I will post separately.  They will not be part of the MiOS Apps release.

Main changes since Release 1:

By default, the 'original' Vera-style icon set is used, but you can select the Netatmo-style one by setting the Netatmo device variable IconSet to "1" instead of "0".  Alternatively you can select which icon to use on a device-by-device basis by setting IconOverride (not IconSet) to "0" or "1" (without the quotes) on each child device individually.

As before you can decide not to create child devices at all on a measurement-type basis by leaving their initial letters out of the Netatmo device variable ChildSensors string.

I am keen to hear of any problems and especially grateful if anyone can test out the trigger and notification functionality.


Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 21, 2013, 05:22:36 pm
Here are the additional temperature and humidity JSON files plus the extra icons which allow:
caveat utilitor - 'let the user beware' - fair warning and advice about using these files:
    For humidity:
        0. default Vera icon
        1. 'indoor' Netatmo icon
        2. 'outdoor' Netatmo icon
    For temperature:
        0. default Vera icon
        1. 'indoor' Netatmo icon
        2. 'outdoor' Netatmo icon
        3. 'minimum' Vera icon
        4. 'maximum' Vera icon
See the attachment at http://forum.micasaverde.com/index.php/topic,16276.msg127710.html#msg127710 (http://forum.micasaverde.com/index.php/topic,16276.msg127710.html#msg127710) for an image of all of these.

Hope this is clear and I look forward to hearing both the good and the bad news from the more adventurous Netatmo owners here.

Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 23, 2013, 07:43:42 am
I installed all of the files from this thread.

The triigger and notification functionality for the following children devices do not work.  I was able to set up triggers; however, no alerts were generated when those events occurred.
a. CO2
b. Noise
c. Pressure

The new icon functionality is working great.

Using Vera 3 with firmware 1.5.622.
Netatmo configuration: One (1) Indoor  Module, one (1) Outdoor Module, and two (2) add-on modules.

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 23, 2013, 09:00:11 am
The triigger and notification functionality for the following children devices do not work.  I was able to set up triggers; however, no alerts were generated when those events occurred.

Thank you so much for this feedback, even though it is not good news!  This is what beta-testing is all about, of course.

These are the 'GenericSensor' devices for which there is no specific UPnP service.  I am using the Vera-supplied service definition file, but I had my doubts about it.  There's clearly something I don't understand about triggers (which I use) and notifications (which, to date, I don't).  It's somewhat surprising that the UI for setting these up seems all quite correct, but the actual events don't get detected (although, we are talking about Vera!).

I will post a request to those more technically aware of the issues in this area and hope to fix this soon.  Progress in small steps.

Do you prefer the Netatmo-style icons?  I might make them the default.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 23, 2013, 12:29:31 pm
Beta 1.2 file changes attached - note that these updates should be applied AFTER installing the complete Beta 1.1 files.

This fixes:

Do tell me that this now works ok!
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 23, 2013, 06:47:30 pm
I prefer the Netatmo-style icons for this plug-in.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 23, 2013, 06:55:56 pm
I loaded the four new files.  I am now receiving notifications for CO2, pressure and noise.  Thanks for the fix.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 23, 2013, 07:00:19 pm
Excellent news, and very speedy.  I'll add you to the list of beta test collaborators on the App Store if thats ok.  Feel free to add a review there too!

Don't hesitate to highlight any problems or ideas for improvement.

Thanks again.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 23, 2013, 09:43:31 pm
Something new I just noticed that is a bit troublesome.  The triggers I created for CO2, Noise, and Pressure are generating notifications at exactly 10 minute intervals even though the CO2 level, Noise level, and pressure level remain above or remain below their respective trigger level.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 24, 2013, 03:24:28 am
Something new I just noticed that is a bit troublesome.  The triggers I created for CO2, Noise, and Pressure are generating notifications at exactly 10 minute intervals even though the CO2 level, Noise level, and pressure level remain above or remain below their respective trigger level.
More than troublesome... truly dysfunctional.
The 10 minute interval is every update of the measurement.

I'll polish up that email to the experts.

Title: Re: Netatmo Weather Station plugin
Post by: RichardTSchaefer on September 24, 2013, 07:39:03 am
You should compare values to existing state before you do a
luup.variable_set.

As I recall there is also an option in the JSON file for the eventlist that indicates if it supports generating an event every time you set the variables ... or just when the trigger first becomes true.  But I can't find the documentation for it right now ...
Title: Re: Netatmo Weather Station plugin
Post by: mpenda on September 24, 2013, 09:40:29 am
I had a problem with "Lua startup failed" on my install. I had added the variableContainer and GoogleCalendar plugins to try and make sure I had the correct prerequisites in place, but that did not work. I noticed "dataMine" at the signature of akbooer so I added that plugin. Once I did that, the Netatmo piece worked.
Just thought this might help someone else.

Thanks for a great plugin!!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 24, 2013, 12:28:45 pm
You should compare values to existing state before you do a
luup.variable_set.
But if, say, we have a rising pressure then you want to update the CurrentValue variable even if it has surpassed a trigger threshold (and I don't know how you'd find that out).  There may even be multiple threshold set on one variable.  Perhaps I miss your meaning?

Quote
As I recall there is also an option in the JSON file for the eventlist that indicates if it supports generating an event every time you set the variables ... or just when the trigger first becomes true.  But I can't find the documentation for it right now ...

Now THAT would fit the bill - I will search harder!

Thanks.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 24, 2013, 12:35:49 pm
I had a problem with "Lua startup failed" on my install. I had added the variableContainer and GoogleCalendar plugins to try and make sure I had the correct prerequisites in place, but that did not work. I noticed "dataMine" at the signature of akbooer so I added that plugin. Once I did that, the Netatmo piece worked.
Just thought this might help someone else.

Certainly worth reminding: the basic install ships without a JSON module.  I use 'json-dm' by default because every right-minded person should have dataMine installed.  :D

There is a settable variable under the Advanced tab of the Netatmo module, 'jsonLibrary', which allows you to select another.  GoogleCalendar has a plain 'json' module, so setting it to that would have worked.  I'll bundle a JSON module with the next App Store release... I was just trying to save space.  The configuration information is described on the first post of this thread.

VariableContainer is not used by this plugin.

Quote
Thanks for a great plugin!!

Thanks for the vote of confidence (don't try using pressure, noise, or CO2 triggers or notifications yet!).
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 25, 2013, 09:33:19 am
The triggers I created for CO2, Noise, and Pressure are generating notifications at exactly 10 minute intervals even though the CO2 level, Noise level, and pressure level remain above or remain below their respective trigger level.

Certainly puzzled the experts for a bit.  However, this may fix the problem - I have done limited testing and it seems promising.

Let me know, please!
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 25, 2013, 03:00:51 pm
After uploading the three new files to my Vera 3, the same issue as before exists.  The triggers for CO2, Noise, and Pressure are generating notifications at exactly 10 minute intervals even though the CO2 level, Noise level, and pressure level remain above or remain below their respective trigger level.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 25, 2013, 04:25:57 pm
After uploading the three new files to my Vera 3, the same issue as before exists.  The triggers for CO2, Noise, and Pressure are generating notifications at exactly 10 minute intervals even though the CO2 level, Noise level, and pressure level remain above or remain below their respective trigger level.
Hmmmmm, sorry about that, but that's not my experience.  Seems to be working for me.  I wonder what's different?

You're sure the uploads worked?  I'll check that I posted the right files!  That's all that I can think of right now.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 25, 2013, 08:28:03 pm
I transcribed information from the "My Alerts" Tab in UI5 and the "VeraAlerts Plugin" and "Vera Alerts Android App" to illustrate what I am observing for a CO2 device.  The pressure and noise devices are exhibiting similar behavior.  The transcribed information is in the attached file.  Hope this may shed some insight as to what is happening.   
Title: Re: Netatmo Weather Station plugin
Post by: garrettwp on September 25, 2013, 10:59:34 pm
Did you reload vera after uploading the new files?

- Garrett

Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 25, 2013, 11:02:39 pm
Yes, I checked "Restart Luup after upload".  I  also pressed the Reload button several times since then.

The System Monitor Plug-in indicates the following:

Last CMH Reboot: 22:01:47 Wed 25 Sep 2013
Last Vera Restart: 22:06:10 Wed 25 Sep 2013
Last Luup Restart: 22:54:43 Wed 25 Sep 2013
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 26, 2013, 04:47:21 am
I transcribed information from the "My Alerts" Tab in UI5 and the "VeraAlerts Plugin" and "Vera Alerts Android App" to illustrate what I am observing for a CO2 device.  The pressure and noise devices are exhibiting similar behavior.  The transcribed information is in the attached file.  Hope this may shed some insight as to what is happening.

I don't use either of the apps that you mention, but have just been looking at the basic event notification and trigger functionality.  However, your UI5 transcript appears to show the problem.

Two things:
Thanks.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on September 26, 2013, 06:29:55 am
Q1: What is the value of the 'Version' variable under the Advanced tab of the Netatmo master plugin device?
A1: 2013.09.23 @akbooer


Q2: Can you download from Vera 'D_NetatmoCO2.json' and PM me the file (or post) ?
A2: Yes.  File is attached to this reply.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 26, 2013, 03:28:32 pm
What we need now is for a few others to give triggers/notification for pressure/noise/CO2 a go.

Any takers?
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on October 01, 2013, 03:14:45 pm
Thx for this great plugin, i just got mine now
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 01, 2013, 03:48:43 pm
Excellent news!

Did you download from Mios Apps ?
If so, you'll need to add some incremental changes from the posts below for the latest functionality.
I am preparing a new release for the App store now.

Thanks
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on October 01, 2013, 04:03:01 pm
yeah I just figured that out.....but I have the cool icons now

What would be cool, if the icons for CO can change, based on the CO level
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 19, 2013, 04:01:41 pm
What would be cool, if the icons for CO can change, based on the CO level

Yes, that would be cool... so here are some extra icons and an updated Lua file, along with a screen shot of my growing Netatmo farm.

The thresholds are the same as for the actual device:
I've also removed the dependence on an external JSON library and improved the HTTP error handling (prompted by my internet connection being intermittent over the last 10 days... thanks to rural UK broadband!)


Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on October 19, 2013, 04:03:55 pm
Brilliant!!!!!!!!
Title: Re: Netatmo Weather Station plugin
Post by: pattont on October 22, 2013, 01:03:57 pm
Ok totally confused now... When I delete all of the newly added devices because I had duplicates and click "reload" it re-adds those duplicates....

Version: 2013.10.19 @akbooer

See picture.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 22, 2013, 04:25:10 pm
Ok totally confused now... When I delete all of the newly added devices because I had duplicates and click "reload" it re-adds those duplicates....


Also, what do the variables under the master Netatmo device look like?

Sorry for the inconvenience.


Title: Re: Netatmo Weather Station plugin
Post by: pattont on October 22, 2013, 04:50:28 pm
>> OK, what's your setup?  Just one main module with one additional indoor one?
Correct

>>when did the duplicates first appear?
They came up from the first time I installed the Netatmo plugin today and typed in my client id, secret, and credentials

>>what happens if you set the ChildSensors variable string to blank and SAVE?
When I remove 'THCPN', save it, reload, the sensors are still there and when I look back at ChildSensors, the 'THCPN' is back automatically.

>>Also, what do the variables under the master Netatmo device look like?
Which variables?


I have also just tried to delete the Netatmo plugin completely, re-install it, update the .lua file and redo my credentials. SAME THING... Duplicate everything child controls... Another weird thing is the Master Netatmo device icon is missing see the screenshots.



Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 22, 2013, 05:31:51 pm
[I have also just tried to delete the Netatmo plugin completely, re-install it, update the .lua file and redo my credentials. SAME THING... Duplicate everything child controls... Another weird thing is the Master Netatmo device icon is missing see the screenshots.

How did you install it?  ... from the MiOS App store, or from one of the posts below.  It looks like you haven't got all of the plugin files if the Netatmo device is not appearing... specifically the D_Netatmo.json files and the icon *.png files.
Title: Re: Netatmo Weather Station plugin
Post by: pattont on October 22, 2013, 05:36:31 pm
It was installed from the store and then I used .lua posted earlier. It wouldn't work at all from the store version.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 22, 2013, 05:50:38 pm
>> OK, what's your setup?  Just one main module with one additional indoor one?
Correct

>>when did the duplicates first appear?
They came up from the first time I installed the Netatmo plugin today and typed in my client id, secret, and credentials

>>what happens if you set the ChildSensors variable string to blank and SAVE?
When I remove 'THCPN', save it, reload, the sensors are still there and when I look back at ChildSensors, the 'THCPN' is back automatically.

>>Also, what do the variables under the master Netatmo device look like?
Which variables?


I have also just tried to delete the Netatmo plugin completely, re-install it, update the .lua file and redo my credentials. SAME THING... Duplicate everything child controls... Another weird thing is the Master Netatmo device icon is missing see the screenshots.

What browser are you using?  Have you refreshed the page?  In fact, the master device is there, because the screen shots of the variables, etc., come from there.  You mean that the device icon is not present, I think.  The fact that the device string "is still there" means either that a SAVE didn't happen, or that the browser page is not refreshed.  Can you check again?  Thanks.

Does the Last Update time change every 10 minutes?  Do the variables (temperature, humidity, ...) change in the master device Advanced tab and do they reflect the 'truth' that the Netatmo app reports? 



Title: Re: Netatmo Weather Station plugin
Post by: pattont on October 22, 2013, 06:08:08 pm

What browser are you using?  Have you refreshed the page?  In fact, the master device is there, because the screen shots of the variables, etc., come from there.  You mean that the device icon is not present, I think.  The fact that the device string "is still there" means either that a SAVE didn't happen, or that the browser page is not refreshed.  Can you check again?  Thanks.

Does the Last Update time change every 10 minutes?  Do the variables (temperature, humidity, ...) change in the master device Advanced tab and do they reflect the 'truth' that the Netatmo app reports?

Chrome

Yes, I have refreshed the page.


----

So an update, I am using VPN to my house instead of going through cp.mios.com now and now the icons are loading, but I am still getting the duplication. I think I know why though. I forgot that my father has a Netatmo with the same scenario (1 master and 1 addon) shared to me. I really don't want them showing alongside mine, but I don't know of a way to filter just the module that I want.


Any thoughts there???
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 22, 2013, 06:16:02 pm
So an update, I am using VPN to my house instead of going through cp.mios.com now and now the icons are loading, but I am still getting the duplication. I think I know why though. I forgot that my father has a Netatmo with the same scenario (1 master and 1 addon) shared to me. I really don't want them showing alongside mine, but I don't know of a way to filter just the module that I want.

Any thoughts there???

Ah, well this explains everything... install is correct, icons ARE there, plugin works.

Your only problem, then, is NOT wanting to display some modules.  This is not functionality I have considered to this point.  It could be added.  Until I do, your easiest bet is simply to assign them to a new "room" in the Vera UI where you can safely ignore them.
Title: Re: Netatmo Weather Station plugin
Post by: pattont on October 22, 2013, 06:36:58 pm
So an update, I am using VPN to my house instead of going through cp.mios.com now and now the icons are loading, but I am still getting the duplication. I think I know why though. I forgot that my father has a Netatmo with the same scenario (1 master and 1 addon) shared to me. I really don't want them showing alongside mine, but I don't know of a way to filter just the module that I want.

Any thoughts there???

Ah, well this explains everything... install is correct, icons ARE there, plugin works.

Your only problem, then, is NOT wanting to display some modules.  This is not functionality I have considered to this point.  It could be added.  Until I do, your easiest bet is simply to assign them to a new "room" in the Vera UI where you can safely ignore them.

I have been looking through the .lua file as I am a developer myself.

I am considering a few options, but obviously I am new to this platform. At a minimum it would be nice to prepend the device with the station ID in the name or somewhere in the device that it creates. Going forward it would be nice to have it create some check boxes in the netatmo configuration module to select any/all the weather modules that I want to see.
Title: Re: Netatmo Weather Station plugin
Post by: pattont on October 22, 2013, 09:02:21 pm
I figured out that if you log into the local interface http://<ipaddress>/cmh the icons appear. When you log through cp.mios.com the icons won't appear for most of the devices that appear from the netatmo.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 23, 2013, 04:22:17 am
I figured out that if you log into the local interface http://<ipaddress>/cmh the icons appear. When you log through cp.mios.com the icons won't appear for most of the devices that appear from the netatmo.
Yes. I'm afraid that's a feature of MiOS rather than the Netatmo plugin in particular.  The server doesn't have the icons and doesn't fetch them from Vera.  Frankly, if you are looking for for a good user interface, then look elsewhere in third-party apps for tablets, etc.  Homewave is my choice.
Title: Re: Netatmo Weather Station plugin
Post by: pathduck on October 25, 2013, 08:23:12 am
Hi

Just want to say that thinx plugin works great. I just want to thank the developers. Not all vera plugins are as simple as this :)

http://www.duppeditten.com/
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 25, 2013, 03:53:16 pm
Hi

Just want to say that thinx plugin works great. I just want to thank the developers. Not all vera plugins are as simple as this :)

http://www.duppeditten.com/
Thanks, that's great to know.
I hope to roll up all the posted changes in an updated release on MiOS Apps soon.

Title: Re: Netatmo Weather Station plugin
Post by: pattont on October 27, 2013, 01:05:54 am

Yes. I'm afraid that's a feature of MiOS rather than the Netatmo plugin in particular.  The server doesn't have the icons and doesn't fetch them from Vera.  Frankly, if you are looking for for a good user interface, then look elsewhere in third-party apps for tablets, etc.  Homewave is my choice.

Yea, I am using some iOS apps. I was just meaning in the dashboard. Thanks for the explanation.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 11, 2013, 01:44:40 pm
Release 2 of the Netatmo plugin is now available from the App store.  It pulls together the various incremental changes to date.  The installation does NOT include modifications and extensions to the standard devices of Temperature and Humidity.  For those files (and the extended icon set) see previous posts on this thread.  The L_Netatmo.lua file is, however, the latest.

It's not auto-update, so you'll have to load the version manually.
Title: Re: Netatmo Weather Station plugin
Post by: mcguinness on December 07, 2013, 04:48:04 pm
Can you help me .  I am an owner of a Vera 3 system and a Netatmo with additional modules.  I have a password and a login.  What else do I need to make this plugin work?
Title: Re: Netatmo Weather Station plugin
Post by: garrettwp on December 07, 2013, 05:06:55 pm
Did you look at the instructions? Try the first post for information.

- Garrett

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 07, 2013, 05:10:15 pm
Can you help me .  I am an owner of a Vera 3 system and a Netatmo with additional modules.  I have a password and a login.  What else do I need to make this plugin work?
You need to register your App on Netatmo's site at http://dev.netatmo.com/dev/createapp (http://dev.netatmo.com/dev/createapp) and it will give you two keys: Client Id and Client Secret which you plug into the appropriate device variables in the Vera app along with your login credentials.  Then it should all just work.

If you want to use some of the extra features with extended icons and units displays on all the child devices then you need to download the extra icons and json files from earlier posts here.

If you just get the basic app going, I can walk you through the next steps.  Don't hesitate to ask if the above is not clear or doesn't work.
Title: Re: Netatmo Weather Station plugin
Post by: mcguinness on December 07, 2013, 10:53:04 pm
Thanks  I got the basic app running.  Whats next?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 08, 2013, 11:41:55 am
Thanks  I got the basic app running.  Whats next?
OK, good.  "What's next" falls into two categories:
The above give a more Netatmo-like look-and-feel to the child devices and add the possibility of displaying units (and changing icons) on any other Temperature or Humidity device you want to.

All explained in previous posts:
The extended icons are not part of the standard release because, quite honestly, there are too many files to configure in arranging the download from the App store, which is a real pain.  The JSON file mods to standard devices would, I presume, not be accepted by MCV in any App download (although, once again, they are quite benign.)

The icon files have to be transferred to Vera using scp or similar, since they are downloaded to a separate location (/www/cmh/skins/default/icons/) from the standard Lua and XML file and not compressed.  The instructions in the above posts are pretty specific but just ask again if you get stuck.  In any event, please let us know how it goes.

Title: Re: Netatmo Weather Station plugin
Post by: mzpost on December 14, 2013, 09:33:55 am
This really is excellent work, I've had my netatmo for a while but only just really got it set up properly. This looks great so will now try and use the data to run other scenes (ie if its below 4 degrees in the morning get one of my hue lamps to light up blue, a sort of live weather check in colour).

With all the work that goes on with apps like this I'm surprised the developers don't charge, I know they do it for passion but it would be good to be able to support some of these, after all without all the hard work people do on here vera would only be a shadow of what it Is.
Title: Re: Netatmo Weather Station plugin
Post by: mzpost on December 14, 2013, 10:01:32 am
A question re the sensors showing up in third party apps. I used a number of apps and have noticed that when I've assigned all of the devices that you see with netatmo to rooms, that a number of apps are only showing the temperature and humidity data. Air pressure and noise level seem to be missing (at least on android apps, they do show on an ipad app).

Has anyone else seen this and been able to over come that ?.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 14, 2013, 11:01:46 am
This really is excellent work, I've had my netatmo for a while but only just really got it set up properly. This looks great so will now try and use the data to run other scenes (ie if its below 4 degrees in the morning get one of my hue lamps to light up blue, a sort of live weather check in colour).

With all the work that goes on with apps like this I'm surprised the developers don't charge, I know they do it for passion but it would be good to be able to support some of these, after all without all the hard work people do on here vera would only be a shadow of what it Is.
This is very kind of you to say.  A recommendation on the App store is always welcome!

Regarding charging, I think the market size (Vera users intersected with Netatmo users) is probably rather small.  I mostly do this because I want the functionality myself and I'm very willing to share it.

A significant upgrade is on the way (alpha testing at the moment) which enables the plugin to generate reports of the configuration, current values, and plots of the sensor values over the last day.  (I know you can get such plots from the web or the phone app, but these are embeddable in other web pages.)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 14, 2013, 11:05:36 am
A question re the sensors showing up in third party apps. I used a number of apps and have noticed that when I've assigned all of the devices that you see with netatmo to rooms, that a number of apps are only showing the temperature and humidity data. Air pressure and noise level seem to be missing (at least on android apps, they do show on an ipad app).

Has anyone else seen this and been able to over come that ?.
This is not, per se, an issue with the Netatmo plugin - it's simply that these non-standard sensors (which don't have an approved UPnP specification) are represented as 'Generic' measurements and most apps don't handle those well, if at all.  It's actually a pressing problem with, in particular, weather sensors and a number of 'the developers' here are trying to agree on some standard so that we can all move forwards.

I am happy to consider alternative approaches if anyone has a GOOD IDEA.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 18, 2013, 12:19:21 pm
A significant upgrade is on the way (alpha testing at the moment) which enables the plugin to generate reports of the configuration, current values, and plots of the sensor values over the last day.  (I know you can get such plots from the web or the phone app, but these are embeddable in other web pages.)
...and here it is, with these enhancements:
The basic Vera UI functionality is unchanged, but an HTTP request handler now responds to browser URLs of the form:
Code: [Select]
[your Vera IP address]:3480/data_request?id=lr_Netatmo
The above request, on its own, responds with 'help text' describing the allowed parameters:
Code: [Select]
PARAMETERS: names and values can be abbreviated

  [actions]
         report/show = show device status and configuration [list/organization]
                plot = plot specified sensor [string]

  [options]
               width = HTML output width [number]

EXAMPLE: &report=org

The attached tabular report was generated with:
Code: [Select]
http://[my Vera IP address]:3480/data_request?id=lr_Netatmo&report=list

and the attached organization structure with:
Code: [Select]
http://[my Vera IP address]:3480/data_request?id=lr_Netatmo&report=org

Similarly, a plot to the last 24 hours of my sensor 'OutdoorTemperature' (following the same naming convention as the App's device variables) would be generated by:
Code: [Select]
http://[my Vera IP address]:3480/data_request?id=lr_Netatmo&plot=OutdoorTemperature

All of these displays are available both on your local network and, via HTTPS through the MiOS secure servers with the appropriate syntax, from anywhere on the internet.

Two Lua files attached.  Just load them through the usual Vera UI web page and restart.  Comments (good or bad) welcomed.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on December 19, 2013, 03:53:36 am
Thanks akbooer for the update!

Im trying out the new HTTP requests but I guess I'm not using the correct syntax since I'm getting "unknown parameter: remoteIP"

syntax used:

https://fwd7.mios.com/port_3480/data_request?id=lr_Netatmo&report=org


https://fwd7.mios.com/port_3480/data_request?id=lr_Netatmo&report=list

I'm trying remotely, I'll try locally when I get home.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 19, 2013, 06:06:01 am
Im trying out the new HTTP requests but I guess I'm not using the correct syntax since I'm getting "unknown parameter: remoteIP"

It is a secure HTTPS connection (outside your own LAN), and it needs your account name, password and Vera machine serial number, as per this page on the MCV wiki...
http://wiki.mios.com/index.php/Luup_Requests#Accessing_Vera_remotely_through_the_MiOS_servers (http://wiki.mios.com/index.php/Luup_Requests#Accessing_Vera_remotely_through_the_MiOS_servers)
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on December 19, 2013, 06:19:15 am
I'm sorry but I get the same results using:

https://fwd7.mios.com/username/password/veraserial/data_request?id=lr_Netatmo&report=org


https://fwd7.mios.com/username/password/veraserial/data_request?id=lr_Netatmo&report=list


https://fwd7.mios.com/username/password/veraserial/data_request?id=lr_Netatmo&plot=OutdoorTemperature


Is "lr_Netatmo" something that can also be different for me?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 19, 2013, 07:58:16 am
mea culpa!

I had tightened up on the request syntax checker to throw an error if there was an unknown parameter.  It turns out that the remote servers add the "remoteIP" parameter and pass that along in the command line.

Try this, should do the trick.  Many apologies (must tighten up on the unit testing once again!)
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on December 20, 2013, 12:42:59 am
Now it works :D Thanks and Merry Christmas!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 20, 2013, 12:46:16 am
Now it works :D Thanks and Merry Christmas!
Excellent!  ... the same to you!!
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on January 23, 2014, 11:21:40 am
Anyone seen this!

http://www.cultofmac.com/261126/weather-geeks-rejoice-netatmo-adds-rain-gauge-ces-2014-exclusive/
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 23, 2014, 11:24:38 am
Anyone seen this!

http://www.cultofmac.com/261126/weather-geeks-rejoice-netatmo-adds-rain-gauge-ces-2014-exclusive/

Oh YES - I must get one...

Oh NO - I have to update the plugin!
Title: Re: Netatmo Weather Station plugin
Post by: emtschei on January 31, 2014, 10:03:17 pm
Hi @akbooer

I recently installed your Netatmo plugin from the app store out of interest. Since I plan to wait to buy the weather station until it comes with the rain gauge I uninstalled the plugin again with the 'uninstall' function and then deleted the leftover files manually (just to keep it neat).

Nevertheless EventWatcher still report events from Netatmo, which leaves me puzzled.
Anything I missed (I rebooted the system)?

Device :47: is my EventWatcher device:
Code: [Select]
50      01/31/14 22:50:48.585   luup_log:47: Netatmo: starting... __LEAK__ this:544768 start:2494464 to 0x1317000 <0x2bf51680>
50      01/31/14 22:50:48.586   luup_log:47: Netatmo: defining CLI... <0x2bf51680>
50      01/31/14 22:50:48.590   luup_log:47: Netatmo: Starting UDP syslog service... <0x2bf51680>
50      01/31/14 22:50:48.608   luup_log:47: Netatmo: Starting Event service... __LEAK__ this:4096 start:2498560 to 0x1318000 <0x2bf51680>
50      01/31/14 22:50:48.609   luup_log:47: Netatmo: Server listening on port 443 __LEAK__ this:4096 start:2502656 to 0x1319000 <0x2bf51680>
50      01/31/14 22:50:48.610   luup_log:47: Netatmo: Starting Watch service... <0x2bf51680>
50      01/31/14 22:50:48.615   luup_log:47: Netatmo: Starting Sysinfo service... <0x2bf51680>
50      01/31/14 22:50:48.622   luup_log:47: Netatmo: ...initialised <0x2bf51680>
50      01/31/14 22:52:43.106   luup_log:47: Netatmo: 127.0.0.1:40241 SSL wrap error: error loading private key ((null)) __LEAK__ this:126976 start:2904064 to 0x137b000 <0x2e751680>
50      01/31/14 22:53:03.007   luup_log:47: Netatmo: 127.0.0.1:40246 SSL wrap error: error loading private key ((null)) __LEAK__ this:8192 start:2928640 to 0x1381000 <0x2e751680>
50      01/31/14 22:53:18.101   luup_log:47: Netatmo: 127.0.0.1:40248 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:2936832 to 0x1383000 <0x2e751680>
50      01/31/14 22:53:33.102   luup_log:47: Netatmo: 127.0.0.1:40257 SSL wrap error: error loading private key ((null)) <0x2e751680>
50      01/31/14 22:53:48.102   luup_log:47: Netatmo: 127.0.0.1:40259 SSL wrap error: error loading private key ((null)) __LEAK__ this:8192 start:2957312 to 0x1388000 <0x2e751680>
50      01/31/14 22:54:03.102   luup_log:47: Netatmo: 127.0.0.1:40262 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:2965504 to 0x138a000 <0x2e751680>
50      01/31/14 22:54:18.101   luup_log:47: Netatmo: 127.0.0.1:40264 SSL wrap error: error loading private key ((null)) __LEAK__ this:8192 start:2977792 to 0x138d000 <0x2e751680>
50      01/31/14 22:54:33.102   luup_log:47: Netatmo: 127.0.0.1:40267 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:2985984 to 0x138f000 <0x2e751680>
50      01/31/14 22:54:48.119   luup_log:47: Netatmo: 127.0.0.1:55239 SSL wrap error: error loading private key ((null)) __LEAK__ this:8192 start:3006464 to 0x1394000 <0x2e751680>
50      01/31/14 22:55:03.102   luup_log:47: Netatmo: 127.0.0.1:55244 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:3014656 to 0x1396000 <0x2e751680>
50      01/31/14 22:55:18.101   luup_log:47: Netatmo: 127.0.0.1:55246 SSL wrap error: error loading private key ((null)) __LEAK__ this:8192 start:3026944 to 0x1399000 <0x2e751680>
50      01/31/14 22:55:33.102   luup_log:47: Netatmo: 127.0.0.1:55249 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:3035136 to 0x139b000 <0x2e751680>
50      01/31/14 22:55:48.101   luup_log:47: Netatmo: 127.0.0.1:55253 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:3055616 to 0x13a0000 <0x2e751680>
50      01/31/14 22:56:03.102   luup_log:47: Netatmo: 127.0.0.1:55256 SSL wrap error: error loading private key ((null)) __LEAK__ this:8192 start:3067904 to 0x13a3000 <0x2e751680>
50      01/31/14 22:56:18.101   luup_log:47: Netatmo: 127.0.0.1:55258 SSL wrap error: error loading private key ((null)) __LEAK__ this:8192 start:3076096 to 0x13a5000 <0x2e751680>
50      01/31/14 22:56:33.103   luup_log:47: Netatmo: 127.0.0.1:55261 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:3088384 to 0x13a8000 <0x2e751680>
50      01/31/14 22:56:48.120   luup_log:47: Netatmo: 127.0.0.1:55267 SSL wrap error: error loading private key ((null)) __LEAK__ this:4096 start:3112960 to 0x13ae000 <0x2e751680>

Thank you, again.
MJ
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 01, 2014, 06:34:08 am
@emtshei

It turns out that this is not a Netatmo issue (don't worry, you probably did delete it all OK), but an EventWatcher problem.
I will reply on the EventWatcher thread...
Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 04, 2014, 03:38:01 pm
I don't get the 1 digit accuracy. Didn't this plugin update or is this still a beta feature?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 04, 2014, 04:01:07 pm
I don't get the 1 digit accuracy. Didn't this plugin update or is this still a beta feature?
No, the plugin has always provided one decimal place on temperature readings.  Can you check under the Advanced tab of the Netatmo device - you should see full-precision temperatures there.  Also, they should appear in child temperature devices.

There's never been an update to the App Store install, but there are numerous incremental releases posted on this board adding extra features (different icons, plotting of results, ...)  I will try and roll all this up into a new release.  But the basics should work out of the box.




Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 04, 2014, 05:24:09 pm
You are right, thanks for the reply. Now I'm curious for the update. ;)
Title: Re: Netatmo Weather Station plugin
Post by: veuch on February 05, 2014, 10:50:31 am
Hi,

I am new on this forum, and I just got a vera lite. After a difficult start (it was shipped with UI6, which is not compatible with most plug-ins), I am starting to have fun with it.

I am considering the purchase of the netatmo weather station, this device looks great, and the integration with the vera seems promising.
I already have the Netatmo thermostat, and according to the dev resource, it uses nearly the same API as the weather station. Does anybody have this thermostat and looked at the possible integration with the vera?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 05, 2014, 11:59:20 am
Welcome to the forum.

I've no idea whether the app runs on UI6, but would be very interested to find out! I'll have to make it work there sometime, so I'll do my best to support you if you get one.

I haven't seen the API for the thermostat,but the weather station one is very good, so I presume the extension to a thermostat would be straight-forward, in theory.
Title: Re: Netatmo Weather Station plugin
Post by: veuch on February 05, 2014, 12:11:04 pm
Concerning UI6, I do not have any problems, since I've been able to downgrade to UI5 :)

Concerning the thermostat, I will do some more research and post my results here.
Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 05, 2014, 04:50:24 pm
The plugin seems to work well with UI6.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 05, 2014, 05:33:13 pm
The plugin seems to work well with UI6.
Oh, wow, thanks!
Who'd have thought it?

Are you using the alternate icons (Netatmo-like)?
And modified Temperature and Humidity json files to show units?

Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 06, 2014, 01:18:44 pm
Right now I use the standard version with an additional indoor station.
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on February 13, 2014, 06:45:56 am
akbooer, is there any way to incorporate the weather warnings you receive from Netatmo into the plugin, eg Fog, Windalarm etc?
Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 13, 2014, 06:52:55 am
+1 for this!

I'm searching for a weather warning plugin for a while.
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on February 13, 2014, 06:54:17 am
well I think your thread about Hurricanes, made me think that I get warnings on my iphone from the Netatmo (we have no hurricanes here, just strong wind)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 13, 2014, 08:31:58 am
akbooer, is there any way to incorporate the weather warnings you receive from Netatmo into the plugin, eg Fog, Windalarm etc?
It's a good idea, but what would you want it to do that you can't do with the Netatmo system anyway?  I will look at the API again, but last I looked they didn't let you pull out the weather stuff (licensing issue with MeteoWeather, I guess.)
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on February 13, 2014, 09:47:44 am
eg windcode yellow means I need to automatically lift my sunscreen, not sure on the usecases yet......
Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 13, 2014, 09:49:46 am
That's my usecase. Right now I use several weather stations around me and if wind speed goes over X sunscreen closes to prevent damage. Why not having another security layer.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 13, 2014, 10:22:13 am
Yes, well that makes sense.  But I can't see how to get the info apart from hacking some of the undocumented data, and it may not even be there, unless I'm mistaken.
Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 13, 2014, 10:48:09 am
I would even prefer this one (for Europe in my case)

http://www.wunderground.com/weather/api/d/docs?d=data/alerts

Sounds possible but how to do it, I don't know.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 13, 2014, 11:38:19 am
Thanks for the link.  Looks very do-able.  I'll add to the list, but couldn't say when I might get to it.
Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 14, 2014, 03:11:46 am
Nice to hear, thanks. I can't wait. ;)
Title: Re: Netatmo Weather Station plugin
Post by: AppieHeijn on February 14, 2014, 06:07:44 am
@akbooer
Thanks for developing this plugin! It works great.
I only have one future request, please tell me if it's possible.

I would like to use the noise meter as a condition in my "automatic turn off the lights script @ 00.30"
When we have visitors it can be later than 00.30 that we turn the lights off so if I can use the noise meter as a condition I can make the following.

Advanced tab:
Scene is 'active' when all devices in the scene are properly set
Lights Living Room newtargetvalue 0
#23 Inside - Noise lower than 40Db

Is this kind possible this way or do I need to use LUUP for that. Now i cannot choose any option after adding the Noise meter device.

Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 14, 2014, 06:45:29 am
Not sure if you will be satisfied with this. If you have visitors and you are quiet at the moment the Netatmo measures the noise level, then the lights go out. I think that's only the case every 10 minutes. I like the idea though.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on February 14, 2014, 06:51:47 am
@AppieHeijn

You can achieve what you describe using the Program Logic Event Generator plug-in.
Title: Re: Netatmo Weather Station plugin
Post by: AppieHeijn on February 14, 2014, 06:58:09 am
Not sure if you will be satisfied with this. If you have visitors and you are quiet at the moment the Netatmo measures the noise level, then the lights go out. I think that's only the case every 10 minutes. I like the idea though.
Yeah almost right ;) but my static noise is 35 due to some vibration noise(my guess) from the NAS close to the Netatmo, so only being in the room will drive it up to over 40dB.

@AppieHeijn

You can achieve what you describe using the Program Logic Event Generator plug-in.
Yeah already looking in to that one, but for me this is a bit to complicate. When I see the codes I understand what it does most of the times. But to come up with a working code myself.... horrible.

What I need to do is creating a schedule I Guess.
Also create a condition (Noise=<40)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 14, 2014, 07:07:26 am
Not sure if you will be satisfied with this. If you have visitors and you are quiet at the moment the Netatmo measures the noise level, then the lights go out. I think that's only the case every 10 minutes. I like the idea though.
Not sure about that.  I think these are integrated over time, rather than momentary.
Title: Re: Netatmo Weather Station plugin
Post by: guest140520 on February 14, 2014, 08:07:54 am
I have 35 db too. I think it is the lowest possible noise detected by Netatmo as it is really very quiet at my place.

Good to hear it is integrated over time - which makes sense when thinking about.

So now you have me interested in this too. ;)
Title: Re: Netatmo Weather Station plugin
Post by: gregku on February 16, 2014, 05:02:18 am
How load explizipt unit station.

I have the netatmo from my friend (by sharing), this station I don't like in my vera.

When I connect or relaod, then load everthing all unit stations inclusive child stations.

How delete a child station?

Thanks for the tipp.
Title: Re: Netatmo Weather Station plugin
Post by: Crismaison on February 16, 2014, 05:35:21 pm
I have it set as kind of an extra alarm detection. If i am away snd noise > 55 there is something wrong.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 18, 2014, 04:57:20 am
Need help, please.

My device shows a red LED on the left upper corner and on the bottom a message "Lua Startup Failure". ClientID, ClientSecret, Username and Password are ok.

Best regards - Kullematz
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 18, 2014, 04:17:01 pm
Sorry to hear that.
Answers to these (and other) questions will help diagnose the problem.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 19, 2014, 03:32:25 am
Thanks for your prompt response.

I installed it via the App Store.
Version No: 2013.10.25 @ akbooer
Vera's log: Authorisation failed

Have a good day - Kullematz
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2014, 05:13:29 am
Are you quite sure that you have the ClientID and ClientSecret keys the right way round?

[Edit] --- I would suggest anyway that you upgrade to the version posted here: http://forum.micasaverde.com/index.php/topic,16276.msg142231.html#msg142231 (http://forum.micasaverde.com/index.php/topic,16276.msg142231.html#msg142231)
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 19, 2014, 06:18:27 am
I'm sure, ClientID and ClientSecret keys are the right way round.

As you recommended, I downloaded the two LUA-Files but I'm not sure how to install them. You said via Vera UI web page, but how?

Many thanks for your help.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2014, 07:50:26 am
Get to the page for loading files by following the tabs on the UI5 page: APPS > Develop Apps > Luup files then select the files you want to download using one or more of the Browse buttons (in your case, that's two).  Tick the box that says "Restart Luup after upload" and press the "Go" button.  Wait for Luup to restart, then just to be safe, reload your browser page.


Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 19, 2014, 08:08:09 am
Thanks, done, same problem as before, but now with a new version # 2013.12.17.

I even reinstalled the Netatmo plugin from the app store, entered ID, Secret, User and Passwort again. I don't know is this relevant or not, but when I installed the plugin, I got an error message "unable to check installation status..."

Thx and kind regards - Kullematz

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2014, 09:30:39 am
I'm really at a loss to explain this. I didn't actually think it was the version problem, but (when it works) it's worth having the latest.  The symptom you describe is simply an authorization failure... one of the credentials must be wrong...
I'm sure you've checked all this, but I've not run across anyone else with this problem, so I can't explain it by a coding error.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2014, 09:32:43 am
Just another thought... Your registered application is actually enabled on the Netatmo web site?  These can be turned on and off individually.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 19, 2014, 10:08:38 am
Yeah, it's enabled on dev.Netatmo. I'm still wondering why an error occures at installation of the plugin.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 19, 2014, 10:16:20 am
...and why is there a "Lua Startup Failure" as shown under the device on the dashboard?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2014, 10:19:04 am
Yeah, it's enabled on dev.Netatmo. I'm still wondering why an error occures at installation of the plugin.

You mean at startup, not installation?

The plugin authenticates at startup and thereafter just rotates access tokens.  So if it's going to fail because of authorisation, it's going to happen at the start.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 19, 2014, 10:28:53 am
There was (twice) an error at installation and there is still a message line "Lua Startup Failure" under the device on the dashboard.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2014, 10:32:36 am
Yes, the authorisation failure results in a startup failure because there's no recovery possible.  This could happen because of a network problem at startup. 

Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 19, 2014, 10:46:11 am
It's UI5 and a Vera lite with current FW.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 20, 2014, 04:51:27 am
@akbooer: As recommended, I just changed my password without special characters, and it works!  :)

Many thanks for your help - Kullematz
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 20, 2014, 05:39:38 am
@akbooer: As recommended, I just changed my password without special characters, and it works!  :)

Many thanks for your help - Kullematz
No, thanks for your help!

Please find attached an update Lua file which uses URL escapes to encode special characters, so you should now be able to revert to using them.

Note, however, that Vera itself, in the context of displaying device variables still has problems with some characters (") for example.

I would be grateful of confirmation that this does, indeed, fix the problem for you.

Thanks again.

Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 20, 2014, 08:57:11 am
1. Loaded the new Lua file.
2. Changed my Netatmo password, incl. one special (+) character.
3. Changed password in the device on the dashboard.
4. Got the former explained "Authorisation failed".
5. Changed password again without special character, first in Netatmo and thereafter in the device on the dashboard.
6. Everything is fine!

Hope this helps
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 20, 2014, 10:26:57 am
Darn, thought I had fixed it!  It worked for me when I tried with @# in there.  At least I haven't actually made it any worse.

You did actually restart after loading the file ?

Thanks anyway. I must try harder...
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 20, 2014, 10:52:01 am
Yes, I restarted after loading the file.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 20, 2014, 11:07:54 am
Sorry, it worked even with a "+" characters in the password!

It was simply my mistake when I downloaded your new lua-file, the old file was still in my download area with the consequence, that the name of your new lua-file was automatically extended with a (1) and therefore couldn't replace the old lua-file.

Again, sorry for the irritation!
 
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 20, 2014, 06:47:27 pm
Ah, good news again.  This has had more ups and downs than the half-pipe in the Olympics.  But glad we achieved gold in the end!
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on February 21, 2014, 03:34:28 am
Yes, you are absolutely right!

Many thanks for your patience and commitment!

Best regards and have a good day - Kullematz
Title: Re: Netatmo Weather Station plugin
Post by: capjay on March 12, 2014, 08:10:44 am
@akbooer,

looks like NetAtmo has announced a new "authentication permission model" where after March 26 the older method won't work. Are you aware of this? It'll probably affect the plugin: http://dev.netatmo.com/doc/authentication/scopes
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on March 12, 2014, 08:36:27 am
It seems like this change will only affect the Thermostat and as far as I know this plugin does not yet support the thermostat.

Quote
After the 26th of March 2014, if no scope is provided the application will only have access to read_station method (getuser, devicelist (for station), getmeasure (for station)).

That means that every application that has not taken the scope into account will not be able to access the thermostat data after the 26th of March.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on March 12, 2014, 09:50:19 am
@akbooer,

looks like NetAtmo has announced a new "authentication permission model" where after March 26 the older method won't work. Are you aware of this? It'll probably affect the plugin: http://dev.netatmo.com/doc/authentication/scopes

Yes, thanks, I'm aware... they emailed all the developers, but as @korttoma says, it doesn't affect the weather station. I do, however, plan to update the app accordingly.

If someone wants to buy me a thermostat, I'll happily add that to the app too!
Title: Re: Netatmo Weather Station plugin
Post by: AgileHumor on March 12, 2014, 02:48:48 pm
How have you folks enjoyed the Netamo?

I was interested, but hoped that I would have gotten the CO2 reading from the Nest Protect's...but sadly Nest/Google has not opened this API. 

I do have temp integrated in to my Motion Sensors inside the house...and one Aeon Temp/Humidity/Motion in my covered downstairs patio. 

Is either the Aeon that bad...or the Netamo that good...at getting accurate readings?
Title: Re: Netatmo Weather Station plugin
Post by: lininger on March 12, 2014, 10:09:43 pm
Confusion  :'(

I installed the plugin from the app store.
When I go to dev.netamo.com to create an app what am I supposed to enter in the Website: and Redirect URI (Callback URL): fields?

Thanks

Title: Re: Netatmo Weather Station plugin
Post by: capjay on March 13, 2014, 12:33:18 am
When I go to dev.netamo.com to create an app what am I supposed to enter in the Website: and Redirect URI (Callback URL): fields?

keep them blank...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on March 13, 2014, 07:31:27 am
How have you folks enjoyed the Netamo?
[...]
Is either the Aeon that bad...or the Netamo that good...at getting accurate readings?

I'm a fan of the Netatmo - I have two stations and one additional module, and used them to replace a number of Everspring ST814 devices.

The attached plot shows why: Vera's flaw in only reporting Z-Wave temperature to the nearest degree.  Here is a comparison of a Netatmo sensor next to an Everspring one...

Title: Re: Netatmo Weather Station plugin
Post by: BulldogLowell on March 13, 2014, 09:05:23 am
How have you folks enjoyed the Netamo?
[...]
Is either the Aeon that bad...or the Netamo that good...at getting accurate readings?

I'm a fan of the Netatmo - I have two stations and one additional module, and used them to replace a number of Everspring ST814 devices.

The attached plot shows why: Vera's flaw in only reporting Z-Wave temperature to the nearest degree.  Here is a comparison of a Netatmo sensor next to an Everspring one...

i have some Aeon devices and they are not accurate, but they are precise.  I use them for two functions:

a) looking for a humidity spike in a bathroom (shower on) in order to turn on an exhaust fan automatically
b) looking for a rise in humidity when the house is unoccupied and triggering the A/C to come on.

Because they are precise, it works for both. It has always bothered me that when placed in the same chamber for a time with a real hygrometer from our lab, one was 2% lower than actual and the other was 5% above.  So, I adjusted my triggers accordingly but being somewhat OCD, it really bothers me.

"Vera's flaw in only reporting Z-Wave temperature to the nearest degree"

Im trying to understand how this is a flaw in Vera.  My thermostat only reports temperatures in whole degrees Fahrenheit, and can only be set in whole degrees Fahrenheit.  And, are you not using Vera to record this data, which includes decimals of degrees Celsius?  I would think this is a limitation of the thermostat, not of Vera... am I understanding this correctly?

That being said, the Netatmo is on my birthday list :), because I am really concerned about mold in my house if is unoccupied for a while.  For me, (b) is important to make sure that the humidity is accurate and precise.  It can't replace the functionality in (a) as I don't think I'll be putting the sensor in a bathroom.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on March 13, 2014, 12:41:13 pm
Im trying to understand how this is a flaw in Vera.  My thermostat only reports temperatures in whole degrees Fahrenheit, and can only be set in whole degrees Fahrenheit.  And, are you not using Vera to record this data, which includes decimals of degrees Celsius?  I would think this is a limitation of the thermostat, not of Vera... am I understanding this correctly?
No, I don't think so.  The UPnP standard requires temperatures, in Celcius, in units of one hundredth of a degree.  MCV chose to break the standard by ignoring this.  You're lucky that in Fahrenheit you have 9/5 times the resolution of Celcius.

Quote
That being said, the Netatmo is on my birthday list :), because I am really concerned about mold in my house if is unoccupied for a while.  For me, (b) is important to make sure that the humidity is accurate and precise.  It can't replace the functionality in (a) as I don't think I'll be putting the sensor in a bathroom.
I cannot say how accurate any of these measurements are.  I'm actually astonished that you got 2% and 5% in testing.  I've seen offsets of at least 10% in humidity between various devices.  There's threads elsewhere on this. The plot shows that resolution brings a far better understanding of variations.  So far as accuracy goes, I included a calibration offset in all the Netatmo child devices just to accommodate the needs of people like yourself   ;)
 
Title: Re: Netatmo Weather Station plugin
Post by: BulldogLowell on March 13, 2014, 12:57:54 pm
well, its 7% across the two sensors so, not inconsistent with your 10%!

So, when I travel I sometimes see that thermostats in C can be set to half degrees.  Are you saying your thermostat increments in half-degrees C but Vera doesn't recognize that?



Title: Re: Netatmo Weather Station plugin - new rain gauge
Post by: akbooer on April 11, 2014, 03:00:28 am
I see this is now available in Europe...

http://www.amazon.de/gp/product/B00J5OHDGG?ie=UTF8&camp=3206&creative=21426&creativeASIN=B00J5OHDGG&linkCode=shr&tag=wwwmeteowarec-21&qid=1396128119&sr=8-2&keywords=netatmo+regenmesser (http://www.amazon.de/gp/product/B00J5OHDGG?ie=UTF8&camp=3206&creative=21426&creativeASIN=B00J5OHDGG&linkCode=shr&tag=wwwmeteowarec-21&qid=1396128119&sr=8-2&keywords=netatmo+regenmesser)
Title: Re: Netatmo Weather Station plugin - new rain gauge
Post by: korttoma on April 11, 2014, 03:33:23 am
I see this is now available in Europe...

http://www.amazon.de/gp/product/B00J5OHDGG?ie=UTF8&camp=3206&creative=21426&creativeASIN=B00J5OHDGG&linkCode=shr&tag=wwwmeteowarec-21&qid=1396128119&sr=8-2&keywords=netatmo+regenmesser (http://www.amazon.de/gp/product/B00J5OHDGG?ie=UTF8&camp=3206&creative=21426&creativeASIN=B00J5OHDGG&linkCode=shr&tag=wwwmeteowarec-21&qid=1396128119&sr=8-2&keywords=netatmo+regenmesser)

Seems like we will have to wait another month for this. Only pre-orders can be made and netatmo promise to ship to customers within 15 days. Other sites like amazon and conrad mention in stock dates as May 9th and May 16th...

I just hope my Veralite will cope with me adding the rain sensor and an additional indoor sensor from netatmo since it seems like I'm reaching its memory limits again..
Title: Re: Netatmo Weather Station plugin - new rain gauge
Post by: akbooer on April 12, 2014, 08:35:58 am
I just hope my Veralite will cope with me adding the rain sensor and an additional indoor sensor from netatmo since it seems like I'm reaching its memory limits again..

These will just add additional child devices to the Netatmo parent app, so really very minimal memory usage.  I'll also take the opportunity to add the latest understanding of how to reduce app memory usage.

I may also add a more permanent database for the readings so that they can be plotted over a longer time (although this does then duplicate some of the native Netatmo stand-alone phone app functionality.)
Title: Re: Netatmo Weather Station plugin - memory usage
Post by: akbooer on April 16, 2014, 05:59:38 pm
Regarding memory usage of the Netatmo plugin, I've recently added explicit memory management to the app.  The result is shown on the attached plot of the last week's worth of data from my Netatmo instance (two stations, one additional module.)

At around 12 noon on April 14, I switched on the manually-triggered garbage collection, and you can see the effect:

Whilst I'm unsure as to the overall system impact, I'm trying to be a good 'Vera plugin citizen' and minimise use of resources.  The app's memory usage previously was not bad, but I think this is better.  In fact, I think it's rather good.

Updated code attached.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on April 17, 2014, 01:18:49 am
Create work akbooer!! I will try it out immediately and let you know if I encounter any issues.
Title: Re: Netatmo Weather Station plugin
Post by: macrho on April 17, 2014, 05:46:26 am
Uploaded the file and rebooted and reloaded but keep getting:

Netatmo : Lua error
Netatmo[252] : Lua Engine failed to start
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on April 17, 2014, 06:04:55 am
Uploaded the file and rebooted and reloaded but keep getting:

Netatmo : Lua error
Netatmo[252] : Lua Engine failed to start

Hmm, I did not get any errors in my system.

Can it be dependent on the new version of L_Netatmo2.lua posted back in December? ( I have this file on my system)
Try uploading the file again.

btw, I have a Veralite running version: 1.5.622
Title: Re: Netatmo Weather Station plugin
Post by: macrho on April 17, 2014, 07:40:58 am
thank you korttoma, that was it. wasn't monitoring the thread and didn't know the app doesn't auto-update so was behind
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 17, 2014, 09:34:33 am
Uploaded 2 files as per korttoma now getting Netatmo: Authorisation failed. Have checked and my info is correct. Any ideas?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 17, 2014, 09:49:46 am
Uploaded 2 files as per korttoma now getting Netatmo: Authorisation failed. Have checked and my info is correct. Any ideas?
So sorry about that.  There have not been any changes to the authorization code.  Could I suggest that you load the Netatmo.lua file in that December 19 post and try that version.

Thanks, BTW, to @korttoma for suggesting the correct fix to @macrho.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 17, 2014, 10:03:30 am
akbooer, have done as you suggested and I am now able to access Netatmo again. Many thanks
David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 17, 2014, 10:06:59 am
Well, that's good news and bad news!
I don't suppose you'd be up to trying out the latest one again ?
Just to convince ourselves that I have broken something...  I'm really puzzled.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 17, 2014, 10:11:13 am
There have not been any changes to the authorization code.

Actually, I may have lied.  You don't happen to have any special characters in your password, do you ?  eg. @#$%^&*()

I know you're supposed to have these things in passwords, and I do, and it works, but I did try and fix a problem a while back for someone who had a really strange character in there. 

Just a thought.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 17, 2014, 10:16:29 am
akbooer
Tried the new file again "Authorisation failed". I have Vera 3 on firmware 1.5.622 , 2 additional modules to my Netatmo weather station (Rain Gauge pre-ordered!!!!!). Password has no special characters in.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 17, 2014, 10:39:03 am
Well OK, that's fairly conclusive, but puzzling since it works for others.
You have got ClientSecret and ClientID the right way around?
(shouldn't be a problem unless you reentered them manually.)

Anyway, glad you're up and running again.

PS: Did you pre-order the rain gauge from Germany or elsewhere?
 I can't find any data on the API for it, but I'll definitely need one to test anyway.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 17, 2014, 11:16:22 am
ClientSecret and ClientId are correct (checked with dev.netatmo.com).
Rain gauge ordered direct from Netatmo web store.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 17, 2014, 11:38:23 am
Rain gauge ordered direct from Netatmo web store.

I've done the same just now, and will endeavor to fix your authorization problem when I upgrade the app to handle the gauge.

Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 17, 2014, 03:26:04 pm
Quick question(s):

I ordered mine today and it will be here tomorrow (I paid $3.99 for 1 day prime shipping). I am curious if vera app in the store is the most current version, or if I have to go searching through the thread to get the most updated files. I just want to make sure I'm prepared to get it up and going when it gets here.

I am curious where you all put your netatmos (indoor units). I was really hoping it was smaller, but it's not. I do think it will be smaller than I think it is though. I was hoping to put it up and out of the way, but it has to be plugged in. I guess the main unit I will put a common area. I was also hoping for it to be battery operated, but I think that was just foolish of me. The main unit just has to do too much. Though since it has to be plugged in, having an Ethernet jack would have been nice...maybe with POE.

I also just found out that the additional ones don't support sound. I was hoping to use it as sort of an occupancy sensor. I guess that's out (though I can use it in that one room). I am also not exceptionally happy that it maxes out at 3 interior addons. I was hoping to eventually do one for every room. Does anyone run more than 1 main unit with multiple add-ons?

Thoughs:

The main reason I actually got it was for the outside monitoring as opposed to the inside monitoring. If it works well enough I will buy the rain gauge as well, though once again I am a bit disappointed to see that it appears to be something that sits on a table as opposed to mounting it (I'm willing to be wrong). There isn't a ton of information on it at their site (click the image on the front page puts it in their cart, which I find very odd).

I also hope that they consider adding a wind module as well. That would be just about everything.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 17, 2014, 04:57:39 pm
I am curious if vera app in the store is the most current version,
No, it isn't.

Quote
or if I have to go searching through the thread to get the most updated files.
No, I've attached the latest, although there are additional icon files, etc., if you want it to look really cool.  I'll try and add those later too.

Quote
I am curious where you all put your netatmos (indoor units). I was really hoping it was smaller, but it's not. I do think it will be smaller than I think it is though. I was hoping to put it up and out of the way, but it has to be plugged in. I guess the main unit I will put a common area. I was also hoping for it to be battery operated, but I think that was just foolish of me. The main unit just has to do too much. Though since it has to be plugged in, having an Ethernet jack would have been nice...maybe with POE.
I have two main stations and one additional module.  The main modules are in the living room (hidden at the back of a shelf with a convenient power outlet.) and in a home office - not at all obtrusive, indeed, rather tasteful.  The additional ones are in (1) a guest bedroom, (2) outdoors (sheltered), (3) in a garage (where monitoring humidity is important because of the contents.)

There is, indeed, actually no way that a WiFi device could usefully be battery powered (unless it was a car battery.)

Quote
I also just found out that the additional ones don't support sound. I was hoping to use it as sort of an occupancy sensor. I guess that's out (though I can use it in that one room). I am also not exceptionally happy that it maxes out at 3 interior addons. I was hoping to eventually do one for every room. Does anyone run more than 1 main unit with multiple add-ons?
Too bad, it is what it is!  As I've said, I do use multiple main units.

Quote
The main reason I actually got it was for the outside monitoring as opposed to the inside monitoring. If it works well enough I will buy the rain gauge as well, though once again I am a bit disappointed to see that it appears to be something that sits on a table as opposed to mounting it (I'm willing to be wrong). There isn't a ton of information on it at their site
It actually comes with a fairly useless strap to attach it to a downpipe or some such.  I have it on a shelf in an external covered area.

Quote
I also hope that they consider adding a wind module as well. That would be just about everything.
Yes, let's hope so.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 17, 2014, 05:06:34 pm
Thanks @akbooer. I really appreciate you taking the time to answer my questions and attach the latest files. I realize that it is what it is. I actually bought it regardless of these "shortcomings" (if you can call them that). I am happy that you can run more than 1 main unit. I may opt to do that.

That being said, do you actually see any benefit to having multiple outdoor units (since you run 2)? It seems like you are using one of the outside ones inside. Is that correct?

Either way, I'm not putting the product down. I'm sure it will meet and exceed my needs right now. I will get the rain meter once I figure out a good place to put it. IF it's shaped like I think it is, it might be a bit difficult to mount, but I'll leave final judgement until I can actually see the device in use.

Thanks again for the answers. I'm hoping to get this and then DataYours (eventually) set up to keep track of the data over long spans of time.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 17, 2014, 05:53:16 pm
It seems like you are using one of the outside ones inside. Is that correct?
Yes, that's right.

Quote
I'm hoping to get this and then DataYours (eventually) set up to keep track of the data over long spans of time.
A full beta test of DataYours is about to begin - just trying to finish up the documentation.  The basic system has been running for over two months.  It's the UI and the configuration details (as usual), not to mention the documentation, which takes time.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 18, 2014, 07:46:58 pm
@akbooer
So this is what I did (tell me if I messed this up):

Installed the app from the app store
used winwsc to copy over the 2 files from your second to last post to /etc/cmh-ludl

Some thoughts:
in etc/cmh-ludl I see that all the files from the plugin have .lzo at the end
there is a L_Netatmo.lua.lzo. Will the L_Netatmo.lua overwrite this or do I need to do something else?
There is no L_Netatmo2.lua. Is this a new file or was it supposed to overwrite something?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 19, 2014, 02:49:45 am
No, you haven't messed up, this should be fine.

The .lzo indicates that these files have been compressed (saves about 50% of the space).  This is quite normal in the transfer process and they get uncompressed automaically when needed.

The Netatmo2.lua file is a new one for more recent versions.  It contains the graphics library, other utilities, and a JSON module which used to be separate.

All, then seem to be well from your description.  A number of the device variable that used to be needed for configuration are now redundant, but there's nothing to be done.

Title: Re: Netatmo Weather Station plugin - memory usage
Post by: akbooer on April 19, 2014, 06:14:48 am
Regarding memory usage of the Netatmo plugin, I've recently added explicit memory management to the app.  The result is shown on the attached plot of the last week's worth of data from my Netatmo instance (two stations, one additional module.)

Just a follow up to the above.  I attach another snapshot of memory usage showing how it flat-tops after a while, as expected.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 21, 2014, 11:39:06 am
I've been using this plugin for a the past few days (Since getting the netatmo on friday). I have to say that it is working great and while I think I'm having memory issues, I don't think this contributed to it or even really affected it much.

I do have a question about Netatmo in general. I've read reviews, posts on the Netatmo forums, and around the net about the humidity sensors in them. Is anyone else experiencing readings that are off by more than a little bit? I have 3 hygrometers in my house: 1 Netatmo, 1 Aeon multi-sensor and 1 analog old fashioned one.  The last is the one that I am putting my most faith in for right now. Here are what the readings are as of right now:

office (analog) - 54%
Living room (Netatmo) - 66%
Utility closet (Aeon) - 40%

To me it seems like the analog would be where I would think it would be for this time of year, with the A/C on and not having kicked in for several hours (Which it won't do until about noon because night temp is 75 deg and day is 80 deg and it takes that long to warm up the house). It normally sits right around 50% when the A/C is on

I will note that I have the outside unit on my back porch and it reads within 1% of the Aeon multi-sensor that is out there. So at least that one seems to be working correctly (I wouldn't think 2 sensors from to manufacturers would be off the same amount to a great degree). I am also going to gather up the 3 indoor sensors and put them all in the same spot for a few days to see the exact difference.

Please note that I also know that: 1) You are supposed to let them "settle" for 2 weeks (which makes no sense to me) and 2) they can "calibrate" it if you call support, but to them "calibrating" means just adjusting the data they get by adding or subtracting from the reading. This means if your hygrometer is off by +15% then you'll never get above an 85% reading, something that is unacceptable to me as we can get 100% humidity in FL during the summer and was one of the reasons I like the Netatmo (it can do up to 100% humidity).

I'm also not ragging on the device. I don't really need to know the interior humidity of my house in Vera right now and as long as the external one is somewhat accurate, I'll be happy. I was just seeing if maybe I am in the minority in which I will try to swap them out for another set and see if the next set is any better.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 21, 2014, 11:52:41 am
This has certainly been discussed elsewhere on the forum.  Humidity is a difficult measurement to make accurately.  I would not be at all surprised to see the variations you talk about in different rooms - really the only way is a side by side test.  Given a fixed amount of water vapour in the atmosphere then humidity and temperature are anti-correlated, so you have to bear this in mind when making comparisons.

I appreciate what you say about having 100% on the scale (I used to live in Houston!) but in fact you can add a calibration offset on each of the child devices (there's an offset device variable) if you're displaying those... you don't have to call support.

Are you, by the way, using the modified JSON files for temperature and humidity to show measurement units, and the alternate icons, or are you sticking with the basic set?

Title: Re: Netatmo Weather Station plugin
Post by: BulldogLowell on April 21, 2014, 11:53:15 am
Don't forget about the relationship of RH with temperature.

You should look to see how much variation in temperature between thermometers; co-located.


Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 21, 2014, 12:11:48 pm
This has certainly been discussed elsewhere on the forum.  Humidity is a difficult measurement to make accurately.  I would not be at all surprised to see the variations you talk about in different rooms - really the only way is a side by side test.  Given a fixed amount of water vapour in the atmosphere then humidity and temperature are anti-correlated, so you have to bear this in mind when making comparisons.

I appreciate what you say about having 100% on the scale (I used to live in Houston!) but in fact you can add a calibration offset on each of the child devices (there's an offset device variable) if you're displaying those... you don't have to call support.

Are you, by the way, using the modified JSON files for temperature and humidity to show measurement units, and the alternate icons, or are you sticking with the basic set?

I'm not sure if I am or not. I got the app from the app store, then put the 2 files you have above. I have not pushed any other extra files. I wouldn't mind trying them, but the files are a bit scattered around the thread and I was worried about grabbing the wrong files.

Don't forget about the relationship of RH with temperature.

You should look to see how much variation in temperature between thermometers; co-located.


Good point, I just move the 3 into the same room and all sitting next to each other. I will let them site for a while (likely a few days) and see how they are.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 25, 2014, 01:54:10 pm
Rain gauge has just arrived and installed. Rain arrived to help me test, but it is spring in the UK!!!
Seems to be accurate enough for a consumer device, looking forward to an update to the app!

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 25, 2014, 02:40:18 pm
Mine not yet arrived but I have started researching the API updates.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 25, 2014, 02:45:54 pm
This has certainly been discussed elsewhere on the forum.  Humidity is a difficult measurement to make accurately.  I would not be at all surprised to see the variations you talk about in different rooms - really the only way is a side by side test.  Given a fixed amount of water vapour in the atmosphere then humidity and temperature are anti-correlated, so you have to bear this in mind when making comparisons.

I appreciate what you say about having 100% on the scale (I used to live in Houston!) but in fact you can add a calibration offset on each of the child devices (there's an offset device variable) if you're displaying those... you don't have to call support.

Are you, by the way, using the modified JSON files for temperature and humidity to show measurement units, and the alternate icons, or are you sticking with the basic set?

I'm not sure if I am or not. I got the app from the app store, then put the 2 files you have above. I have not pushed any other extra files. I wouldn't mind trying them, but the files are a bit scattered around the thread and I was worried about grabbing the wrong files.

Don't forget about the relationship of RH with temperature.

You should look to see how much variation in temperature between thermometers; co-located.


Good point, I just move the 3 into the same room and all sitting next to each other. I will let them site for a while (likely a few days) and see how they are.

I've been testing my netatmo for the past week and I have to say that I'm not very happy with the results so far. On the good side:

1) The internal Temp seems to be accurate (Within 2 degrees of another thermometer)
2) The Outside Humidity seems to be accurate within a few % of my AeonLabs multi sensor (they can't both be really far off could they?!? LOL)

The bad:

1) The internal Humidity is off by 13% from both the analog and the aeon labs multi-sensor. In this case the AeonLabs is actually pretty accurate (Something that surprised me!)
2) The external temp is off. And it's not like "it's always off by 5 degrees". Its off as in at night it registers too hot, and in the day it registers too cold. This was compared to an AeonLabs multi-sensor. I think I'm gonna run to Home depot and get a cheap thermometer and put it next to them and check it for a couple of days as well. I've attached some images of my reports. The "temp" one ran longer, but I had to delete the whisper files due to an issue. Trust me in that it was the same for the days prior as well. It's a constant "misread"

I'm still undecided if I'll keep it. If I do, I know I will request to have them take the units back and fix their respective flaws. I don't consider "adjusting the Humidity" server side to be acceptable as that means I could have bad readings. I am also unsure if you use the "calibration" on their web app for the temp if it adjusts the humidity as well (As @bulldoglowell points out, relative humidity is tied to temp).

All that being said, let me say that this Plugin (and DataYours!) have been awesome and have met all my needs! I really appreciate the work that has been put into them. And honestly, if it wasn't for the odd behaviour of the outside temp, I would probably be keeping it for sure as the inside Humidity really does seem to be only 13% off at all times and I could adjust that.

Edit: Let me know that the 2 external sensors are withing 1-2 feet of each other. It's not like they are really far away from each other.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 26, 2014, 06:45:01 am
following last nights vera startup and my adding the rain gauge to the Netatmo station I am now getting netatmo startup lua failure, coincidence or problem?

David
Title: Re: Netatmo Weather Station plugin
Post by: BulldogLowell on April 26, 2014, 09:34:11 am
Quote from: SirMeili link=topic=16276.msg172655#msg172655 date

I've been testing my netatmo for the past week and I have to say that I'm not very happy with the results so far. On the good side:

1) The internal Temp seems to be accurate (Within 2 degrees of another thermometer)
2) The Outside Humidity seems to be accurate within a few % of my AeonLabs multi sensor (they can't both be really far off could they?!? LOL)

The bad:

1) The internal Humidity is off by 13% from both the analog and the aeon labs multi-sensor. In this case the AeonLabs is actually pretty accurate (Something that surprised me!)
2) The external temp is off. And it's not like "it's always off by 5 degrees". Its off as in at night it registers too hot, and in the day it registers too cold. This was compared to an AeonLabs multi-sensor. I think I'm gonna run to Home depot and get a cheap thermometer and put it next to them and check it for a couple of days as well. I've attached some images of my reports. The "temp" one ran longer, but I had to delete the whisper files due to an issue. Trust me in that it was the same for the days prior as well. It's a constant "misread"

I'm still undecided if I'll keep it. If I do, I know I will request to have them take the units back and fix their respective flaws. I don't consider "adjusting the Humidity" server side to be acceptable as that means I could have bad readings. I am also unsure if you use the "calibration" on their web app for the temp if it adjusts the humidity as well (As @bulldoglowell points out, relative humidity is tied to temp).

All that being said, let me say that this Plugin (and DataYours!) have been awesome and have met all my needs! I really appreciate the work that has been put into them. And honestly, if it wasn't for the odd behaviour of the outside temp, I would probably be keeping it for sure as the inside Humidity really does seem to be only 13% off at all times and I could adjust that.

Edit: Let me know that the 2 external sensors are withing 1-2 feet of each other. It's not like they are really far away from each other.

Great review.  The bad seems pretty consistent with some of the amazon reviewers experiences.

I'd like to buy one but at $180, I'd like it to be the device I trust to always be right. You can certainly spend a lot less for inaccurate hygrometers.  I tested the one in my humidor when I tested the Aeons, it was accurate within 3%.  It was $10.

Well, there goes another idea, now I have to put a Arduino hygrometer in my humidor.

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 26, 2014, 09:42:37 am
following last nights vera startup and my adding the rain gauge to the Netatmo station I am now getting netatmo startup lua failure, coincidence or problem?

No way for me to tell, yet.  Would it be easy to remove the gauge from your config again?

I'm away from my development system right now, but will take a look gleaning what I can from the API docs.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 26, 2014, 10:38:50 am
Akbooer. Removed rain gauge from my installation and lua startup worked perfectly. Reinstall gauge and get startup failure again. adding rain gauge affects the plugin.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 28, 2014, 07:55:40 am
@dsroberts1945

I've made some changes which may accommodate the new module, but I can't test them, other than knowing that they don't interfere with my existing Netatmo configuration.

Could you possibly :

I haven't done an icon for the device yet, but let's see if this works first.

Thanks.

Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 28, 2014, 08:23:20 am
Akbooer

Loaded new files, no success now getting "authorisation failure". Have checked and rechecked Client id and client secret plus user name and password, all are correct.

Ran (6) got the following;-

No handler

The rain gauge is working correctly in the Netatmo app and web page with no problems.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 28, 2014, 10:35:30 am
OK, sorry.  This is perhaps your old authentication problem.
I did change the code a while back.
Here's a special version with those changes reversed (but retaining the gauge updates) to see if that helps.
Needs the latest L_Netatmo2.lua file.

Not recommended for anyone else!
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 28, 2014, 11:14:53 am
Akbooer
Now loads with no startup failures, should I expect a child device for the Rain Gauge as there is none? Will pm you the Diagnostic file.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 28, 2014, 11:45:36 am
Excellent!

You would have to add "R" to the list of child devices in order to get a rain gauge.

Basic icon attached... to be transferred by scp to /www/cmh/skins/default/icons/

Thanks for the diagnostics PM.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 28, 2014, 01:38:22 pm
Now getting disheartened. Added R to list of devices and icon to icon folder. Did Vera 2 step several times, no child device appears. Vera 3 with firmware 1.5.622.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 28, 2014, 01:44:32 pm
Now getting disheartened. Added R to list of devices and icon to icon folder. Did Vera 2 step several times, no child device appears. Vera 3 with firmware 1.5.622.
No, well, don't do that!

Two things to try:
I'm doing the best I can without actually having the device.  The diagnostic dump is rich in information and does show the device is present.  I just need to spend more time on this.  The docs are cryptic IMHO.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 28, 2014, 01:57:31 pm
Akbooer

1 No
2 No

Appreciate all the effort you are doing without an actual device to test yet. The main thing is that the plugin is working for the major measurements which I'm using in my HVAC PLEG, I can wait for Rain Gauge in Vera as can see data in Netatmo App.
Many Thanks

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 28, 2014, 04:28:01 pm
Can you try this?

(I seem to have neglected to tell it that the rain gauge measures rain... just one letter difference between this and the previous version!)

Any better?
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 28, 2014, 04:38:26 pm
All is well, we have a rain gauge, now all I need is some rain! Well done many thanks.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 28, 2014, 04:46:31 pm
Yes!!  Thanks for your patience...

...it does mean that my rain gauge will work "out of the box" when it arrives, so thanks for that too.

I'll be doing some different icons for it to match the Netatmo-style ones, also an update to its control panel to make access to plots and diagnostics, etc., easy.  But hopefully this shouldn't get in the way of it actually working.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 29, 2014, 12:31:00 pm
Whilst I was working on the code, I thought I would add the updates I mentioned to the control panel...

...on the Control tab it now shows:
I'm toying with the idea of using a Whisper database for longer-term storage (so would work over restarts), but this would to some extent duplicate the functionality of Netatmo's own software, so perhaps not.

Anyway, updated files below.

PS: I would be anxious to know that the listing and treemap work for the rain gauge (mine still not arrived... AND it's raining!)

Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 29, 2014, 01:05:10 pm
I'm toying with the idea of using a Whisper database for longer-term storage (so would work over restarts), but this would to some extent duplicate the functionality of Netatmo's own software, so perhaps not.

I don't think you really need this as it duplicates the functionality of DataYours.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on April 29, 2014, 01:34:20 pm
Akbooer

New files work OK, the additions to the control panel are functioning correctly. Device list for Rain Gauge works, plotting zero rain for now!!!

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 29, 2014, 01:56:48 pm
You are my favourite beta-tester.  Thanks!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 29, 2014, 01:59:52 pm
I'm toying with the idea of using a Whisper database for longer-term storage (so would work over restarts), but this would to some extent duplicate the functionality of Netatmo's own software, so perhaps not.

I don't think you really need this as it duplicates the functionality of DataYours.

Fair point.   Although maybe not everyone would have DataYours installed (hard to imagine, I know.)
I certainly don't want to add unwanted bloat to the app.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on April 29, 2014, 02:10:48 pm
I'm toying with the idea of using a Whisper database for longer-term storage (so would work over restarts), but this would to some extent duplicate the functionality of Netatmo's own software, so perhaps not.

I don't think you really need this as it duplicates the functionality of DataYours.

Fair point.   Although maybe not everyone would have DataYours installed (hard to imagine, I know.)
I certainly don't want to add unwanted bloat to the app.

Yeah, my thinking is if they want that functionality, they can easily add it via DataYours. I would imagine that to get it to work you'd have to duplicate a lot of code between the two.

You are my favourite beta-tester.  Thanks!


You know, akbooer, that really hurts!!! It really, really hurts! :P
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 29, 2014, 02:46:45 pm
You are my favourite beta-tester.  Thanks!
You know, akbooer, that really hurts!!! It really, really hurts! :P

Oh! ah, well, you know. It wasn't really clear WHO that was aimed at.

I mean, obviously, CLEARLY, I have favourites for each application.  This was just posted on the Netatmo thread.  The DataYours thread would obviously have been different. Yes? Well, of course.

 :-[
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on May 06, 2014, 02:58:22 pm
Finally placed an order for one of them rain gauges. There is an active discount voucher at conrad.com at the moment so I just had to use that. I guess I will have to wait quite long for it though since they say it will be back in stock at 16th of may.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 06, 2014, 03:43:42 pm
Finally placed an order for one of them rain gauges...

Excellent!  Mine has been on back order for a while.  I suppose this explains it.  I'm rather expecting to have to make further changes in the app: rather than just recording averages over a uniform interval it might make much more sense to accumulate the values over, say, one day.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on May 08, 2014, 11:12:01 am
Just an update. The plugin, as expected, is still running wonderfully and meeting all my expectations! Thanks @Akbooer!

As to my "temperature" discrepancies, placing the NetAtmo next to a giant thermal mass, like say a CBS wall, could be the cause of all my outside temperature  issues (Temp too high during the night and too low during the day). The CBS might be affecting it as it holds onto heat longer at night (keeping it high) and holds on the the cold longer during the day (keeping it cooler). So my issue is, if this is true, that I can't place it next to my house as it affects the netatmo too much. Of course that is where they tell you to place it (under and eave where it won't get wet).

Luckily I have a back porch that is wood framed, so I have relocated it there. Its the same place that the Aeon 4-in-1 is located and so far for the past hour, their temps are keeping withing a set range of each other. I have about 3-4 days to decide if I want to keep it. I'm doing everything in my power to keep it, but it's not making it an easy choice (same with all the Aeon 4-in-1 sensors I tried).
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 08, 2014, 03:47:56 pm
As to my "temperature" discrepancies, placing the NetAtmo next to a giant thermal mass, like say a CBS wall, could be the cause of all my outside temperature  issues (Temp too high during the night and too low during the day). The CBS might be affecting it as it holds onto heat longer at night (keeping it high) and holds on the the cold longer during the day (keeping it cooler).

This is exactly my situation.  The Netatmo module is sheltered in a block wall carport, so heavily damped by its thermal mass.  Attach is a plot of the last week's temperatures compared to a nearby meteorological station.

I regard this as a 'feature' rather than a flaw in my monitoring system.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on May 08, 2014, 03:53:56 pm
As to my "temperature" discrepancies, placing the NetAtmo next to a giant thermal mass, like say a CBS wall, could be the cause of all my outside temperature  issues (Temp too high during the night and too low during the day). The CBS might be affecting it as it holds onto heat longer at night (keeping it high) and holds on the the cold longer during the day (keeping it cooler).

This is exactly my situation.  The Netatmo module is sheltered in a block wall carport, so heavily damped by its thermal mass.  Attach is a plot of the last week's temperatures compared to a nearby meteorological station.

I regard this as a 'feature' rather than a flaw in my monitoring system.

I had just not considered it was the CBS doing it until yesterday. I didn't get a change to move it until today. So far so good. I'm about 95% sure I'll keep it. My only issue now is the internal humidity, but I may be able to live with it being 13% off and just adjusting it either there or in the plugin.

I've heard some people mention they've sent them off to have them come back "fixed", but I'm worried that Netatmo takes them, adjusts the data on the servers and sends it back with no real hardware fix in place (just as a ruse).

My only other issue now is that it constantly tells me the CO2 levels are above 1,000. Yet they constantly go down to 400 or so. Granted, the house is closed up (it's hot outside), but still this seems odd. I'm not overly concerned about the CO2 levels though as I didn't even know they were  in there.

I am going to consider strongly getting the Rain meter in June.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 08, 2014, 04:06:46 pm
My only other issue now is that it constantly tells me the CO2 levels are above 1,000. Yet they constantly go down to 400 or so. Granted, the house is closed up (it's hot outside), but still this seems odd. I'm not overly concerned about the CO2 levels though as I didn't even know they were  in there.
You should expose them to 'fresh' air every week or so in order to establish the proper 400 ppm baseline.

Quote
I am going to consider strongly getting the Rain meter in June.
If I've received mine by then, the app should be updated and ready.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on May 08, 2014, 04:11:46 pm
You should expose them to 'fresh' air every week or so in order to establish the proper 400 ppm baseline.

I find this odd. What the manual actually says is that it assumes the levels drop to 400 once a day. I will likely just never use it because I plan on placing it and forgetting it. I don't want to be actively moving something around the house like that and it is less than likely that I will be willing to open up the house once a week in the Florida summer heat. Like I said though, I didn't know it was there, so I don't mind it. If anything, I will start to worry if it turns "red"... LOL

I can't wait for the rain stuff to work. I'm already starting a bit of research on replacing my (less than 1 year old) sprinkler controller with one I can control via the Vera. It's pretty low in the list, but the rain meter will be nice to have anyways. I only wish there was a way to "mount" it up high. It seems to be something that you put on a table. I may attache it to one of the posts on the privacy fence. That would likely work.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on May 08, 2014, 04:34:07 pm
[

I can't wait for the rain stuff to work. I'm already starting a bit of research on replacing my (less than 1 year old) sprinkler controller with one I can control via the Vera. It's pretty low in the list, but the rain meter will be nice to have anyways. I only wish there was a way to "mount" it up high. It seems to be something that you put on a table. I may attache it to one of the posts on the privacy fence. That would likely work.

The rain gauge has a standard tripod connection in the base which could be used to connect to weather station fixings. It also has screw holes in the base which I have used to attach to my greenhouse at a height of approx 5ft. So far my rain gauge is performing well although we have only had light rain.

David
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on May 08, 2014, 04:36:42 pm
[

I can't wait for the rain stuff to work. I'm already starting a bit of research on replacing my (less than 1 year old) sprinkler controller with one I can control via the Vera. It's pretty low in the list, but the rain meter will be nice to have anyways. I only wish there was a way to "mount" it up high. It seems to be something that you put on a table. I may attache it to one of the posts on the privacy fence. That would likely work.

The rain gauge has a standard tripod connection in the base which could be used to connect to weather station fixings. It also has screw holes in the base which I have used to attach to my greenhouse at a height of approx 5ft. So far my rain gauge is performing well although we have only had light rain.

David

Thanks for  the information! It was really hard to find specs on it (when I looked a few weeks ago). I'm glad to hear it has these options :)
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on May 09, 2014, 10:44:46 am
Ok, so I started getting this today. Its the first time I've noticed the plugin not update:

Code: [Select]
50      05/09/14 10:39:07.060   luup_log:125: Netatmo: HTTPS error = 400 <0x2da19680>
50      05/09/14 10:39:07.061   luup_log:125: Netatmo: get_measurements error <0x2da19680>

50      05/09/14 10:39:08.032   luup_log:125: Netatmo: HTTPS error = 400 <0x2da19680>
50      05/09/14 10:39:08.032   luup_log:125: Netatmo: get_measurements error <0x2da19680>
50      05/09/14 10:39:08.033   luup_log:125: Netatmo: Measurements polled <0x2da19680>
06      05/09/14 10:39:08.033   Device_Variable::m_szValue_set device: 125 service: urn:akbooer-com:serviceId:Netatmo1 variable: Timestamp was: Fri 10:29 now: Fri 10:39 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2da19680>
50      05/09/14 10:39:08.034   luup_log:125: Netatmo: Luup variables updated <0x2da19680>
06      05/09/14 10:39:08.035   Device_Variable::m_szValue_set device: 125 service: urn:akbooer-com:serviceId:Netatmo1 variable: AppMemoryUsed was: 388 now: 411 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2da19680>
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 09, 2014, 12:03:22 pm
Oh look, so did I...

Code: [Select]
09/05/2014 10:58:19.000 Netatmo[-1]: HTTPS error = 400
09/05/2014 10:58:19.000 Netatmo[-1]: Access token rotation FAILURE
09/05/2014 10:59:19.000 Netatmo[-1]: HTTPS error = 400
09/05/2014 10:59:19.000 Netatmo[-1]: get_measurements error
09/05/2014 10:59:20.000 Netatmo[-1]: HTTPS error = 400
09/05/2014 10:59:20.000 Netatmo[-1]: get_measurements error
09/05/2014 10:59:20.000 Netatmo[-1]: HTTPS error = 400

...can only suppose some problem with their servers.

It's possible to get into this mode if there is an authentication error at Luup Restart.  I should try and make this a little more robust.  I did also think of turning the icon red if there was such an error.

I take it that it's gone away now?  Mine's OK.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on May 09, 2014, 12:07:28 pm
Nope, still getting it. I will try restarting the Vera.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on May 09, 2014, 12:09:15 pm
Nope, still getting it. I will try restarting the Vera.
A restart fixed it. IT must have been an auth error when it did it's nightly restart at 2am.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 09, 2014, 12:37:20 pm
Yes, that's the way to fix it at the moment. This is what I meant by needing to make it more robust... it doesn't retry if it fails once.
Title: Re: Netatmo Weather Station plugin
Post by: dinkeldorf on May 12, 2014, 02:40:12 pm
Are they shipping? Website says "pre order".

[

I can't wait for the rain stuff to work. I'm already starting a bit of research on replacing my (less than 1 year old) sprinkler controller with one I can control via the Vera. It's pretty low in the list, but the rain meter will be nice to have anyways. I only wish there was a way to "mount" it up high. It seems to be something that you put on a table. I may attache it to one of the posts on the privacy fence. That would likely work.

The rain gauge has a standard tripod connection in the base which could be used to connect to weather station fixings. It also has screw holes in the base which I have used to attach to my greenhouse at a height of approx 5ft. So far my rain gauge is performing well although we have only had light rain.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 12, 2014, 03:41:01 pm
Still haven't got mine, yet.
Title: Re: Netatmo Weather Station plugin
Post by: freemann on May 12, 2014, 04:16:54 pm
Today i received my Rain Gauge and since i connected it to my base station, the plugin failed.

I read that akbooer's gauge is still in backorder and i was wondering if i could help you to make plugin compatible.
For example i could share my oAuth keys.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 12, 2014, 04:56:46 pm
... i was wondering if i could help you to make plugin compatible.

I have already released a version which supports the basic rain gauge function.  See these posts, earlier in the thread:

With thanks to @SirMeili and @dsroberts1945 for their help in Beta testing.
Title: Re: Netatmo Weather Station plugin
Post by: freemann on May 13, 2014, 03:36:03 am
This morning i installed the files and the plugin is updating the figures again.
It also added the 3 new devices for my second indoor sensor, but it isn't creating the Rain device.

Should i create is manually or ... ?

I looked at the diagnostics page, device tree/list (great features!!) and the all show my rain meter, but its not displayed.

The debug logging shows that its creating the devices for my Main indoor, outdoor and secondary indoor unit and not the rain gauge.

Here is my debug log;
Code: [Select]
02      05/13/14 9:31:23.532    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.533    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.533    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.534    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.535    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.536    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.537    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.537    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.584    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.585    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
02      05/13/14 9:31:23.586    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2b3c2000>
09      05/13/14 9:31:30.784    JobHandler_LuaUPnP::Run device 36 Netatmo room 10 type urn:akbooer-com:device:netatmo:1 id  parent 0/0x92a100 upnp: 0 <0x2b3c2000>
09      05/13/14 9:31:30.791    JobHandler_LuaUPnP::Run device 104 Slaapkamer - CO2 room 0 type urn:akbooer-com:device:NetatmoCO2:1 id 0x:0x:x0:0x:xc:x8-CO2 parent 36/0x97c560 upnp: 0 <0x2b3c2000>
09      05/13/14 9:31:30.797    JobHandler_LuaUPnP::Run device 39 Woonkamer  - CO2 room 1 type urn:akbooer-com:device:NetatmoCO2:1 id x0:ee:x0:x2:fx:0x-CO2 parent 36/0x929b00 upnp: 0 <0x2b3c2000>
09      05/13/14 9:31:30.797    JobHandler_LuaUPnP::Run device 41 Woonkamer  - Noise room 1 type urn:akbooer-com:device:NetatmoNoise:1 id x0:ee:x0:x2:fx:0x-Noise parent 36/0x9330b0 upnp: 0 <0x2b3c2000>
09      05/13/14 9:31:30.798    JobHandler_LuaUPnP::Run device 40 Woonkamer  - Pressure room 1 type urn:akbooer-com:device:NetatmoPressure:1 id x0:ee:x0:x2:fx:0x-Pressure parent 36/0x921210 upnp: 0 <0x2b3c2000>
50      05/13/14 9:31:32.216    luup_log:36: Netatmo: Netatmo initialisation... <0x2baf5680>
50      05/13/14 9:31:34.885    luup_log:36: Netatmo: user.administrative.unit = 0 <0x2baf5680>
50      05/13/14 9:31:34.886    luup_log:36: Netatmo: user.administrative.pressureunit = 0 <0x2baf5680>
50      05/13/14 9:31:34.886    luup_log:36: Netatmo: creating child devices... <0x2baf5680>
50      05/13/14 9:31:34.888    luup_log:36: Netatmo: Child = 37 x0:ee:x0:x2:fx:0x-Temperature (C) <0x2baf5680>
50      05/13/14 9:31:34.890    luup_log:36: Netatmo: Child = 38 x0:ee:x0:x2:fx:0x-Humidity (%) <0x2baf5680>
50      05/13/14 9:31:34.891    luup_log:36: Netatmo: Child = 39 x0:ee:x0:x2:fx:0x-CO2 (ppm) <0x2baf5680>
50      05/13/14 9:31:34.891    luup_log:36: Netatmo: Child = 40 x0:ee:x0:x2:fx:0x-Pressure (mbar) <0x2baf5680>
50      05/13/14 9:31:34.892    luup_log:36: Netatmo: Child = 41 x0:ee:x0:x2:fx:0x-Noise (dB re ?) <0x2baf5680>
50      05/13/14 9:31:34.893    luup_log:36: Netatmo: Child = 42 x2:x0:x0:0x:x1:9x-Temperature (C) <0x2baf5680>
50      05/13/14 9:31:34.894    luup_log:36: Netatmo: Child = 43 x2:x0:x0:0x:x1:9x-Humidity (%) <0x2baf5680>
50      05/13/14 9:31:34.894    luup_log:36: Netatmo: Child = 102 0x:0x:x0:0x:xc:x8-Temperature (C) <0x2baf5680>
50      05/13/14 9:31:34.895    luup_log:36: Netatmo: Child = 103 0x:0x:x0:0x:xc:x8-Humidity (%) <0x2baf5680>
50      05/13/14 9:31:34.896    luup_log:36: Netatmo: Child = 104 0x:0x:x0:0x:xc:x8-CO2 (ppm) <0x2baf5680>
50      05/13/14 9:31:34.896    luup_log:36: Netatmo: ...child devices created <0x2baf5680>
50      05/13/14 9:31:34.897    luup_log:36: Netatmo: Device initialised <0x2baf5680>
50      05/13/14 9:31:44.513    luup_log:36: Netatmo: Access tokens rotated <0x2c8f5680>
50      05/13/14 9:31:55.814    luup_log:36: Netatmo: Measurements polled __LEAK__ this:221184 start:1064960 to 0xf21000 <0x2c8f5680>
06      05/13/14 9:31:55.817    Device_Variable::m_szValue_set device: 36 service: urn:akbooer-com:serviceId:Netatmo1 variable: Timestamp was: Tue 09:23 now: Tue 09:31 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2c8f5680>
50      05/13/14 9:31:55.890    luup_log:36: Netatmo: Luup variables updated <0x2c8f5680>
06      05/13/14 9:31:55.891    Device_Variable::m_szValue_set device: 36 service: urn:akbooer-com:serviceId:Netatmo1 variable: AppMemoryUsed was: 623 now: 599 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2c8f5680>


Two things to try:
  • is there a new variable in the advanced tag relating to your rain gauge?
  • does the new device appear in the listing http://<YourVeraIP>:3480/data_request?id=lr_Netatmo&page=list ?
1. Yes
2. Yes

I have an Vera 3 with firmware 1.5.622

Plugin version; 2014.04.29 @akbooer
service; urn:micasaverde-com:serviceId:GenericSensor1
varName: RegenmeterRain
[edit]
add some more info.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 13, 2014, 04:59:24 am
Quote
This morning i installed the files and the plugin is updating the figures again.
It also added the 3 new devices for my second indoor sensor, but it isn't creating the Rain device.

Should i create is manually or ... ?

I think that all you are missing is the instruction from this post:
http://forum.micasaverde.com/index.php/topic,16276.msg173075.html#msg173075 (http://forum.micasaverde.com/index.php/topic,16276.msg173075.html#msg173075)

Quote
You would have to add "R" to the list of child devices in order to get a rain gauge.

Thanks, by the way, for your very generous original offer to help out.  I must say that the supporting information in your latest post is an absolute model of what developers need in order to help fix problems.  I will have to add you to my list of favourite Beta-testers!

I hope this now all works OK for you.  As I mentioned before, once I have my own gauge to play with then I may make some additions and then consolidate all of this into a new App Store release.

Met vriendelijke groet

Title: Re: Netatmo Weather Station plugin
Post by: freemann on May 13, 2014, 06:38:58 am
I downloaded the image and missed the part to add the "R" and it work great now!!

Don't how you handle the detection of available devices, but it would be great if the Plugin automatically adds the R if its detects a Rain gauge.

You may add me to your list of "favourite beta-testers" :)  (leuk zelfs)

Thanx for your time and work!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 13, 2014, 07:08:20 am
Don't how you handle the detection of available devices, but it would be great if the Plugin automatically adds the R if its detects a Rain gauge.

There was a discussion on this when I started to write the app: some users didn't want to see lots of child devices, and some did.  The measurements for all devices are always available (in metric units) as variables of the parent device.  So the trade-off was to make the child devices optional.

This is only something which has to be done when a new class of device (like the rain gauge) comes along.  As you already discovered, if you just add a new module then all those devices are discovered and child devices (if required) are created.

veel succes.
Title: Re: Netatmo Weather Station plugin
Post by: mpenda on May 13, 2014, 07:54:44 pm
Hi. I've installed the plugin and have it working. I've gotten triggers to fire successfully, but I want to read the temperature of one of the sensors for an "if" statement in luup code. I'm missing something....can anyone help? Here's what I have now that does not work:

local rmtemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1",32)
if (rmtmp < 70) then
    return false
end

32 is the device for the temperature value of one of the room sensors (which does display the correct temp)

Many thanks.
Title: Re: Netatmo Weather Station plugin
Post by: BulldogLowell on May 13, 2014, 09:07:35 pm
Hi. I've installed the plugin and have it working. I've gotten triggers to fire successfully, but I want to read the temperature of one of the sensors for an "if" statement in luup code. I'm missing something....can anyone help? Here's what I have now that does not work:

local rmtemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1",32)
if (rmtmp < 70) then
    return false
end

32 is the device for the temperature value of one of the room sensors (which does display the correct temp)

Many thanks.

yeah, a few syntax issues.  yours:
Code: [Select]
local rmtemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1",32)
if (rmtmp < 70) then
    return false
end

instead try:

Code: [Select]
local rmtemp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature", 32)
if tonumber(rmtemp) < 70 then
    return false
end

you have to include which variable to check in the luup.variable_get and make sure you are comparing integers with integers.

that will cancel a scene of the CurrentTemperature variable for dev 32 is less than 70.

 ;)

Title: Re: Netatmo Weather Station plugin
Post by: mpenda on May 13, 2014, 09:19:15 pm
Thanks so much, I knew it didn't look right....
It still, however, does not fire. Can it be a units issue? It displays in degrees F. I am assuming that's what the variable would return in?
Title: Re: Netatmo Weather Station plugin
Post by: mpenda on May 13, 2014, 09:27:55 pm
Oops.....never mind. It works perfectly. In the couple of hours since I started tinkering, the temperature has dropped!!
Thanks again!
Title: Re: Netatmo Weather Station plugin
Post by: BulldogLowell on May 13, 2014, 09:29:54 pm
Oops.....never mind. It works perfectly. In the couple of hours since I started tinkering, the temperature has dropped!!
Thanks again!


oh, terrific!

Title: Re: Netatmo Weather Station plugin
Post by: mpenda on May 14, 2014, 09:11:18 pm
Thanks again! Next up, the CO2 sensor!!
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on May 18, 2014, 08:09:01 am
For the Rain Gauge, what are the valid values for the variable Units other than mm?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 18, 2014, 09:19:48 am
For the Rain Gauge, what are the valid values for the variable Units other than mm?

The imperial units are inches, and a child device should convert its reading according to the Netatmo system units setting, which affect a number of the measurements.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 18, 2014, 09:22:57 am
I've just heard that my gauge has been shipped, so I should be able to test these things out for myself soon.

Unless there are any pressing requests for new functionality, I should be able to put new version into the store quite soon.  The one other thing I do want to add is more robustness at initial authorisation and token rotation - my network has been up and down rather often recently and this highlights the need for something better than I do at the moment (ie. one failure and you're out.)
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on May 18, 2014, 10:16:24 am
For the Rain Gauge, what are the valid values for the variable Units other than mm?

The imperial units are inches, and a child device should convert its reading according to the Netatmo system units setting, which affect a number of the measurements.


When I change Units to inches and UnitsDisplay to (in) and select Save, the values return to mm and (mm), respectively.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 18, 2014, 11:07:52 am
When I change Units to inches and UnitsDisplay to (in) and select Save, the values return to mm and (mm), respectively.

These are not values which should be changed in the Vera device, but , as I said:
Quote
... a child device should convert its reading according to the Netatmo system units setting...

... you have to use your Netatmo account to change the units you want the system to use.  This will then apply to the native Netatmo web interface, mobile app, AND to the Vera child units. 
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on May 18, 2014, 05:31:56 pm
I have attached three screenshots.  The native Netatmo web interface indicates inches.  However, the Vera child device indicates mm.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 18, 2014, 05:42:23 pm
Thanks for these.  My gauge should arrive tomorrow or the day after, so I will have something to try out.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on May 19, 2014, 06:19:06 am
Wow, the prize of the rain gauge was bumped almost 10? at conrad and is out of stock until 26.5. Seems the demand for this device is quite high.
It says in my order details that mine will be dispatched today so hopefully I will have it next week.

Update:  >:(  "ready to dispatch from 18.06.2014: 1 Unit". Seems like I will never receive my rain gauge
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on May 22, 2014, 06:23:37 am
Hello, I was eable to set password user client secret and id.

Now I have a device in the vera light call netatmo

the icon is generic and there is a last update time that's all

How can I get the differents value of my netatmo on the dashboard ??

Sorry but I don't really understand the trick  ::)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 22, 2014, 06:55:08 am
Did you download this from the app store, or one of the postings on this thread?

Is there any error message about Netatmo on the control panel?

Is there anything in the Luup log file?
Title: Re: Netatmo Weather Station plugin
Post by: egoh on May 24, 2014, 12:52:05 pm
Has the app in the store been updated yet? Or should those with a rain gauge still get it from this thread. Thanks!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 24, 2014, 02:23:33 pm
Has the app in the store been updated yet? Or should those with a rain gauge still get it from this thread. Thanks!

No, sorry, I only got mine yesterday and there are clearly things which need improving / fixing.  The first post in this thread has a link (in red) to the latest.
Title: Re: Netatmo Weather Station plugin
Post by: egoh on May 24, 2014, 02:48:53 pm
No worries at all, and thanks for all your time and effort!
Title: Re: Netatmo Weather Station plugin - Rain Gauge modifications
Post by: akbooer on May 31, 2014, 10:16:35 am
I'm planning on making some changes to the way the rain gauge reports its reading, for the following reason:

At the moment, ALL measurements are polled on a schedule determined by the plugin (by default, every 10 minutes.)  This is absolutely fine for those measurements which are continuous in nature (temperature, humidity, CO2) but rain (and, actually, noise) is different, because it is episodic. The problem is that the measurement polling just samples the last recorded value, so you can't tell if, say, the most recent 0.1mm of rain is the SAME as the previous one you polled, or different. 

For noise measurements, I'm ignoring this problem, because it is not a quantitative measurement which makes sense when integrated over time.  Actually, that measurement IS integrated within the module (I think, over a 5 minute period) and getting the latest value is good enough (for me, anyway.)  For rain, you can't ignore the problem.  We want to be in a position where integrating the measurements over any period of time gives the total amount of rainfall for that period.

The only real way to do this is to simply make the measurement accumulate continuously (like an electricity meter), but then just looking at a single reading tells you nothing meaningful.  A sensible tradeoff would be to record cumulative measurements over, say, one day.  So if you look at the measurement you can see the TOTAL amount of rain so far for TODAY.  I think that's what we want, and the Netatmo has intrinsically the capability to report that number.  To get the total amount over longer periods, you simply have to add up the end of day readings (which also correspond to the MAXIMUM reading for that day.)

Your thoughts, before I cast this in stone and roll it out on the app store?  Thanks.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on May 31, 2014, 01:37:23 pm
Akbooer
I would agree that cumulative daily results would be more sensible from a recording point of view. I have also thought that it might be useful to have an indication of start and stop of rain, although that might not be in the API.
David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 31, 2014, 03:40:42 pm
I would agree that cumulative daily results would be more sensible from a recording point of view.
OK, that's good.

Quote
I have also thought that it might be useful to have an indication of start and stop of rain, although that might not be in the API.
I could also construct a variable which is the increment since last poll - easy enough, then, to simply set a notification when this changes from, or to, zero.  Although you may want for something more sophisticated... (which can always be added later.)
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 02, 2014, 05:00:58 pm
I don't want to take this thread off track, but I thought this was the best place to mention is. You can get the Netatmo from Amazon for $149 (~$30 off I think). Not too bad:

http://www.amazon.com/gp/product/B0095HVAKS/ref=ox_ya_os_product_refresh_T1

I now allow this thread to return to the "plugin" :D
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 02, 2014, 05:03:13 pm
I don't want to take this thread off track, but I thought this was the best place to mention is.

Fine by me... more Netatmos means more Netatmo plugin users!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 04, 2014, 03:03:03 pm
I have been finishing off a new version for the App Store and Netatmo has just announced to developers an important change to the API, so I have a bit more work to do...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 07, 2014, 01:12:55 pm
The new API has been providing a significant opportunity for simplification in the plugin's code (although this is proving hard to do!)   As a bonus, it's going to enable a few new, and hopefully useful, features:
All work in progress, but hopefully available as a beta from here soon, and in the app store a bit later.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 07, 2014, 01:30:52 pm
Awesome @akbooer!!!! You know I'm more than willing to beta test!

Sent from my Nexus 7 using Tapatalk

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 09, 2014, 07:49:38 am
Here's a beta version of the plugin using the new API.  Perhaps the most significant change is one that you shouldn't see: it now only takes one HTTP request to retrieve all the data instead of one per module (in my case, that's a 6:1 difference).

However, the observable differences include:

I've also tried to make error recovery (internet protocol errors) more robust, but startup will still fail if the internet is not up at the time.

Installation

Don't forget to restart and refresh your browser (possibly several times.)

I'm particularly keen to have someone check out all the units if they use the imperial system, but, as ever, any reports received with interest.
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on June 09, 2014, 08:19:01 am
Akbooer
Downloaded new beta, so far no problems like the new icons. Will let you know if anything shows up longer term.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 09, 2014, 09:05:57 am
Fast feedback indeed @dsroberts1945.

Thanks for the positive reaction so far - let's hope it stays that way!
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on June 09, 2014, 11:16:25 am
No issues with the new beta here either. Thanks a million for all your work akbooer.

Just so pissed at conrad for not sending me the rain gauge, back in stock on 18th...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 09, 2014, 11:34:56 am
No issues with the new beta here either... rain gauge, back in stock on 18th...

Good news re. Beta.
Bad news re. Gauge.

...get your order in for the wind speed and direction now!  (I haven't heard if they will do one, but I hope so.)
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on June 09, 2014, 12:29:41 pm
I remember reading somewhere that the wind speed/direction module is scheduled for Q4 this year but you newer know... don?t quite understand why it takes that much time to develop these modules, they are after all quite simple. Its not like they are inventing something new anyway...
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 11, 2014, 05:07:55 pm
I copied everything over, and at least right now, the netatmo icon shows Blue, whoever my battery shows full green on my.netatmo.com. What can I check to make sure I have the right icon?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 11, 2014, 05:34:16 pm
I copied everything over, and at least right now, the netatmo icon shows Blue, whoever my battery shows full green on my.netatmo.com. What can I check to make sure I have the right icon?

Check all the Battery variable values (things like "OutdoorBattery", or whatever you have called your modules) under the Netatmo Advanced tab.  This will tell you what levels it thinks you have (over a range of 0-100%).

Now check the "stationInfo" values for "BatteryVp" for all the modules - you'll find this under the diagnostics link on the Control tab: it's the last item if you scroll to the bottom of the report.  These are the raw value reported from the Netatmo API.

There is, as you will see, some conversion required.  There is conflicting information about how to do this on the Netatmo developers' forum, so I may have done something wrong.  I am logging all my values over time to see how it goes, but this will take months to come to a firm conclusion, so data from others will be useful.  I set a threshold of 10% to flag any low batteries.

Let me know the values.  I doubt, very much, that your icons are screwed up. Thanks.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 11, 2014, 06:22:53 pm
Check all the Battery variable values (things like "OutdoorBattery", or whatever you have called your modules) under the Netatmo Advanced tab.  This will tell you what levels it thinks you have (over a range of 0-100%).

no such field. Maybe I need to reupload the files?

Now check the "stationInfo" values for "BatteryVp" for all the modules - you'll find this under the diagnostics link on the Control tab: it's the last item if you scroll to the bottom of the report.  These are the raw value reported from the Netatmo API.
For all 3 links I get "ok" as the response :(

There is, as you will see, some conversion required.  There is conflicting information about how to do this on the Netatmo developers' forum, so I may have done something wrong.  I am logging all my values over time to see how it goes, but this will take months to come to a firm conclusion, so data from others will be useful.  I set a threshold of 10% to flag any low batteries.

Let me know the values.  I doubt, very much, that your icons are screwed up. Thanks.
I'm thinking there is something up with my files I uploaded. I even deleted the device and recreated it today to see if it would fix it. I will re-upload the files and do the vera 2-step about a hundred times :)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 11, 2014, 06:29:45 pm
What version (Advanced tab) does it say you have?
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 11, 2014, 06:45:04 pm
What version (Advanced tab) does it say you have?
there were some non lzo files for L_netatmo.lua and L_netatmo2.lua that were from April. I deleted them and now everything is working correctly. Sorry I'm just a bad beta tester today....LOL
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 11, 2014, 06:56:59 pm
Ok, time for my thoughts:

The plugin is working and I don't have any issues in the whole 5-10 minutes I"ve been using the correct files...LOL. I do now see the extra variables in the advanced tab for the new values we can get. Some thoughts though:

Can we get Min and Max daily temp devices (perhaps optional) that could show us not only the values, but the times (I assume this is what dateMaxTemp and dateMinTemp are, the times of the min/max values). I know that is 2 more devices per unit (in my case a total of 4, 2 for the inside unit, 2 for the outside).

Another option might be to have a way to tell the plugin which units you want to have those devices for with the option of 1 or 2 devices (1 device could show min/max on one, but not be a standard temp device like the 2 device option would be).

I know it's a lot, and probably too much work, so feel free to say "No" or "sure, but it's at the bottom of the list". I currently use "World weather" for those values and I could see myself uninstalling that plugin and just using the netatmo for those values. The only thing I'd be missing is wind speed and direction, which around here, might not be accurate even with a close weather station (which is still a few miles away). In addition, I'll get the rain (I'm gonna order one now I think).
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 12, 2014, 11:28:20 am
I currently use "World weather" for those values and I could see myself uninstalling that plugin and just using the netatmo for those values.

Great thoughts.  I'm in exactly the same situation.  The only thing that would then be missing (apart from wind, which, hopefully, Netatmo will rectify in due course) is the forecast.  It would be sad to remove the Weather plugin, since it was the first thing I ever installed. (dataMine was the second, but that has already gone, so I suppose it's par for the course.)

So something like the attached, then?

It works like this:

Does this fit the requirements?
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 12, 2014, 11:31:43 am
I currently use "World weather" for those values and I could see myself uninstalling that plugin and just using the netatmo for those values.

Great thoughts.  I'm in exactly the same situation.  The only thing that would then be missing (apart from wind, which, hopefully, Netatmo will rectify in due course) is the forecast.  It would be sad to remove the Weather plugin, since it was the first thing I ever installed. (dataMine was the second, but that has already gone, so I suppose it's par for the course.)

So something like the attached, then?

It works like this:
  • There are new Netatmo device variables (aren't there always?), one for each module, of the form <module name>MaxMin
  • In the example below, the variable OutdoorMaxMin has been set to "1", and so there are now new child devices Outdoor - MaxTemp and Outdoor - MinTemp
  • Each of those child devices is a standard temperature device but has a customised icon and displays the respective date/time information of the measurement
  • The format of the time display is totally customisable, with a local variable DateFormat which is an os.date format string.
  • The default format is European 24-hour style (%H:%M), but in the US you'd want to use (%I:%M %p)

Does this fit the requirements?

That is awesome :)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 12, 2014, 11:43:08 am
That is awesome :)

Would you like to try it?

Files attached.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 12, 2014, 11:52:09 am
So far so good. Only 1 suggestion for this implimentation. I have my sensors all set to F, but all the Min/Max are set to C. Would be nice if it matched.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 12, 2014, 11:57:05 am
So far so good. Only 1 suggestion for this implimentation. I have my sensors all set to F, but all the Min/Max are set to C. Would be nice if it matched.
They should already match... I've obviously made a mistake, but this is why I originally asked for feedback from those using imperial units (it's a pain to test because I have to change units on the Netatmo account and then it screws up my own data logging.)
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 12, 2014, 12:11:23 pm
So far so good. Only 1 suggestion for this implimentation. I have my sensors all set to F, but all the Min/Max are set to C. Would be nice if it matched.
They should already match... I've obviously made a mistake, but this is why I originally asked for feedback from those using imperial units (it's a pain to test because I have to change units on the Netatmo account and then it screws up my own data logging.)

I don't mind testing...just shoot files my way and tell me what I need to do (if I need to reset anything because the child devices are already there)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 12, 2014, 12:25:33 pm
I don't mind testing...just shoot files my way and tell me what I need to do

Thanks so much.  Try this... (nothing to do but load and restart.)
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 12, 2014, 12:38:14 pm
I don't mind testing...just shoot files my way and tell me what I need to do

Thanks so much.  Try this... (nothing to do but load and restart.)

Ok, so it now says "(F)" instead of "(C)", but the temps are still in celcius. Could it be that it just needs to wait until it refreshes it's data? I'm just curious if I should wait a bit to see if it corrects itself.
Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on June 12, 2014, 01:06:02 pm
It worked itself out after a few minutes :) Now get over the DataYours beta thread and fix my issues =P
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 12, 2014, 01:33:27 pm
It worked itself out after a few minutes :)
Excellent.  Can you just PM me the measurementUnits section of the diagnostics page so that I can check out all the other measurements?

Quote
Now get over the DataYours beta thread and fix my issues =P
Strangely enough, I took time out from doing that to address your Netatmo needs (and mine, to be honest.)

From the turnaround time, you can tell that the DataYours issues are MUCH harder.  I'm in the middle of a significant revamp from the ground up.  Would appreciate some discussion on that thread of the issues.  It's all been working for me for many months, but I can tell that others are struggling.  The goal is to have just one configuration parameter - the database location.

Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on June 13, 2014, 10:30:53 am
Akbooer
Added the new files this morning, new child devices created, max and min temps being stored. So far another success many thanks.
David
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on June 13, 2014, 01:56:26 pm
@akbooer

What is the intended purpose for the variable Rain gaugeMaxMin as shown in the attached screenshot. 
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 13, 2014, 03:07:34 pm
What is the intended purpose for the variable Rain gaugeMaxMin as shown in the attached screenshot.
Wow!  Somebody's paying attention!

It doesn't do anything... yet.

Following the semantics of the other modules, it could be used to generate additional child devices (I call these "adopted children") for the extra measurements of the hourly and daily average.  I just didn't suppress it for the rain module, which is the only one which doesn't measure temperature.

Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on June 14, 2014, 07:11:15 am
Just downloaded all updated (beta) files incl. L_Netatmo.lua dated 2014.06.12 but get allways an "Authorisation failed". If I override L_Netatmo.lua with version dated 2014.02.20, no failture. I don't have a rain gauge installed right now, but don't think this is the problem with the failture. I even deinstalled the App and reinstalled all the beta files, but same problem.   
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 14, 2014, 07:19:04 am
"...Authorisation failed". If I override L_Netatmo.lua with version dated 2014.02.20, no failture.

Yes, I'm afraid this is an old problem which has resurfaced.  You have either some strange character in your username or password? The problem arises with URL encoding of these characters.  I thought I had cracked it, but it seemed to break for others, so I reverted to my original encoding.

Can you confirm that this might be the problem?
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on June 14, 2014, 08:19:10 am
Yes, I had one special character in my password, which I just deleted for the test and now everything is okay - many thanks!
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on June 15, 2014, 05:07:51 am
There is another little problem with "special" characters. I named my outside station "Au?en", which was taken over in the last version of Netatmo as something like "Auoouen" or so.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 15, 2014, 07:01:09 am
I take it that these characters are UTF encoded in the JSON which the Netatmo API uses.  If you could PM me the diagnostics page then that would help.
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on June 15, 2014, 07:44:41 am
@akbooer: I already change "Au?en (with a "SZ" and not a ? mark as interpreted above), which means the diagnostic file will show only "Aussen", the new name I used. To be clear,, the problem with the interpretation of a "SZ" in the name was not happen with the former (Feb.2014) version of Netatmo.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 15, 2014, 08:49:07 am
This is odd.  I hesitate to say "I haven't changed anything which might affect that", because that's evidently no so.  To be clear, you have named this module on the Netatmo website, or app, itself, and not just the Vera interface?
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on June 15, 2014, 09:57:26 am
The satation was named on the Netatmo website and never changed thereafter. As you know, I had some problems to install your App, because I had one special character in my password. You kindly changed the Netatmo.lua file (Feb.2014), which solved the problem. The problem with the special character is now back with your last version (b12.06.2014), the reason way I changed my password on Netatmo.com. BTW, when the problem with the "SZ" occur, I tried to override Netatmo.lua with the February version, but the typos in the name of the station were still there. I consequently changed the name of the station on Netatmo.com, deleted Netatmo on my VeraLite, reinstalled all your newer files and everything is fine now.
Title: Re: Netatmo Weather Station plugin
Post by: HansW on June 18, 2014, 12:08:45 pm
My NetAtmo IP Adres has changed after adding the rain meter. I have not updated the software yet but cannot change the ip adress in the advanced settings. I.e. I can change it but after a reload the old adress apears again so Netatmo won't start anymore.

Anyone any pointers?

Hans Wegman
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 18, 2014, 12:27:47 pm
The Netatmo IP address is not used by the plugin, since it gets all its data from the Netatmo servers.  It does get allocated an address, presumably you are running DHCP?  I can't see how this would have changed with the addition of the rain gauge.  Where/how are you trying to change it?
Title: Re: Netatmo Weather Station plugin
Post by: freemann on June 23, 2014, 01:36:17 am
Recently i tried to manually install the test files.
The didn't work and so i removed the plugin and all remaining files in "/etc/cmh-ludl".

Then i re-installed the plugin and now "Netatmo[123] : Startup Lua Failed"

What could i do to solve this?


edit:
Here is all the Netatmo logging after a "reload" of the device.
Quote
02      06/23/14 7:39:59.289    Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2ba62000>
09      06/23/14 7:40:05.478    JobHandler_LuaUPnP::Run device 123 Netatmo room 0 type urn:akbooer-com:device:netatmo:1 id  parent 0/0xf8c950 upnp: 0 <0x2ba62000>
06      06/23/14 7:40:39.364    Device_Variable::m_szValue_set device: 123 service: urn:akbooer-com:serviceId:Netatmo1 variable: Version was: 2013.10.25 @akbooer now: 2013.10.25 @akbooer #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 __LEAK__ this:106496 start:692224 to 0x14e2000 <0x2c395680>
50      06/23/14 7:40:41.620    luup_log:123: Netatmo: user.administrative.unit = 0 __LEAK__ this:73728 start:909312 to 0x1517000 <0x2c395680>
50      06/23/14 7:40:41.621    luup_log:123: Netatmo: user.administrative.pressureunit = 0 <0x2c395680>
50      06/23/14 7:40:41.621    luup_log:123: Netatmo: creating child devices... <0x2c395680>
01      06/23/14 7:40:41.623    LuImplementation::StartLua running startup code for 123 I_Netatmo.xml failed <0x2c395680>
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 23, 2014, 03:02:19 am
When you say...

Quote
Then i re-installed the plugin

...what, exactly, did you do?
Title: Re: Netatmo Weather Station plugin
Post by: freemann on June 23, 2014, 03:06:22 am
I remove the plugin and all remaining files.
The i opened the app-store, installed the plugin from scratch and configured it.
The plugin says that i'm now using version "2013.10.25 @akbooer"

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 23, 2014, 03:07:54 am
The old plugin won't work if you have a rain gauge.
What was wrong with the latest?
Title: Re: Netatmo Weather Station plugin
Post by: freemann on June 23, 2014, 03:13:09 am
I have not configured the plugin to use the rain-meter.
Child-sensor says "THCPN", so i believe the plugin should work because its not using/creating a child device for the rain-meter.

A few weeks ago i installed the files for usings the rain-meter and that was working well.
A few days ago i saw that you submitted some new files and was curious. After uploading the files the whole plugin was dead and i decided to remove all files and install the plugin from the app-store.

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 23, 2014, 03:27:02 am
No, I don't think that's the case.  The rain gauge is still in the devices list and would have variables created under the parent device.  You could test this by removing the gauge from your actual Netatmo, but you probably don't want to do that.

Better to try and get the latest working for you. It does work for others, so there shouldn't be a problem.  It has much better diagnostics so we should be able to get it going.
Title: Re: Netatmo Weather Station plugin
Post by: freemann on June 23, 2014, 03:31:10 am
ok, i will give it a try.
could you post all most recent plugin files (device, impl, images, js, etc)?
Then i won't have to navigate through all pages of the topic to find/upload all the files?

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 23, 2014, 05:07:11 am
All linked to on post #1 of this thread.

Aside from the very latest Lua at http://forum.micasaverde.com/index.php/topic,16276.msg180453.html#msg180453 (http://forum.micasaverde.com/index.php/topic,16276.msg180453.html#msg180453)
Title: Re: Netatmo Weather Station plugin
Post by: freemann on June 23, 2014, 07:08:39 am
ok, i did an clean install from the app-store.
After that i uploaded all the files from "NetatmoFiles.zip" and also the updated .lua from the link you suggested, everything was working again. I have no idea what went wrong when i did this a few days ago.... but the main thing is that its working again :)

Thanks!!!!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 24, 2014, 05:23:04 pm
Delighted to hear it.

There should be a clean version in the App Store in a few weeks, so this will be easier for others soon.

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 25, 2014, 05:33:09 am
I believe I've found the bug which stopped non-ascii characters displaying correctly in module names.

The Netatmo plugin now supports JSON Unicode escapes for all 65,536 code points in the Basic Multilingual Plane, correctly encoding them as UTF-8.  I've tested this out by renaming my rain gauge with a mixture of Cyrillic and other characters which require 1, 2, 3, and 4-byte encoding (see attached.)

I'd be grateful for reports (positive or otherwise, but preferably the former) from those who have previously reported problems using international character sets.  Both the attached Lua files need to be installed.

[--- Edit --- Lua files updated after fixing a problem with the units conversion code. ]
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on June 25, 2014, 08:20:49 am
@akbooer - Many thanks for the update. Terrific, it's perfect now! (Pls s. PM).   
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 25, 2014, 01:13:23 pm
I've just fixed (I hope) a problem with the files in the previous post, so all should be well now.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 25, 2014, 03:12:19 pm
Just an additional few notes on the recent changes:
I hope that's clear - ask again if not. 

I am close, now, to a new release on the App store.  I have just added a DewPoint master device variable to each module which has both temperature and humidity measurements (not yet in the released code - uses the Magnus approximation).  As with all master device variables, these are in metric units.  I'm thinking of making this available in an optional additional child device (in local units) too.

Is there anything else which should be added before the next release?  The only other thing I have in mind is making the additional child measurements (eg. Min / Max temp, SumRain24, DewPoint, ... ) available as individually selected child devices rather than having to have, say, both maximum and minimum temperatures displayed.

I've also upgraded the pressure, noise, and rain icons to colour.

Title: Re: Netatmo Weather Station plugin
Post by: korttoma on July 04, 2014, 01:14:19 am
Finally got my Rain gauge yesterday!! Yeiii! Now I will probably have to wait a few weeks for some rain. Been raining allot lately but now there is no rain in sight.

Btw, Thanks for the new icons!!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 04, 2014, 01:53:21 am
At last!  That's good.  Yes, it didn't rain for two weeks after I got mine (still, shouldn't complain!).

The number the gauge currently display on its front panel is the latest reading, but recall that it shows the hourly and daily averages on the control panel and, of course, in the device variables.  I'm working on a modification to make it possible to show these on separate child devices (and dew point, as well, for other modules.)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 04, 2014, 11:43:28 am
Is there anything else which should be added before the next release?  The only other thing I have in mind is making the additional child measurements (eg. Min / Max temp, SumRain24, DewPoint, ... ) available as individually selected child devices rather than having to have, say, both maximum and minimum temperatures displayed.

Here is the final (?) change I planned to make, as per the above.  The explanation seems a bit complicated, but actually, it's really much more straight-forward to use than to describe.

To be more explicit, there are now two ways you can specify a child device to be created:
Valid values for the <ModuleName>Children parameter depend on the module type:
As an example, I have my OutdoorChildren set to "MaxTemp, MinTemp, DewPoint", but the outdoor temperature and humidity are also child devices since the ChildSensors variable contains "TH".

The two methods operate independently of each other, so it's now possible to specify exactly which child devices you need, and no others, by clearing the ChildSensors variable and specifying just the ones you need as a comma separated list in the appropriate  <ModuleName>Children variable, or by mixing and matching as in my example above.

So that any existing Max/Min temperature child devices do not disappear, I've not yet removed the old <ModuleName>MaxMin" parameter, but that will not be there in the App Store release.

So this is really your last call before Release 3 goes into the App Store.
Title: Re: Netatmo Weather Station plugin
Post by: gkotak on July 25, 2014, 09:52:36 am
Delighted to hear it.

There should be a clean version in the App Store in a few weeks, so this will be easier for others soon.

Hello, I just download (on July 25, 2014) your Netatmo app from the appstore. I am pretty sure I have the username, password and client ID/key correct since when I omit those it throws my a Lua startup error. Version is: 2013.10.25 @akbooer. However, as you can see in the image, none of the value are getting populated. I am also using the default Indoor and Outdoor (not I have not yet configured outdoor). Can you please tell if I'm doing something completely brain dead based on the information I have provided
Title: Re: Netatmo Weather Station plugin
Post by: gkotak on July 25, 2014, 09:55:50 am
Delighted to hear it.

There should be a clean version in the App Store in a few weeks, so this will be easier for others soon.

Hello, I just download (on July 25, 2014) your Netatmo app from the appstore. I am pretty sure I have the username, password and client ID/key correct since when I omit those it throws my a Lua startup error. Version is: 2013.10.25 @akbooer. However, as you can see in the image, none of the value are getting populated. I am also using the default Indoor and Outdoor (not I have not yet configured outdoor). Can you please tell if I'm doing something completely brain dead based on the information I have provided
Delighted to hear it.

There should be a clean version in the App Store in a few weeks, so this will be easier for others soon.

oops with attachment
Title: Re: Netatmo Weather Station plugin
Post by: Kullematz on July 25, 2014, 10:03:28 am
Do you have special characters in your password, have you configured the Netatmo Advance Tab?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 25, 2014, 10:06:31 am
The App Store one is, as you can see from the version number, not yet updated.  The version pointed to by the link http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917 (http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917) on the first post of this thread is probably a much better start.  Then update any files posted since then.
Title: Re: Netatmo Weather Station plugin
Post by: gkotak on July 25, 2014, 10:16:14 am
Delighted to hear it.

There should be a clean version in the App Store in a few weeks, so this will be easier for others soon.

Hello, I just download (on July 25, 2014) your Netatmo app from the appstore. I am pretty sure I have the username, password and client ID/key correct since when I omit those it throws my a Lua startup error. Version is: 2013.10.25 @akbooer. However, as you can see in the image, none of the value are getting populated. I am also using the default Indoor and Outdoor (not I have not yet configured outdoor). Can you please tell if I'm doing something completely brain dead based on the information I have provided
Delighted to hear it.

There should be a clean version in the App Store in a few weeks, so this will be easier for others soon.

oops with attachment

As suspected, I hooked up my external unit as well and the plugin started to work. Thanks!
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on July 30, 2014, 02:54:47 pm
Wow, the netatmo rain sensor was a really good investment. In the local news today it said that it has been sunnyest summer in 30 years.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 30, 2014, 03:11:09 pm
Well, yes, but you'll need it in a few month's time.
Here's the last 3 month's worth of my data.
Title: Re: Netatmo Weather Station plugin
Post by: TimSRQ on August 07, 2014, 10:18:07 pm
The app is super.  It's the reason I bought the netatmo.  Thanks for all the work! 

I have had the netatmo app running (from the Apps store - 2.20131105) without any problems for the past few weeks.  Today, I received the Rain Gauge and followed your instructions from the link

http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917

But, now I am having one problem.  The problem I am having is that the Rain Gauge does not show up as a device.  However, I see the Rain Gauge in the Device, Tree Device, and List Diagnostics of the Netatmo device.

Is there a step I might be missing to get the Rain Gauge to display in Vera?



Title: Re: Netatmo Weather Station plugin
Post by: korttoma on August 08, 2014, 01:12:37 am
Check under your Netatmo plugin device (click on the wrench). Under "Advanced" you have a parameter called "ChildSensors". For me it sais "THCPNR". The "R" is for the rain gauge.
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 08, 2014, 08:56:17 am
Hi,

i've recieved my Netatmo today and will install it when i'm home.
Including the plug-in for Vera.

Is it also possible to show the Netatmo alerts (like "onweer") etc. in the Vera plugin?

Floris
Title: Re: Netatmo Weather Station plugin
Post by: TimSRQ on August 08, 2014, 09:56:06 am
Check under your Netatmo plugin device (click on the wrench). Under "Advanced" you have a parameter called "ChildSensors". For me it sais "THCPNR". The "R" is for the rain gauge.

Greetings Tomas,

The ChildSensors shows "THCPN".  Note that I see the Rain Gauge in the Device, Tree Device, and List Diagnostics of the Netatmo plugin device.  I've added the "R" now to the end of the list ("THCPNR").  I saved and restarted the VeraLite, and refreshed the browser multiple times.

Additionally, I see all the Rain variables.  But, I don't see the Rain device.  Any other thoughts?

Outdoor - RainSumRain24   
Outdoor - RainTimeUtc   
Outdoor - RainSumRain1   
Outdoor - RainRain   
Outdoor - RainBattery
Title: Re: Netatmo Weather Station plugin
Post by: TimSRQ on August 08, 2014, 10:06:07 am
After a restart and a browser reset as well, the Rain Gauge now appears.  Thanks Tomas.  That did the trick!

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 08, 2014, 10:30:12 am
i've recieved my Netatmo today and will install it when i'm home.
Including the plug-in for Vera.
Good luck with that.  You'll find the files for the rain gauge here: http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917 (http://forum.micasaverde.com/index.php/topic,16276.msg179917.html#msg179917)

Quote
Is it also possible to show the Netatmo alerts (like "onweer") etc. in the Vera plugin?
Not at this time - I'm not even sure that this is generated by the API, I'd have to check the documentation.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 08, 2014, 10:42:48 am
Quote
Is it also possible to show the Netatmo alerts (like "onweer") etc. in the Vera plugin?
Not quite sure, now, which type of alert you might be referring to.  But, as far as I can see, it's really only the measurements (and enough information about the stations and modules to make sense of it all.)  Certainly, it doesn't seem like the weather alerts that the native mobile app generates are available.


Title: Re: Netatmo Weather Station plugin
Post by: SirMeili on August 08, 2014, 02:33:20 pm
Certainly, it doesn't seem like the weather alerts that the native mobile app generates are available.

If you're referring to the national weather service alerts (at least those are the ones in the US), I find them completely useless. All it says is "there is a NWS alert from X:XX pm/am"....but it never actually tells you what it is!!! It's very frustrating!
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 09, 2014, 03:55:33 am
@akbooer, can i ask you a question in Dutch?
I've tried to install teh plugin,copied files using the GUI and copied the icons through winscp, but nothing apears.
Can you help me a little bit?

Floris
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 09, 2014, 08:09:33 am
can i ask you a question in Dutch?
you can try, but I might struggle a bit.

Quote
I've tried to install teh plugin,copied files using the GUI and copied the icons through winscp, but nothing apears.
Can you help me a little bit?

You need to create the device manually using Create Device from the APPS >  Develop Apps menu.

The only fields you need to fill in are Description (name it what you want) and Upnp Device Filename which should be D_Netatmo.xml.  Press Create Device, wait a bit, and then Restart.
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 09, 2014, 11:02:20 am
OK, I hope that will work.

I'va also installed UI7, I think that was a great mistake.
Is there a possibility to reload an older UI?

@ akbooer: Your question: indeed, that are the alerts of the weather or the CO2 to high.

Floris
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 09, 2014, 02:08:25 pm
I have no idea whether it will work on UI7, but would be very interested to find out that it does.
Yes, you can return to UI5 if necessary (many people have done that.)

The plugin can generate a notification if the CO2 is above a threshold (see attached), but can't do weather alerts.

Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 09, 2014, 02:58:18 pm
@akbooer, i get always an error.

XML Parsing Error: syntax error
Location: http://192.168.1.107/cgi-bin/cmh/view_upnp_file.sh?file=L_Netatmo.lua.lzo
Line Number 2, Column 1:

local version = "2014.06.09  NEW API  @akbooer"   
^

What is wrong?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 09, 2014, 03:00:57 pm
What are you doing when you get that error?
Where does that error appear?
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 09, 2014, 03:23:35 pm
viewing the lua file.
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 09, 2014, 03:50:39 pm
awhen i unzip the files, i got wo times the same files.
One in the root directory and one in macos directory.
Which one should i install?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 09, 2014, 05:25:25 pm
I think the two files are because I made the zip archive on a mac.  Your need the plain Lua files.  The file you were typing out is an a .lzo compressed file, as happens when you transfer files using the Vera file loader.  This is expected, there's no reason to need to view these.
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 10, 2014, 02:27:22 am
@akbooer: I've installed the files from June 9th and it is working.

How can I update to the latest version?
Just copy the new files via the UI or do I have to uninstall it first?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 10, 2014, 02:31:10 am
No need to uninstall, in fact, that would be a backward step!

Just use to UI to load the new files.  There have been only minor changes since the update for the rain gauge.

It's raining here rather a lot at the moment!
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 10, 2014, 02:36:52 am
@akbooer: I don't have e rainmeter, so no need to update.
Very good support by the way.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 10, 2014, 02:42:42 am
OK, thanks.  I'm glad it's all working for you now.
Title: Re: Netatmo Weather Station plugin
Post by: FrancoisL on August 12, 2014, 05:25:13 pm
Hello,

Thanks for this great plugin, for your information, a first try of the beta version 2014.06.09 under UI7 RC1. 

The look and feel is quite different...

Edit (UI7 feedback): CO2 sensor, noise and pressure devices can not be assigned to a room via the GUI (only via the advanced option).  Special char like e with accent is shown as u00e9.  The last update time is not visible on the main Netamo device. Icons differ.

Regards,
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 12, 2014, 05:49:50 pm
I'm sorry that looks so horrible.  The way the icons are handled must be different.  It also seems that one of the interior sensor's name is not handled correctly... This is bizarre!

I'm obviously not using UI7 myself!
Title: Re: Netatmo Weather Station plugin
Post by: florisi on August 31, 2014, 01:40:55 pm
@akbooer: i have now a Netatmo Thermostat.
Can you email me to give me some information how you build the Weatherstation plugin.
I think the  plugin for the Thermostat will be partial similar.

Regards, Floris
Title: Re: Netatmo Weather Station plugin / UI5
Post by: lbusch1313 on September 08, 2014, 07:11:13 pm
Been trying to get the plug-in working.  Seems to get through the authorization then hangs with a "Startup Lua Failed" message.  From my log during the "Reload" I see:

Line 363: 02   09/08/14 18:54:49.209   Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x2aeca000>
Line 403: 09   09/08/14 18:54:56.081   JobHandler_LuaUPnP::Run device 70 Netatmo room 0 type urn:akbooer-com:device:netatmo:1 id  parent 0/0xbea8c8 upnp: 0 <0x2aeca000>
Line 403: 09   09/08/14 18:54:56.081   JobHandler_LuaUPnP::Run device 70 Netatmo room 0 type urn:akbooer-com:device:netatmo:1 id  parent 0/0xbea8c8 upnp: 0 <0x2aeca000>
Line 634: 06   09/08/14 18:55:06.084   Device_Variable::m_szValue_set device: 70 service: urn:akbooer-com:serviceId:Netatmo1 variable: Version was: 2013.10.25 @akbooer now: 2013.10.25 @akbooer #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 __LEAK__ this:106496 start:1019904 to 0x1059000 <0x2b7fd680>
Line 664: 50   09/08/14 18:55:10.561   luup_log:70: Netatmo: user.administrative.unit = 1 <0x2b7fd680>
Line 665: 50   09/08/14 18:55:10.561   luup_log:70: Netatmo: user.administrative.pressureunit = 1 <0x2b7fd680>
Line 666: 50   09/08/14 18:55:10.561   luup_log:70: Netatmo: creating child devices... <0x2b7fd680>
Line 668: 01   09/08/14 18:55:10.563   LuImplementation::StartLua running startup code for 70 I_Netatmo.xml failed <0x2b7fd680>

I have installed and uninstalled multiple times.  Any steps to suggest to trouble shoot further>

Title: Re: Netatmo Weather Station plugin
Post by: lbusch1313 on September 10, 2014, 01:54:19 pm
Found an earlier post by freeman that had almost the same errors so... I followed the suggested fix from that post.  It appears my issues were related to my rain gauge and the App store install not supporting said device.  But yea!  ;D, I have it working including the rain gauge.  Since it's raining heavily right now I even got a good test. Learned a lot during it all, too.
Title: Re: Netatmo Weather Station plugin
Post by: TimSRQ on September 12, 2014, 12:10:05 am
Greetings @akbooer, I am running into an odd problem on UI5.  I have two netatmo weather stations (one with the rain gauge) running on two separate veralites at separate houses.  I have installed the rain gauge patch as described earlier. 

It appears that the plugin pulls all of the netatmo data (from both weather stations) into veralite.  This is ok, as I renamed each weather station module so I could easily distinguish them. 

Now the problem.  The plugin did not pick up the unique names for each device on one of the veralites - the second veralite is working fine.  So, I decided to uninstall the plugin at the problem location.  Unfortunately, the veralite processes as if it is uninstalling the netatmo plugin, but when it restarts, the plugin and all the associated devices are still there (and they are still named incorrectly).  The "device tree" displays correctly, but the devices in veralite UI5 are not all named correctly.  However, a few of them are.

Is there a way to manually uninstall the plugin?  Or do you have any other suggestions?

thanks!
Title: Re: Netatmo Weather Station plugin
Post by: antrock on September 25, 2014, 06:22:06 am
I have been using this plugin since I've got Netatmo about 2 months ago and it is working great (on UI7) - thank you! I have recently installed Philips Hue lights and I am trying to run a scene which would turn some of them blue in the event of rain. Here is where I ran into a problem: I've tried to run a scene whenever "Rain goes above 0" but it didn't run it. Then I thought I should maybe set it to run when "Rain goes above 0.0" as it is reporting decimal numbers. It also won't run the scene. What am I doing wrong?

I am running plugin version 2014.06.12b on UI7. Is there a way the plugin could report RAIN ON on RAIN OFF and not just the amount of rain fall?
Title: Re: Netatmo Weather Station plugin
Post by: lbusch1313 on October 20, 2014, 10:51:53 am
I am trying read the Netatmo variables with a luup.variable_get but I can't seem to get the syntax right.  I've tried a number of combinations to no avail.  They are all similar to:

local lul_humidity = luup.variable_get("urn:akbooer-com:serviceId:netatmo1","IndoorHumidity", 76)

where the parent Netatmo device# is 76. I've tried polling the child devices with similar results. I can poll other devices on my system so I know it SHOULD work.  Any suggestions are appreciated.
Lou
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on October 20, 2014, 11:22:21 am
Here is what I use to get the outdoor temp and humidity and send them to a LCD hocked to a MySensor node.

local temp = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature", 229)

luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_1", value=temp}, 276)


local hum = luup.variable_get("urn:micasaverde-com:serviceId:HumiditySensor1","CurrentLevel", 230)

luup.call_action("urn:upnp-arduino-cc:serviceId:arduino1", "SendCommand", {radioId="11;3", variableId="VAR_2", value=hum}, 276)

MySensors.org
Title: Re: Netatmo Weather Station plugin
Post by: lbusch1313 on October 22, 2014, 07:41:05 am
Thanks for the info. I have it working now. Found a gold mine of info on urn and service ids in the datamine plugin. Never would have figured out some of them without reviewing a ton of the xml file(s) otherwise.
Title: Re: Netatmo Weather Station plugin
Post by: adaugeo on October 28, 2014, 07:16:38 pm
There is stil old version in app store, isnt it?
Will you post there also new version?
Thanks for info
Title: Re: Netatmo Weather Station plugin
Post by: ljoube on November 06, 2014, 08:17:30 am

There is stil old version in app store, isnt it?
Will you post there also new version?
Thanks for info

+ 1


Envoy? de mon iPhone ? l'aide de Tapatalk
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 15, 2014, 11:11:12 am
The latest version is awaiting approval in the App store.
Title: Re: Netatmo Weather Station plugin
Post by: ljoube on November 15, 2014, 11:17:37 am
Youpi !!!


Envoy? de mon iPhone ? l'aide de Tapatalk
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 15, 2014, 12:08:00 pm
The latest version is awaiting approval in the App store.

However, just be aware that the additional icons and .json files which provide extended functionality such as units display, time of max/min temperatures, coloured CO22 icons, etc. will need to be downloaded separately from this thread.  They simply can't be part of an App store install.
Title: Re: Netatmo Weather Station plugin
Post by: TimSRQ on November 15, 2014, 05:52:06 pm
Fantastic!  I can't wait to see it in the app store!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 18, 2014, 04:30:11 pm
Latest version has been approved and is now available for manual install (it's not auto-update.)

I'm anxious to hear how it's working.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on November 19, 2014, 04:50:29 am
Updated without any issue (UI5). Everything seems to be working so far. Many thanks for your great work akbooer!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 19, 2014, 06:14:14 am
Excellent news... Appreciate the rapid feedback.

Can I ask if you (or anyone else for that matter) use the HTML interface to this plugin to list or plot the sensors and measurements?  I'm thinking that if it's not much used then in the process of making a UI7 version, I may remove this functionality.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on November 19, 2014, 06:39:19 am
I don't use the HTML interface and I actually don't use the Vera user interface either for any other things then configuring the system so for me you can keep it simple ;)
My plan is to set up datayours for graphing and logging but my Veralite is always running on the resource limit so I have to wait until I get my hands on a VeraEdge. Anyway since the Edge only runs UI7 I will not be in any hurry to get one because it seems like it is not ready yet.

I use ImperiHome on android and grasshopper on WP8 as interface to my system. ImperiHome has built in support for netatmo and on the WP8 I use some other apps that interact directly to my netatmo weather station.
Title: Re: Netatmo Weather Station plugin
Post by: BrianLBeaton on November 19, 2014, 08:40:19 am
I rarely use the HTML interface.  I can live without this functionality in UI7.
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 19, 2014, 05:28:58 pm
Hi all,
Thank you very much akbooer for your work. But i need help ;) (i'm a noob in that)

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.
But after i have the message "Netatmo : Failed to get device configuration"

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 !?
Please, can you remind me what to do to connect my Netatmo today from scratch ? maybe if you have any screenshots ? And what i should finally have if it goes well ?

Thanks a lot for your help.
Cheers,
 
Title: Re: Netatmo Weather Station plugin
Post by: reneboer 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.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.
Title: Re: Netatmo Weather Station plugin
Post by: antrock 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.
Title: Re: Netatmo Weather Station plugin
Post by: reneboer 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.
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou 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,
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.
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.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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!
Title: Re: Netatmo Weather Station plugin
Post by: reneboer 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.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma 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.
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou 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,
Title: Re: Netatmo Weather Station plugin
Post by: reneboer 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.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer 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.
Title: Re: Netatmo Weather Station plugin
Post by: reneboer 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
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 22, 2014, 05:09:29 am
Thanks!  Too bad the documentation is not clear on that!
I will fix as you suggest.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 22, 2014, 06:17:11 am
Searching some more I did find that this error message can be avoided by adding luup.set_failure(0) to your code.

Can you try this?  Works on UI5, should now also be UI7 compatible.  Thanks again for the fix.
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on November 22, 2014, 11:30:31 am
Searching some more I did find that this error message can be avoided by adding luup.set_failure(0) to your code.

Can you try this?  Works on UI5, should now also be UI7 compatible.  Thanks again for the fix.

Hi, works like a charm. I also updated the urls for the images in the attached JSON files so they link to the some folder as in UI5 (see http://forum.micasaverde.com/index.php/topic,26649.msg196358.html#msg196358 (http://forum.micasaverde.com/index.php/topic,26649.msg196358.html#msg196358)) and attached them. Work on both UI5/6 ans UI7 unchanged.

Cheers rene
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 22, 2014, 12:03:27 pm
Oh, that's great.  Thanks again... More karma to you!

Can you post a screenshot so we can all see what it looks like on UI7? (Because it did, initially, look dreadful, and I'm hoping it's better now.)
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on November 22, 2014, 02:31:16 pm
Hi akbooer,

Your plug-ins are my reference point for my own attempts. Glad I could help you a little this time  :D

It looks just as good as UI5 now.


Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 23, 2014, 03:58:20 pm
Hi,

I can try anything, i still have : "Netatmo : Failed to get device configuration" and nothing else appears appart the original module of Netatmo.
I can see your screenshot shows many other modules (humidity, temperature, ... ).
Please help !
What should i have to do ?
I installed the plugin, added my credentials, the authentication to the Netatmo is ok but after just have "Netatmo : Failed to get device configuration" :(

Thanks in advance for your help
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 23, 2014, 04:37:49 pm
I installed the plugin, added my credentials, the authentication to the Netatmo is ok but after just have "Netatmo : Failed to get device configuration" :(

Sorry you're having problems.  What system are you running... UI7?  [---Edit: I see from earlier post that this is UI5 ---]

If your login credentials were wrong, you should get the message "Authorisation failed", so I take it that this isn't the problem.  Is your registered app on the Netatmo site at https://dev.netatmo.com/ (https://dev.netatmo.com/) showing a status of "Activated" (again, I guess so, since this would probably give you an authorization error if not.)

There is really only one action that the plugin makes between authorization and getting the device configuration, which is a call to their API to do just that.

What version of the plugin are you running?

Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 23, 2014, 05:04:16 pm
What version of the plugin are you running?

The authentication is ok, that is not the problem. The problem is after with the message : "Netatmo : Failed to get device configuration"
Yes i'm on UI5 with a VeraLite.
Yes on Netatmo, the registered app is Activated.
The version used is the last one i guess :  3.20141113

Thanks for your help,
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 23, 2014, 05:27:30 pm
You installed it from the App Store?
Title: Re: Netatmo Weather Station plugin
Post by: j.hoekstra on November 24, 2014, 02:55:52 am
Hi akbooer,

Your plug-ins are my reference point for my own attempts. Glad I could help you a little this time  :D

It looks just as good as UI5 now.


Cheers Rene
What do mere mortals need to do to get these icons?
Copy the icons from earlier in this thread to /www/cmh/skins/default/icons and the updated lua and json posted on the 22nd as luup-files?

*edit*: yes, that's all that's needed :D
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 24, 2014, 04:31:05 am
What do mere mortals need to do to get these icons?
Copy the icons from earlier in this thread to /www/cmh/skins/default/icons and the updated lua and json posted on the 22nd as luup-files?

*edit*: yes, that's all that's needed :D

I love it when people fix their own problems!  So thanks for posting that for the benefit of others.  Perhaps there's a better place for me to put them - maybe the first post of this thread?
Title: Re: Netatmo Weather Station plugin
Post by: j.hoekstra on November 24, 2014, 04:33:12 am
That would help ;)
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 24, 2014, 02:50:17 pm
You installed it from the App Store?

yes
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 24, 2014, 04:03:09 pm
I am running out of ideas.  What configuration do you have?  ...is it just a standard indoor and outdoor module?  Do you have more than one station registered to you (should be nothing wrong in that - I have two - just trawling for reasons.  I've never had this happen, if it authenticates, then it get the configuration, but that's no consolation to you.  Nothing strange about your network or Vera configuration that has been changed (buffer lengths, permissions, ...) ?
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 24, 2014, 04:32:29 pm
I am running out of ideas.  What configuration do you have?  ...is it just a standard indoor and outdoor module?  Do you have more than one station registered to you (should be nothing wrong in that - I have two - just trawling for reasons.  I've never had this happen, if it authenticates, then it get the configuration, but that's no consolation to you.  Nothing strange about your network or Vera configuration that has been changed (buffer lengths, permissions, ...) ?

nobody can have something more standard than me ^^
I don't do many things with my Veralite, just few modules for light or Fibaro Wall plugs ... So i didn't installed any special plugins or else except the Netatmo Plugin.
I just have the original modules of Netatmo (one inside and one outside).
It authenticates surely but the message after authentication is pretty clear "Netatmo : Failed to get device configuration" :(
Could you please remind me step by step what i have to do to install or configure ?
Maybe there are trivial actions to do that i don't do ?
Thank you again for your help.
Regards,
Yvan

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 24, 2014, 05:33:13 pm
It authenticates surely but the message after authentication is pretty clear "Netatmo : Failed to get device configuration" :(
Here's something to try.  Load the attached Lua file.  In the event of this error it should write an additional line to the Vera log file which may give more insight into the nature of the failure.  You'll need to locate the failure message in the log and see what you get.

Quote
Could you please remind me step by step what i have to do to install or configure ?
Maybe there are trivial actions to do that i don't do ?

After the install from the App store (and possibly reloading the above .lua file) you should, in a clean install, be left with two device variables asking for the two id's provided by registering an app on the Netatmo site, and also a login name and password (which you use to access that site.)  Having entered these under the Advanced tab and done a Save or Reload then Luup should restart itself twice, the second time generating the default child devices to match your configuration.  There is nothing else to do.
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 25, 2014, 04:46:40 pm
Here's something to try.  Load the attached Lua file.  In the event of this error it should write an additional line to the Vera log file which may give more insight into the nature of the failure.  You'll need to locate the failure message in the log and see what you get.

Hello,
i tried that and i have the same error.
Can you tell me where i can find the log file to check inside if i have more details ?
Regards
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 25, 2014, 05:18:51 pm
This link:

http://<YourVeraIP>/cgi-bin/cmh/log.sh?Device=LuaUPnP (http://<YourVeraIP>/cgi-bin/cmh/log.sh?Device=LuaUPnP)

will give you a buffered, scrolling version of it.  There are delays in its output because of the buffering, so you have to get it going before the error is generated (but after the restart.)  You'll probably miss the messages in the fast scrolling, but if you stop the page update and copy the whole of the captured text, you can paste it into a file and search.

Alternatively, if you're comfortable using ssh or similar to access Vera, then take a look at this thread http://forum.micasaverde.com/index.php?topic=8549.0 (http://forum.micasaverde.com/index.php?topic=8549.0) and/or here http://wiki.micasaverde.com/index.php/Luup_Debugging (http://wiki.micasaverde.com/index.php/Luup_Debugging).

Or, you can install plugin like LogViewer or similar.

Or, if you have a syslog server, then you can configure the Netatmo app to log to that.

Other way too, no doubt.  Sorry, it's messy. (or I could rewrite it to dump the diagnostics to a web page.)

Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 26, 2014, 06:27:15 pm
thanks a lot for all of this !
I Will try that nas give you a feedback.
Cheers,
Title: Re: Netatmo Weather Station plugin
Post by: doudoubidou on November 28, 2014, 05:25:14 pm
Hi !
For other reasons, i had to update my Netatmo firmware and it was my problem :)
As soon as the firmware had been updated, every device from your module appears :)
Thank you very much for your help ;)
Now i will be able to start to play with that :p
Regards,
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 28, 2014, 05:57:18 pm
Ah!  Good news indeed.  They did indeed change their API at some firmware level, so that makes sense. I try to keep it up to date with the newest features.  Enjoy.
Title: Netatmo new board
Post by: akbooer on January 29, 2015, 07:31:09 am
We are honoured to have been elevated to a separate child board.  This means that we can now create new threads.  I'm starting one specifically for UI7.
Title: New child board
Post by: korttoma on January 29, 2015, 08:05:44 am
Nice work akbooer and congrats on the new child boards. Maybe this will be the year we can all move to UI7 who knows ;)
Title: Re: Netatmo Weather Station plugin
Post by: Silverow on February 03, 2015, 05:58:10 am
Hello. Can we get from netatmo api and use in scenes "outdoor air quality" parameter?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 03, 2015, 06:28:23 am
Can we get from netatmo api and use in scenes "outdoor air quality" parameter?
I don't think the Netatmo API actually exposes that parameter - it's certainly not in the standard dashboard set that returns all the other data.  There are other bits and pieces of data - most notable meteoweather alarms - although I don't think that's formally supported either.

I you trawl through all the information on the diagnostic page (linked from the control panel) then you can see everything that is downloaded by the API (and a few other unrelated things like measurement unit options).  Unless you find it there, it's not available.
Title: Re: Netatmo Weather Station plugin
Post by: patersom82 on February 13, 2015, 07:11:12 am
Hi there.

Thanks again for this plugin - it has been working very well for me.

I was wondering... one of my indoor sensors is battery operated... is it possible to have the battery level show up in VERA?  It would be great to be able to write some PLEG code to send Pushover notifications when the batteries are getting low.

Cheers!
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on February 13, 2015, 07:29:53 am
You can already use the battery status of the modules in PLEG. Just add them as a device property input in PLEG. You should be able to find them under your main Netatmo device NOT under the individual devices. At least under UI5 this can be done not sure about UI7.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 13, 2015, 08:39:13 am
Good answer! Thanks @korttoma!

Yes, works the same in UI7, I have it running on a VeraEdge.

I should mention that the battery level reporting internals are a bit weird for Netatmo modules - different devices have different scales (you can see this on the configuration page.)  I have done my best to calibrate to a uniform 0 - 100% range, and report that under the Master Netatmo device.

It's probably as good as the calibration of any other battery device (ie. really just an indication.)
Title: Re: Netatmo Weather Station plugin
Post by: diegocastanogonzalez on February 16, 2015, 08:00:09 pm
I have the message Netatmo can?t detect device in red. And in the top of the page in blue I can see Netatmo : Authorisation failed.
I?m runing UI7 and I think I write the client ID, secret, etc. In the correct form.
Any idea how can I fix this.
Thank you.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 17, 2015, 02:28:49 am
Title: Re: Netatmo Weather Station plugin
Post by: diegocastanogonzalez on February 17, 2015, 03:32:45 am
I instaled the versi?n 3.20141113.
I tried upgrade but Im not sure if I did ok. I dont think so. Could you tell me how I have to do to upgrade LUA.
Thank you so much
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 17, 2015, 05:22:21 am
Could you tell me how I have to do to upgrade LUA.

The latest Lua code version is 2015.02.01 and available here: http://forum.micasaverde.com/index.php/topic,30478.msg217401.html#msg217401 (http://forum.micasaverde.com/index.php/topic,30478.msg217401.html#msg217401)

Download the file, then upload to Vera using the Upload link Apps > Develop Apps > Luup files page.  By default (in UI7) this will restart and use the new code.  The authorization failure (assuming you have the right credentials entered) is a bug in UI7 which the above patch fixes.

Title: Re: Netatmo Weather Station plugin
Post by: diegocastanogonzalez on February 19, 2015, 07:28:41 am
I did it everything. And I think in the correct form. But I have the same message.
I have the message Netatmo cant detect device.
When I install the app. I have a error, but I dont know why.
Any Idea.
Thank you.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2015, 07:55:54 am
I have the message Netatmo cant detect device.
This is a UI7-releated problem, which I thought was fixed in an earlier version. 
Quote
When I install the app. I have a error, but I dont know why.
Again, this type of thing should be fixed in the latest code you downloaded. 
I think this is working for others, so there must be something odd about your configuration.
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on February 19, 2015, 10:11:31 am
Hi Akbooer,

FYI. the latest UI7 release has no fixes for the possible <br> issue, but you capture that, nor for the issue with having special HTML characters in your Variables inputs. I.e. Username and password should all be plain text and numbers and not have anything listed here http://www.utexas.edu/learn/html/spchar.html (http://www.utexas.edu/learn/html/spchar.html). A possible code improvement could be to test for an ampersand in the UID or PWD as that will mean trouble.

Maybe on UI7 we should no longer rely on the user entering data in the Variables directly, although that is quite an impact for many plugins :o.

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2015, 10:33:18 am
FYI. the latest UI7 release has no fixes for the possible <br> issue, but you capture that,
You're right, I have that covered.

Quote
nor for the issue with having special HTML characters in your Variables inputs. I.e. Username and password should all be plain text and numbers and not have anything listed here http://www.utexas.edu/learn/html/spchar.html (http://www.utexas.edu/learn/html/spchar.html).  A possible code improvement could be to test for an ampersand in the UID or PWD as that will mean trouble.
Thanks for pointing that out (and Karma) I will fix that.

Quote
Maybe on UI7 we should no longer rely on the user entering data in the Variables directly, although that is quite an impact for many plugins :o.
Any suggestions as to what an alternative might be?  I'd rather not have to write some initialisation code which went through its own web page, although, in fact, that wouldn't be difficult.
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on February 19, 2015, 10:58:58 am
Quote
Maybe on UI7 we should no longer rely on the user entering data in the Variables directly, although that is quite an impact for many plugins :o.
Any suggestions as to what an alternative might be?  I'd rather not have to write some initialisation code which went through its own web page, although, in fact, that wouldn't be difficult.
By having a separate Settings tab that is used for user input. That would mean more JSON, or even JS if you need to capture non-trivial data, indeed. It also requires even more testing and assuring it will all work on UI5/6/7. I have done it for the Harmony Control plugin mainly because I wanted to learn, but it can add hours to a project for sure (it did for me).

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 19, 2015, 12:07:25 pm
That would mean more JSON, or even JS if you need to capture non-trivial data, indeed. It also requires even more testing and assuring it will all work on UI5/6/7. I have done it for the Harmony Control plugin mainly because I wanted to learn, but it can add hours to a project for sure (it did for me).

Yes, I was afraid of that.  I'm not into JS at all, and loathe to do anything that makes the Vera UI harder to maintain.  I've long held that it is just a configuration interface not an adequate mode of interaction for general users.  To that end, in all my UI7 app updates, I'm stripping most of the UI-related functionality in terms of custom displays.  However, for Netatmo, I'd still like to get the dynamic icons working, and for me, on UI7 / Edge, at the moment, they don't.

Configuration is something which is done so rarely that it is hardly worth going to great lengths to finesse.
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on February 20, 2015, 04:55:15 am
Hi Akbooer,

The UI is not where the smarts is (or should be) so indeed not much honor in that. As I said I took it as a learning experience as it was my first serious plugin and you are way, way past that point  ;)

With dynamic icons you mean your 20,50,75,100% ? I do see that for the main device and CO2. Or do you mean something else?

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: mvzut on February 20, 2015, 05:35:03 am
Thanks for this great plugin!

I had a lot of trouble getting it to work though (I'm using a Vera Lite with UI7). Tried several times re-installing, uploading the newest version of the lua file, creating a new client ID & secret, but no success: it could not "find" the device no matter how I tried. I noticed that the user name (which is an email address) was given a blue color by Internet Explorer after leaving the field: did IE somehow recognize it as an email address and turn it into a hyperlink? In my last attempt, I re-installed and reconfigured everything in Chrome, and it worked! Maybe others can benefit from this experience.

One minor question: I am using Imperihome, and since it has its own Netatmo support I have added my system without going through Vera. Nevertheless, most sensors also show up in Imperihome as Vera sensors, thanks to your plugin. There is one sensor though that doesn't show up in this way, and that is the rain sensor. It's not a huge thing for me, but would be nice if this can be addressed in the future...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 20, 2015, 06:02:26 am
As I said I took it as a learning experience as it was my first serious plugin and you are way, way past that point  ;)
No actually, speaking for myself, I don't think I am very much further on... grappling with a problem at the moment that can't possibly be happening, but is.  Or perhaps it isn't and it's something else going wrong.  You sail along quite happily for weeks and then something takes you back to square one.  The learning experience doesn't stop.

Quote
With dynamic icons you mean your 20,50,75,100% ? I do see that for the main device and CO2. Or do you mean something else?
That's exactly what I mean - it's simply not working for me.  I just get a broken icon symbol for precisely those devices (on Edge/UI7.)  I saw on a posted image that it does work, but for me, no.  I must have screwed up the placement... the documentation (http://wiki.micasaverde.com/index.php/Luup_plugin_icons (http://wiki.micasaverde.com/index.php/Luup_plugin_icons)) states:
Anyway, it doesn't work for me!  I'd also like to get he measurement and units on the same line as the icon, like the temperature devices do, but I can't achieve that either.  I HATE JSON FILES!  >:(

Title: Re: Netatmo Weather Station plugin
Post by: reneboer on February 20, 2015, 08:22:06 am
Hi akbooer,

The learning on Vera does not seem to stop indeed and as each UI7 release seems to change how the JSON positioning's are handled does not help either. You can try negative top and left values to make your plugin look a bit like a standard one, but it sure is a pain.

For the icons I now use something like Richards technique he uses for PLEG etc. In the app market set the normal UI5 path /www/cmh/skins/default/icons/ and with manual put the icon files in that. Then add an install.sh script that is not compressed like images and is run at startup to make links to the right locations. I have this in mine:
Code: [Select]
-- Make sure icons are accessible when they should be. Thanks to RichardTSchafer
os.execute("/bin/sh /etc/cmh-ludl/harmony-install.sh")
os.remove("/etc/cmh-ludl/harmony-install.sh")
os.execute("touch /etc/cmh-ludl/harmony-install.sh")
And this is the script file. Also shows the paths to use.
Code: [Select]
if [[ -e /www/cmh_ui6 ]]; then
  cd /www/cmh_ui6/skins/default/icons/
  rm -f Harmony*.png
  ln -s /www/cmh/skins/default/icons/Harmony.png
  ln -s /www/cmh/skins/default/icons/Harmony_0.png
  ln -s /www/cmh/skins/default/icons/Harmony_25.png
  ln -s /www/cmh/skins/default/icons/Harmony_50.png
  ln -s /www/cmh/skins/default/icons/Harmony_75.png
  ln -s /www/cmh/skins/default/icons/Harmony_100.png
fi
if [[ -e /www/cmh/skins/default/img/devices/device_states ]]; then
  cd /www/cmh/skins/default/img/devices/device_states
  rm -f Harmony*.png
  ln -s /www/cmh/skins/default/icons/Harmony.png
  ln -s /www/cmh/skins/default/icons/Harmony_0.png
  ln -s /www/cmh/skins/default/icons/Harmony_25.png
  ln -s /www/cmh/skins/default/icons/Harmony_50.png
  ln -s /www/cmh/skins/default/icons/Harmony_75.png
  ln -s /www/cmh/skins/default/icons/Harmony_100.png
fi
You can all this just from LUA so you are not dependent on an extra install file, especially for manual installs. But for me this is working now.

Cheers Rene.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 20, 2015, 08:26:56 am
@reneboer

That looks like a great suggestion, I'll try something along those lines.

Many thanks, once again!
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on February 20, 2015, 11:47:03 am
Since the previous UI7 version the JSON positioning of variables changed. If you want to position 3 bits of text, your scenegroup x must be 3 as well.

Code: [Select]
"SceneGroup":[
{
"id": "1",
"top": "1.5",
"left": "0.25",
"x": "3",
"y": "1"
}
Then you put your controls on top,left 0,0 0,1 and 0,2 you get it to show as below in UI7. Sadly on UI5 things sure are not looking better as the (mm) text drops off this way  :(

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on February 20, 2015, 12:14:10 pm
...and if you want it to look like this the scenegroup x is set to 12 (not 11 or goes wrong on small devices screens).
The Rain text not in the ControlGroup
The left for CurrentLevel at 9 and top at -2.8 (!)
The left for (mm) at 10 and top at -2.8 too.
The total height of the device is not changing on the screen so not saving any white space.

Ain't this jolly  ::)

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 20, 2015, 12:44:53 pm
...and if you want it to look like this the scenegroup x is set to 12
[...]The total height of the device is not changing on the screen so not saving any white space.
That's exactly what I was looking for (aside from losing the white space.)

Quote
Ain't this jolly  ::)

Unbelievable, really!
Title: Re: Netatmo Weather Station plugin
Post by: patersom82 on February 22, 2015, 12:12:28 pm
You can already use the battery status of the modules in PLEG. Just add them as a device property input in PLEG. You should be able to find them under your main Netatmo device NOT under the individual devices. At least under UI5 this can be done not sure about UI7.

Thanks korttoma.  Not quite sure I can find the battery level as a property of the main device.  See attached from PLEG.  'Home Office' is the main device (USB powered) and 'Bedroom' is the indoor battery-powered device
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on February 22, 2015, 12:55:11 pm
Not sure why you can not see battery status since I can.

I'm on version: 2014.11.12

Can you see the variables under e advance tab for the Netatmo plugin device?

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 22, 2015, 01:11:35 pm
Thanks for this great plugin!
Hi there, and welcome to the forum!

Quote
I noticed that the user name (which is an email address) was given a blue color by Internet Explorer after leaving the field: did IE somehow recognize it as an email address and turn it into a hyperlink? In my last attempt, I re-installed and reconfigured everything in Chrome, and it worked! Maybe others can benefit from this experience.
This is a great observation, and certainly one which may help others.  I never use IE, so hadn't come across this problem!

Quote
One minor question: I am using Imperihome, and since it has its own Netatmo support I have added my system without going through Vera. Nevertheless, most sensors also show up in Imperihome as Vera sensors, thanks to your plugin. There is one sensor though that doesn't show up in this way, and that is the rain sensor. It's not a huge thing for me, but would be nice if this can be addressed in the future...
I can't speak for Imperihome (since, again, I don't use it) but if you're saying that the rain sensor does not appear on the Vera devices UI, then I might suggest that the ChildSensors variable of the master Netatmo device should include the letter "R" (the string I use is "THCPNR", for everything.)  Alternatively, the RainChildren variable should contain the rain measurements of interest (I use SumRain24) and then the child device(s) will be created on the next restart.

Thanks for all these comments and observations - it all really helps to make the user experience better for everyone!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 22, 2015, 01:16:22 pm
Not sure why you can not see battery status since I can.

I'm on version: 2014.11.12

Can you see the variables under e advance tab for the Netatmo plugin device?

Indeed, this might be a version problem - there ought to be a fair number more variables than that showing on your menu (temperature max/min, module child devices, ...).  Are they simply scrolled off the list?
Title: Re: Netatmo Weather Station plugin
Post by: patersom82 on February 22, 2015, 01:27:11 pm
Not sure why you can not see battery status since I can.

I'm on version: 2014.11.12

Can you see the variables under e advance tab for the Netatmo plugin device?

Thanks @korttoma and @akbooer!

It looks like I am on an old version:

2013.10.25
2.20131105

OK, so my next stupid question is: how do I update the App?  There?s an auto-update box on the plugin control page, but it won?t let me tick the box.

Title: Re: Netatmo Weather Station plugin
Post by: mvzut on February 23, 2015, 03:52:07 am
I can't speak for Imperihome (since, again, I don't use it) but if you're saying that the rain sensor does not appear on the Vera devices UI, then I might suggest that the ChildSensors variable of the master Netatmo device should include the letter "R" (the string I use is "THCPNR", for everything.)  Alternatively, the RainChildren variable should contain the rain measurements of interest (I use SumRain24) and then the child device(s) will be created on the next restart.
The rain sensor DOES show up in Vera, and I can indeed add extra sensors, e.g. the SumRain24 as you mentioned using the RainCHildren parameter. Nevertheless, they are not listed in Imperihome under my Vera system, in contrast to all other sensors (temperatures, humidity, pressure, CO2, noise).

Before Netatmo I had a 433 MHz rain sensor (using a RFXtrx module), which did show up in Imperihome. I am not a programmer, but could there be something in the device's XML file (D_NetatmoRain.xml) that makes it behave differently in this respect than the other sensors and my previous rain sensor?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 23, 2015, 06:09:11 am
The rain sensor DOES show up in Vera, and I can indeed add extra sensors, e.g. the SumRain24 as you mentioned using the RainCHildren parameter. Nevertheless, they are not listed in Imperihome under my Vera system, in contrast to all other sensors (temperatures, humidity, pressure, CO2, noise).
OK, good, you can get Vera child devices for the sensors you want...

Quote
Before Netatmo I had a 433 MHz rain sensor (using a RFXtrx module), which did show up in Imperihome. I am not a programmer, but could there be something in the device's XML file (D_NetatmoRain.xml) that makes it behave differently in this respect than the other sensors and my previous rain sensor?
...but bad that you can't get Rain on Imperihome.  All the non-standard measurements (that it, the ones for which there is no Vera supplied device: Pressure, Noise, CO2, Rain) display their data as Generic Sensors, with a serviceId of urn:micasaverde-com:serviceId:GenericSensor1 and variable name CurrrentLevel, so from my end, I really can't see anything to distinguish rain from all the others.
Title: Re: Netatmo Weather Station plugin
Post by: mvzut on February 23, 2015, 07:07:05 am
All the non-standard measurements (that it, the ones for which there is no Vera supplied device: Pressure, Noise, CO2, Rain) display their data as Generic Sensors, with a serviceId of urn:micasaverde-com:serviceId:GenericSensor1 and variable name CurrrentLevel, so from my end, I really can't see anything to distinguish rain from all the others.
What if I changed serviceId into "RainSensor1" (and SCPDURL into "S_RainSensor1.xml") which my previous 433 MHz rain sensor used? See file in attachment in case you don't have this, don't know if it's standard or if it came with my RFXtrx plugin. I guess I could just try it out myself. Probably the .json file has to be changed then as well, changing CurrentLevel into CurrentRain...
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on February 23, 2015, 07:30:47 am
Hi akbooer, mvzut,

I can confirm that in ImperiHone I also only see the temp and humidity devices, not the rain one. Maybe ImperiHome has some knowledge of the first two and not the latter. All others show up nicely too.

Also checked in AutHomationHD and there the temp and humidity as showing nicely, but pressure, noise, Co2 and rain are showing as a non-standard one. The Vera Android app show the same result.

Problem seems that you never can predict how things show in the apps. For each the app developer seems to need to add code to handle it. There may be some hidden magic I have yet to uncover. I did find that ImperiHome often does not show a non-standard device at all where AutHomationHD will show it, but has no or limited controls.

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: mvzut on February 23, 2015, 07:35:56 am
Hi Rene,

You are probably right. But I still have some hope to fix it for Imperihome, since it recognizes the other sensors so nicely (even noise, complete with nice icon, which I wouldn't have expected as I don't know of any Z-wave sensors that measure noise).

Why go through all this trouble, since Imperihome already has support for Netatmo directly? Simply because I don't like their (fixed) choice for showing only the current rainfall (mm/h) and the total rainfall of the last month. I would like some more flexibility there, which going via Vera could bring.

Martijn
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 23, 2015, 08:07:37 am
Problem seems that you never can predict how things show in the apps. For each the app developer seems to need to add code to handle it.

It's for precisely this reason that I've converged on using Generic Sensor, in the absence of any UPnP (or Vera / Luup) standard for these measurements.  Some apps cope well with recognised serviceIds even when they're attached to an unknown or new device type.  Other apps simply look for known device types.

There have been sporadic efforts between developers to standardize on such things, see http://forum.micasaverde.com/index.php/topic,11815.0.html (http://forum.micasaverde.com/index.php/topic,11815.0.html), including specifically weather measurements, but it all seems to be too hard to pull together.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 23, 2015, 10:16:02 am
What if I changed serviceId into "RainSensor1" (and SCPDURL into "S_RainSensor1.xml") which my previous 433 MHz rain sensor used? See file in attachment in case you don't have this, don't know if it's standard or if it came with my RFXtrx plugin. I guess I could just try it out myself. Probably the .json file has to be changed then as well, changing CurrentLevel into CurrentRain...

No, that won't work, because the Netatmo app specifically writes the result to serviceId urn:micasaverde-com:serviceId:GenericSensor1 and variable name CurrrentLevel.

What you can do, however, is a quick experiment to see if Imperihome will pick up the value if you create a serviceId and variable matching the RainSensor1 / CurrentRain combination that worked previously, setting it to some reasonable value using the Add button on the Advanced tab of the Netatmo rain device.

IF Imperihome displays this, THEN I would be happy to add this as an extra variable to the rain child device.  What I can't do is change anything that I have already.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on February 23, 2015, 11:57:00 pm
OK, so my next stupid question is: how do I update the App?  There?s an auto-update box on the plugin control page, but it won?t let me tick the box.

To Update Netatmo plugin

Localy

http://YourVeraIP:3480/data_request?id=update_plugin&Plugin=4456

Remotely

https://<remoteaddress>/<username>/<password>/<veraID>/data_request?id=update_plugin&Plugin=4456

remoteaddress example: fwd7.mios.com
Title: Re: Netatmo Weather Station plugin
Post by: mvzut on February 24, 2015, 06:36:14 am
What you can do, however, is a quick experiment to see if Imperihome will pick up the value if you create a serviceId and variable matching the RainSensor1 / CurrentRain combination that worked previously, setting it to some reasonable value using the Add button on the Advanced tab of the Netatmo rain device.

IF Imperihome displays this, THEN I would be happy to add this as an extra variable to the rain child device.  What I can't do is change anything that I have already.

Tried it, doesn't seem to help. Sigh...
Never mind, I am going to leave this alone for now, and start focusing on more important things in life  ;)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 24, 2015, 06:42:10 am
Tried it, doesn't seem to help. Sigh...
You're sure you got the full ServiceId correct?

Quote
Never mind, I am going to leave this alone for now, and start focusing on more important things in life  ;)
Yup, know what you mean!
Title: Re: Netatmo Weather Station plugin
Post by: mvzut on February 24, 2015, 08:40:16 am
You're sure you got the full ServiceId correct?
I entered RainSensor1 in the "New Service" field, CurrentRain as "New variable" and 10 as "New value".
Or should the service be identified in the form of urn:schemas-micasaverde-com:device:RainSensor:1?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 24, 2015, 09:05:56 am
Neither.

I believe it should be
Code: [Select]
urn:upnp-org:serviceId:RainSensor1
Title: Re: Netatmo Weather Station plugin
Post by: mvzut on February 24, 2015, 09:49:40 am
Neither.

I believe it should be
Code: [Select]
urn:upnp-org:serviceId:RainSensor1
Indeed, that's probably the right identification. Nevertheless, still no rain sensor in the list of Vera devices in Imperihome...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 24, 2015, 12:18:37 pm
That's too bad.  It must be looking for the particular device as well as the serviceId and the variable.  There's really nothing I can do (except you could manually create the right device and with a tiny bit of Lua code you could update it periodically with the Rain reading from Netatmo - this is quite easy to do.)
Title: Re: Netatmo Weather Station plugin
Post by: patersom82 on February 24, 2015, 12:53:23 pm
OK, so my next stupid question is: how do I update the App?  There?s an auto-update box on the plugin control page, but it won?t let me tick the box.

To Update Netatmo plugin

Localy

http://YourVeraIP:3480/data_request?id=update_plugin&Plugin=4456

Remotely

https://<remoteaddress>/<username>/<password>/<veraID>/data_request?id=update_plugin&Plugin=4456

remoteaddress example: fwd7.mios.com

Thanks @korttoma.

That has updated my plugin successfully, and I can now see the battery level on the Netatmo in PLEG. 

All sorted!
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on February 24, 2015, 01:55:22 pm

To Update Netatmo plugin

Localy

http://YourVeraIP:3480/data_request?id=update_plugin&Plugin=4456

Remotely

https://<remoteaddress>/<username>/<password>/<veraID>/data_request?id=update_plugin&Plugin=4456

remoteaddress example: fwd7.mios.com

Seems like this method only works on UI5 and older
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on March 04, 2015, 11:52:09 am
I see that Netatmo have a new partnership with Weather Underground ... wonder whether we need a Netatmo plugin anymore??
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on March 05, 2015, 01:04:59 am
wonder whether we need a Netatmo plugin anymore??

Now your just being silly! Of course we need the Netatmo plugin.
The most important feature of the Netatmo weather station for me is the indoor CO2 sensors.
I use these sensors to control the ventilation system in my house. I could use some none Netatmo CO2 sensors but I just have not found an option I can afford.
I don't see how I could get values from these sensors to Vera through Wunderground.
Title: Re: Netatmo Weather Station plugin
Post by: gburnier on March 22, 2015, 03:30:57 pm
Hello everyone,

I have a problem using the Netatmo plugin thru lua code.

When I try to run this bit of code:

Code: [Select]
local CO2_SID = "urn:micasaverde-com:serviceId:GenericSensor1"
local WUGCO2 = luup.variable_get(CO2_SID, "CO2", 8)
local t = string.format("co2 level is %s", tostring(WUGCO2))

I get an error saying that the WUGCO2 variable = nil and I don't quite understand why (the Netatmo devices shows me a value for the CO2 level)

Any help would be welcome.

Gilles
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 04, 2015, 03:26:47 am
This is because the variable name is "CurrentLevel" not "CO2".
Title: Re: Netatmo Weather Station plugin
Post by: tdavis312 on May 22, 2015, 07:43:44 am
I have a vera in each of two locations with Netatmo's connected to both. They have worked fine for a year or so. Now both of them stopped working at the same time. I suspect it has something to do with Netatmo shutting down the HTTP server since the problem seemed to occur at the time Netatmo took that action. My version of the plugin is 2015.01.28 @akbooer. Did I miss something? If so please point me to whatever I should have seen. If not, please advise on what action I should take. Thank you
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 22, 2015, 09:03:53 am
I didn't know Netatmo had done anything with their servers.  Both of my stations are still working.  The plugin uses HTTPS for private API access.
Title: Re: Netatmo Weather Station plugin
Post by: Silverow on May 22, 2015, 10:36:50 am
What is the latest version in app store?

I have "can't detect device" error on ui7
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 22, 2015, 10:53:37 am
What is the latest version in app store?

I have "can't detect device" error on ui7

Use the latest Lua file here: Latest code update for UI7 (http://forum.micasaverde.com/index.php/topic,30478.msg217401.html#msg217401)
Title: Re: Netatmo Weather Station plugin
Post by: Silverow on May 22, 2015, 11:10:29 am
Could you publish it on app store?
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on May 22, 2015, 12:47:10 pm
I am stil on the December 2014 version and all is fine.
Title: Re: Netatmo Weather Station plugin
Post by: tdavis312 on May 22, 2015, 05:14:01 pm
I received an email from NETATMO three weeks ago stating that they were shutting down their HTTP servers and therefore any apps that were not using the HTTPS servers would no longer work after the 25th. Since I have tow long running NETATMO plugins that both stopped working on or around the 25th I thought that there might be some relationship. Both servers now fail to authenticate even though they had had no problem previously. I will try all suggestions. the plugin in vital to my installations. Thanks
Title: Re: Netatmo Weather Station plugin
Post by: Armedmetallica on May 27, 2015, 06:36:01 am
I received an email from NETATMO three weeks ago stating that they were shutting down their HTTP servers and therefore any apps that were not using the HTTPS servers would no longer work after the 25th. Since I have tow long running NETATMO plugins that both stopped working on or around the 25th I thought that there might be some relationship. Both servers now fail to authenticate even though they had had no problem previously. I will try all suggestions. the plugin in vital to my installations. Thanks

ahh - I just bought a netatmo, hoping to using it w. my Vera. I got all the api stuff done and am still getting that blasted auth error. i'm assuming that's because of the http vs https? Does yours show a different error?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 27, 2015, 08:29:14 am
Folks,

I am sorry you are getting authentication errors.
I really do not understand why, unless your credentials are wrong or not enabled.

Attached is a piece of code extracted directly from the Netatmo plugin, with a lightweight wrapper to test it out.  Run it in the test box (be sure to copy all the code), or in Rex Beckett's excellent RBLuaTest.  In the former case you'll have to peruse the log, in the latter case, you get a direct print of either "PASSED OK" or "FAILED" and an HTTP code error.

Just fill in your credentials in the four first string variables.  You'll see that it DOES use HTTPS protocol. This assumes you're running under UI7 since it uses the "dkjson" module (although the plugin itself, does not.)

Code: [Select]
-- test Netatmo authentication
-- @akbooer 27-May-2015

local client_id       = "your info here"
local client_secret   = "your info here"
local username        = "your info here"
local password        = "your info here"
 
local socket  = require "socket"
local url      = require "socket.url"
local https   = require "ssl.https"
local json    = require "dkjson"

local function log (msg)
  luup.log (msg)
  print (msg)
end


local access_token, refresh_token -- updated periodically after authorisation

-- HTTPS_request(),  HTTPS GET/POST with Lua table body definition and JSON return
-- see http://notebook.kulchenko.com/programming/https-ssl-calls-with-lua-and-luasec
local function HTTPS_request (url, params)
local req, Json
if params then -- it's a POST (otherwise a GET)
req = {}
for name,value in pairs (params) do
req[#req+1] = table.concat {name, '=', value}
end -- build the parameter string
req = table.concat (req,'&')
end
local reply,code = https.request (url, req) -- body, code, headers, status
if code ~= 200 then
log ('HTTPS error = ' .. (code or 'nil'))
Json = {}
else
Json = json.decode (reply)
end
return Json
end

local function authenticate (username, password, scope)
  scope = scope or "read_station"
local reply = HTTPS_request ("https://api.netatmo.net/oauth2/token",
{
grant_type    = "password",
client_id     = client_id,
client_secret = client_secret,
        username      =  (username),
        password      =  (password),
scope         = scope,
} )
access_token, refresh_token = reply.access_token, reply.refresh_token
return access_token ~= nil
end

-- run the test

log "Netatmo authorization test"
local ok = authenticate (username, password)
local msg = "FAILED"
if ok then
  msg = "PASSED OK"
end
log (msg)
return ok

----


I hope this helps to identify the problem.
Title: Re: Netatmo Weather Station plugin
Post by: Armedmetallica on May 27, 2015, 08:13:48 pm
Folks,

I am sorry you are getting authentication errors.
I really do not understand why, unless your credentials are wrong or not enabled.

Attached is a piece of code extracted directly from the Netatmo plugin, with a lightweight wrapper to test it out.  Run it in the test box (be sure to copy all the code), or in Rex Beckett's excellent RBLuaTest.  In the former case you'll have to peruse the log, in the latter case, you get a direct print of either "PASSED OK" or "FAILED" and an HTTP code error.

Just fill in your credentials in the four first string variables.  You'll see that it DOES use HTTPS protocol. This assumes you're running under UI7 since it uses the "dkjson" module (although the plugin itself, does not.)

I hope this helps to identify the problem.

thank you for your quick response. i think we've solved the problem, gubna! i'm on UI 6 - i thought this was UI6 compatible.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on May 28, 2015, 02:42:38 am
No, no.  The plugin IS UI6 compatible as far as I know.  I just meant that the test code I posted only runs on UI7.  If you want to test on UI5 or 6 then you have to specify a different json module.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on June 03, 2015, 02:00:36 am
Hi @akbooer, I was wondering if the forecast temperatures are available from the netatmo API. I mean the expected outdoor high/low temperatures of the day for my location.
Also expected wind and rain would be nice.
If these were available as a variable in the main device I could use them to send this information to some LCDs or Sonos.

My other option would be to get the wunderground app.

just a thought, have a nice day,
Tomas
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 03, 2015, 02:20:44 am
Sadly, I don't think so.  The entire list of recovered information is available on the Diagnostics page, under the 'devices' section.  Whilst I see a weather warning there, I see no forecast.

I did ask Netatmo about this in the early days and it seemed that it was outside their licence from MeteoWeather, who supply the data.

I had been thinking of adding a Wunderground account info to the Netatmo app in order to integrate such data...

Title: Re: Netatmo Weather Station plugin
Post by: korttoma on June 03, 2015, 02:34:12 am
It would be nice if this would be integrated but there is already a Vera plugin for the Wunderground so would it really be worth the effort of integrating it?
What would be the benefit over two separate plugins? Saved Vera memory?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 03, 2015, 02:52:10 am
Yes, I don't want to step on anyone's toes, though.  It would be very straight-forward to do: just one API call and JSON decode, for which all the code exists.  It would certainly save memory too.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on June 03, 2015, 03:21:58 am
 ;D  I'm all for saving memory. ( I'm still running a Veralite with the fear of running out of memory and there is still so much I would like to integrate )

Maybe you should check with @guessed before you integrate it if you decide to do it. I'm sure he will give you his blessing.


I was also looking at the "Say The Weather" app from JoeD. Seems like JoeD has moved on to something other than Vera since he has not posted anything for months. His plugin would save me some lua coding but it uses the Wunderground app ( maybe I can "hack" it to use your integration if you ever do it  ;) ).

Title: Re: Netatmo Weather Station plugin
Post by: korttoma on June 03, 2015, 07:32:47 am
Seems like I can forget about the "Say The Weather" app since it is hardkoded with English phrases and I plan to use Swedish TTS.
I bet it is more complicated than I can handle to update the Say The Weather app for Swedish so I think I will do the TTS lua manually for all purposes.
Title: Re: Netatmo Weather Station plugin
Post by: florisi on June 06, 2015, 03:35:35 pm
@akbooer

I try to use your plugin to rewrite it and use it for Netatmo Thermostat.
I've copied all the files and renamed them for my plugin.

I've renamed several items in the files.
Created a new dvice for it and it starts, the only thing that isn't running is the reports for diagnostics etc.
I get in the browser "no handler".
Could you explain how this works?
Maybe it is a simple thing.

Regards, Floris
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 06, 2015, 04:15:37 pm
It uses the register_handler call described here http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_register_handler (http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_register_handler).

You have to ensure that the named callback is global to the module, so you perhaps need the "_G." prefix in the function definition.

Title: Re: Netatmo Weather Station plugin
Post by: florisi on June 06, 2015, 04:36:26 pm
found it, it works.
Now I can try to call the device Thermostat from Netatmo.
Any idea how to do that?
Already changed devicelist in app_thermostat and changed in aythenticate read_station in read_thermostat but that didn't work

Regards, Floris
Title: Re: Netatmo Weather Station plugin
Post by: mclassen on June 06, 2015, 11:48:21 pm
dear @akbooer I try get Netatmo Weather Station work with your plugin I already have Client id and Client secret unique number. download later Version from app store and i also download from Netatmo: Latest code update for UI7 but still show up  Authorisation failed. in couple day i got e-mail from ifttt.com tell me your netatmo weather station channel is offline. when i login back in then it take me to netatmo website from ifttt.com guss to proved it. i think netatmo might something has change. just about everything
Title: Re: Netatmo Weather Station plugin
Post by: mclassen on June 07, 2015, 02:14:59 am
never mind it finally working now SORRY I throught never ever get to working
Title: Re: Netatmo Weather Station plugin
Post by: florisi on June 08, 2015, 07:00:20 am
I've tried to run this code for the thermostat by changing the scope from read_station to read_thermostat but that didn't work.
How to resolve this?

Floris

Folks,

I am sorry you are getting authentication errors.
I really do not understand why, unless your credentials are wrong or not enabled.

Attached is a piece of code extracted directly from the Netatmo plugin, with a lightweight wrapper to test it out.  Run it in the test box (be sure to copy all the code), or in Rex Beckett's excellent RBLuaTest.  In the former case you'll have to peruse the log, in the latter case, you get a direct print of either "PASSED OK" or "FAILED" and an HTTP code error.

Just fill in your credentials in the four first string variables.  You'll see that it DOES use HTTPS protocol. This assumes you're running under UI7 since it uses the "dkjson" module (although the plugin itself, does not.)

Code: [Select]
-- test Netatmo authentication
-- @akbooer 27-May-2015

local client_id       = "your info here"
local client_secret   = "your info here"
local username        = "your info here"
local password        = "your info here"
 
local socket  = require "socket"
local url      = require "socket.url"
local https   = require "ssl.https"
local json    = require "dkjson"

local function log (msg)
  luup.log (msg)
  print (msg)
end


local access_token, refresh_token -- updated periodically after authorisation

-- HTTPS_request(),  HTTPS GET/POST with Lua table body definition and JSON return
-- see http://notebook.kulchenko.com/programming/https-ssl-calls-with-lua-and-luasec
local function HTTPS_request (url, params)
local req, Json
if params then -- it's a POST (otherwise a GET)
req = {}
for name,value in pairs (params) do
req[#req+1] = table.concat {name, '=', value}
end -- build the parameter string
req = table.concat (req,'&')
end
local reply,code = https.request (url, req) -- body, code, headers, status
if code ~= 200 then
log ('HTTPS error = ' .. (code or 'nil'))
Json = {}
else
Json = json.decode (reply)
end
return Json
end

local function authenticate (username, password, scope)
  scope = scope or "read_station"
local reply = HTTPS_request ("https://api.netatmo.net/oauth2/token",
{
grant_type    = "password",
client_id     = client_id,
client_secret = client_secret,
        username      =  (username),
        password      =  (password),
scope         = scope,
} )
access_token, refresh_token = reply.access_token, reply.refresh_token
return access_token ~= nil
end

-- run the test

log "Netatmo authorization test"
local ok = authenticate (username, password)
local msg = "FAILED"
if ok then
  msg = "PASSED OK"
end
log (msg)
return ok

----


I hope this helps to identify the problem.
Title: Re: Netatmo Weather Station plugin
Post by: ljoube on June 13, 2015, 02:33:42 am
Hello.
Do you think to integrate in your plugin the Netatmo Welcome ?


Laurent.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 13, 2015, 10:43:46 am
I don't see any public API for that yet.  It would be a separate plugin anyway.
Title: Re: Netatmo Weather Station plugin
Post by: ljoube on June 13, 2015, 11:07:56 am
Ok thanks


Laurent.
Title: Re: Netatmo Weather Station plugin
Post by: slajgaj on July 02, 2015, 04:52:08 am
Will you also in the future have the rain gauge shown?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 02, 2015, 05:20:01 am
Will you also in the future have the rain gauge shown?

As I replied  to your post on another thread: it already does. 

If you add "R" to the ChildSensors variable, then it shows the gauge as a separate child device.  You can also have individual child sensors showing the SumRain1 and SumRain24 values (more useful, IMHO.)


Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 02, 2015, 11:50:41 am
I note there is, allegedly, a Wind sensor (ultrasonic) !

Does anyone have one of these yet (don't seem to be available in UK, at least.)  The API documentation has been updated on the developer' page, so, in theory, I can add support.  However, if you've actually got one, then it would help testing!
Title: Re: Netatmo Weather Station plugin
Post by: ljoube on July 02, 2015, 12:11:16 pm
And updated for the Welcome camera ?


Laurent.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 02, 2015, 12:58:46 pm
And updated for the Welcome camera ?

see my previous response http://forum.micasaverde.com/index.php/topic,16276.msg237949.html#msg237949 (http://forum.micasaverde.com/index.php/topic,16276.msg237949.html#msg237949)  :(
Title: Re: Netatmo Weather Station plugin
Post by: ljoube on July 02, 2015, 03:42:21 pm
I know, but as you say :"the API documentation has been updated", i could think that they integrated the cam ...
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on July 20, 2015, 01:43:15 pm
Akbooer, have just changed to Vera Edge from Vera 3 running latest UI7 build, and am rebuilding my network. I have attempted several times to run the Netatmo app (which I ran successfully on UI5) and keep getting "Netatmo: Authorisation Failed". I have followed the instructions in these posts with no success. Running the code above I get the message Authorisation OK. What can I do to solve the problem? (password has no special characters) tearing my hair out, need the Netatmo for my heating PLEG :'( :'( :'(
David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 20, 2015, 03:02:57 pm
What version are you running?
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on July 20, 2015, 04:24:06 pm
Netatmo Current Version:3.20141113 and UI7 1.7.1248


Sent from my iPad using Tapatalk
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 20, 2015, 04:35:55 pm
Give the one here a go: Netatmo: Latest code update for UI7 (http://forum.micasaverde.com/index.php/topic,30478.0.html)
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on July 20, 2015, 04:46:27 pm
Already tried with no success. Just tried this file again with same result


Sent from my iPad using Tapatalk
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 20, 2015, 05:19:29 pm
How are you entering the authorization data?
You have clicked the little check box marked: "switch to input type text" ?

You should stick with the latest update code, because that does work on UI7 (it's what I'm running).
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on July 21, 2015, 01:48:17 am
Missed that!!!!! Did that and success. I was looking and not seeing. Many thanks akbooer.


Sent from my iPad using Tapatalk
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 21, 2015, 04:53:46 am
Missed that!!!!! Did that and success. I was looking and not seeing.

Well, it's obviously a completely crazy system - what a useless interface!

Switch to @amg0's ALTUI immediately!
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on July 22, 2015, 07:41:02 am
Hi akbooer,

Can you post your files to show all your Netatmo devices on AltUI?

Cheers Rene.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 22, 2015, 08:18:14 am
Can you post your files to show all your Netatmo devices on AltUI?

The JavaScript extras file is attached, but I must admit that I edit the L_ALTUI.lua file to include the following Lua code (rather then updating the ALTUI variable)
Code: [Select]

  tbl["urn:akbooer-com:device:Netatmo:1"]= {
    ["ScriptFile"]="J_ALTUI_akb.js",
    ["DeviceDrawFunc"]="ALTUI_akbDisplays.drawNetatmo",
  }
 
  tbl["urn:akbooer-com:device:NetatmoNoise:1"]= {
    ["ScriptFile"]="J_ALTUI_akb.js",
    ["DeviceDrawFunc"]="ALTUI_akbDisplays.drawNetatmoGeneric",
  }
 
  tbl["urn:akbooer-com:device:NetatmoPressure:1"]= {
    ["ScriptFile"]="J_ALTUI_akb.js",
    ["DeviceDrawFunc"]="ALTUI_akbDisplays.drawNetatmoGeneric",
  }
 
  tbl["urn:akbooer-com:device:NetatmoRain:1"]= {
    ["ScriptFile"]="J_ALTUI_akb.js",
    ["DeviceDrawFunc"]="ALTUI_akbDisplays.drawNetatmoGeneric",
  }
 
  tbl["urn:akbooer-com:device:NetatmoCO2:1"]= {
    ["ScriptFile"]="J_ALTUI_akb.js",
    ["DeviceDrawFunc"]="ALTUI_akbDisplays.drawNetatmoGeneric",
  }
 
  tbl["urn:akbooer-com:device:urn:schemas-micasaverde-com:device:HomeAutomationGateway:1"]= {
    ["ScriptFile"]="J_ALTUI_akb.js",
    ["DeviceDrawFunc"]="ALTUI_akbDisplays.drawAKBaltui",
  }

As mentioned on the ALTUI thread, I'm converting all my own plugins to write a standard formatted line to a specific serviceId/variable, but it would be great if @amg0 could provide a default.
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on July 22, 2015, 12:16:14 pm
Hi,

I am not getting it working, I get an error in the JS and it messes things up a bit
TypeError: VeraBox.getStatus is not a function

I'll dig some more later tonight. [Update]: Should it be MultiBox rather than VeraBox with the latest version??

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 22, 2015, 01:26:00 pm
Could be... I'm a couple of versions behind: just can't keep up with @amg0!

Let me update and see what breaks!
Title: Re: Netatmo Weather Station plugin
Post by: amg0 on July 22, 2015, 03:57:11 pm
Could be... I'm a couple of versions behind: just can't keep up with @amg0!
Let me update and see what breaks!

I went throught massive changes in the code to support the multicontroller. now VeraBox becomes a private api and you need to use MultiBox.xxx() calls and do not use device.id but device.altuiid. Sorry about the changes but it was necessary.

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 22, 2015, 04:00:52 pm
I went throught massive changes in the code to support the multicontroller. now VeraBox becomes a private api and you need to use MultiBox.xxx() calls and do not use device.id but device.altuiid. Sorry about the changes but it was necessary.

No apology required, it's my fault for not keeping up!
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on July 22, 2015, 05:49:25 pm
Hi,

I made some updates and this looks to be working.

I added this to the AltUI config. I did not change its code as an update would erase it (and amg0 keeps those updates coming  :))

    "urn:akbooer-com:device:Netatmo:1": {
        "ScriptFile": "J_ALTUI_akb.js",
        "DeviceDrawFunc": "ALTUI_akbDisplays.drawNetatmo"
    },
    "urn:akbooer-com:device:NetatmoNoise:1": {
        "ScriptFile": "J_ALTUI_akb.js",
        "DeviceDrawFunc": "ALTUI_akbDisplays.drawNetatmoGeneric"
    },
    "urn:akbooer-com:device:NetatmoPressure:1": {
        "ScriptFile": "J_ALTUI_akb.js",
        "DeviceDrawFunc": "ALTUI_akbDisplays.drawNetatmoGeneric"
    },
    "urn:akbooer-com:device:NetatmoRain:1": {
        "ScriptFile": "J_ALTUI_akb.js",
        "DeviceDrawFunc": "ALTUI_akbDisplays.drawNetatmoGeneric"
    },
    "urn:akbooer-com:device:NetatmoCO2:1": {
        "ScriptFile": "J_ALTUI_akb.js",
        "DeviceDrawFunc": "ALTUI_akbDisplays.drawNetatmoGeneric"
    },


Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 22, 2015, 06:00:14 pm
I made some updates and this looks to be working.

Brilliant - thanks!
Title: Re: Netatmo Weather Station plugin
Post by: slajgaj on August 10, 2015, 04:24:57 pm
The Netat,o plugin worked 2 months.
Today evening Vera3 say:

Netatmo authorisation failed!
What's happened?

I checked the Netatmo API, working, i disabled and after enabled the API.
And checked the settings in the Vera, the settings are corrects.

Under Vera3 UI5 ...error!

I reset the APi key and now working :)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 10, 2015, 04:34:16 pm
Yes, that happened this evening on my two Netatmos also.  I think their servers must have been down.  OK now though.

Try a restart if it's still a problem.
Title: Re: Netatmo Weather Station plugin
Post by: slajgaj on August 10, 2015, 05:02:36 pm
Need reset the API key and after the new keys with working! :)
Thanks
Title: Re: Netatmo Weather Station plugin
Post by: Robjsewell on September 06, 2015, 05:18:22 am
Hi I did an update of this app via ALTUI Apps/Update button. All I get on my Netatmo modules now is temp and humidity, I used to get everything including rain. I've read this thread but to be honest I'm confused by it. I'm guessing I ought to have the same functionality as before?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 06, 2015, 05:55:20 am
The App Store version is out of date, so you actually went backwards in functionality.

Just load up the files in the latest zip here
http://forum.micasaverde.com/index.php/topic,30478.msg247304.html#msg247304
Title: Re: Netatmo Weather Station plugin
Post by: SJMarty on September 17, 2015, 04:17:07 pm
Hello,

I've had my Vera3 for a while and have just recently purchased the Netatmo gear.  I also exclusively use ImperiHome to control things.  A few quick questions...
Thank you!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on September 17, 2015, 04:42:15 pm
I don't use ImperiHome so, sadly, can't make any informed comment on these questions.

However, if you use scenes on Vera which need the measurements, then you'll need the plugin on Vera.  It's also able to render a graphical representation of all the data through an HTTP request (useful to embed in other web pages - see attached.)  Perhaps ImperiHome makes this functionality redundant, but at the same time, I don't see that installing it hurts anything.

I'm sure someone out there has done this before.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on September 18, 2015, 12:57:06 am
Just to add to the above. I use the Imperihome native support for Netatmo and also this plugin so there is no problem using both.
Benefit of using the Imperihome native support is that it can display a combined device containing temperature and humidity to save space in the dashboard view.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on October 02, 2015, 07:09:19 am
Hi akbooer,

I'm sure you are already aware of this but I thought it was worth mentioning just in case it will effect you plugin also:

"New SDKs are available for the Weather Station and the Thermostat. Some methods have been merged to simplify the access to devices data. Please note that those news methods should be used instead of the deprecated ones. New code samples have been released on github (https://github.com/Netatmo/Netatmo-API-PHP?utm_source=Welcome_API&utm_medium=email&utm_campaign=Welcome_API) "

Also for the firs time the Netatmo Welcome now looks like an interesting product since an API has been released.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on October 02, 2015, 09:26:02 am
Yes, they sent developers an email.  But thanks anyway. 
I knew you would flag this - I was just waiting for your post. ;)
I'll update in due course (it's about time for another release anyway.)
Title: Re: Netatmo Weather Station plugin
Post by: michelrochette on November 08, 2015, 11:21:04 am
I managed to connect my Netatmo my VeraEdge station.
Now that it works, I want to understand how to use data from my station.
Thank you! For your help.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 08, 2015, 11:30:58 am
Well, what you should be seeing is separate child devices displaying things like temperature, humidity, etc., etc.

Each one of these can be used in exactly the same way as any other device and device variable.  You can set triggers, notifications, read values using Lua code, ... everything you would normally do in Vera.

Did you have a particular need?
Title: Re: Netatmo Weather Station plugin
Post by: michelrochette on November 08, 2015, 11:45:44 am
Thank you!,

I reopened my VeraEdge and now I see the variables. Thank you! for the speed of your response.

Michel
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 10, 2015, 04:24:43 pm
What is the best way to enable the plugin with the latest updates?  Install from MIOS then update with the latest zip?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 10, 2015, 04:36:56 pm
Yes, that's it really.  I really must:
That would resolve any confusions.

I think the latest install probably puts the icons in the wrong place, but let me know and we can fix it.
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 10, 2015, 06:58:43 pm
Thanks akbooer.  Netatmo set to arrive tomorrow!

EDIT: Is this the latest?

http://forum.micasaverde.com/index.php/topic,30478.msg247304.html#msg247304
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 11, 2015, 02:28:41 am
Yes, that's the one.
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 11, 2015, 08:22:21 pm
OK.  Icons are not appearing correctly just as you expected.  I dumped them in the same location as the rest of the files.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 12, 2015, 02:02:00 am
No,that's definitely the wrong place.

If you are using UI7 they should go (uncompressed) into
Code: [Select]
/www/cmh/skins/default/img/devices/device_states/

For UI5, this would be
Code: [Select]
/www/cmh/skins/default/icons/
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 12, 2015, 08:10:42 am
The indoor icons are working the outside not.  Not sure how that can happen.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 12, 2015, 08:35:09 am
Nor I... browser refresh?
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 12, 2015, 07:15:27 pm
I was mistaken.  The temp and humidity icons are not working.  Both in and outside.

EDIT:  Tried 3 different browsers.
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 14, 2015, 09:01:37 pm
I can't get the indoor and outdoor temp and humidity icons to work. The rest do.  Is there a trick to getting these icons to work?

Help!
Title: Re: Netatmo Weather Station plugin
Post by: cybrmage on November 14, 2015, 09:27:10 pm
uploading image files using apps/develop app/luup files can corrupt the files (which is why my plugin embed the images into the lua file)... make sure you are not uploading them via the ui then decompressing them and copying them into place... use scp to copy the files to the Vera... then move them into place...
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 14, 2015, 09:35:43 pm
I uploaded using WinSCP.  Some work some don't.  Should I try to re-upload them again?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 15, 2015, 04:18:02 am
There is a trick for the temperature and humidity devices: you need to replace the standard .json file for them with ones that use dynamic icons.  The files are posted somewhere in the Netatmo child board.  I'm away from my development system right now, but will add a link if I find them before you do.

----------

Edit: I was thinking of this post http://forum.micasaverde.com/index.php/topic,16276.msg127922.html#msg127922 but these will be for UI5.
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 15, 2015, 10:47:19 am
I did a search of the forum using the .json file names mentioned in your link.  I could find nothing for UI7.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 15, 2015, 10:56:59 am
I haven't created UI7 icons for Netatmo temperature and humidity (or anything else for that matter.)  So I take it that the icons you are using are the UI5 ones, unless you've swapped out to the ones which @captain_igloo posted a while ago.

What are you imagining that these will look like?
Title: Re: Netatmo Weather Station plugin
Post by: wezley69 on November 15, 2015, 12:06:44 pm
@akbooer -  You are right.  Not sure what I was expecting to see.

Thanks for your efforts!
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on November 16, 2015, 07:07:59 am
Hi akbooer,

I'm sure you are busy with openluup and other things but have you by any chance looked at supporting the wind sensor for the Netatmo WS plugin?
The wind sensor emerged at Conrad.com and I happened to have a nice 20? discount voucher so I put in an order at 99? ( they increased the price to 105? on it after I ordered ).
Expected dispatch from 17.12.2015 and I bet this will be bumped forward.
Quite expensive but so far I have liked their products so maybe it is worth it.

I'm available for testing in case you do find some time for this.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 16, 2015, 07:38:15 am
I hadn't seen that this was out yet, although it was announced long ago.

I have yet to do the recent API upgrade too, so this will be an interesting diversion from openLuup.  It is way past time for an App Store update for Netatmo, although I hear rumours of native MiOS Netatmo support?

I'll look at the API anyway (since you're getting one!)
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on November 16, 2015, 07:56:16 am
I think it is only pre-ordering at the moment because it seems to be out of stock everywhere. I bet I will not get my device until next year.

Also if we actually get to see native MiOS Netatmo support in a year or 2 it will not be half as good as your plugin anyway ;)

I'll keep an eye out for new versions and let you know when I have a device to test with.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on December 21, 2015, 04:19:57 am
Seems like there is a chance for me to get the wind gauge this year after all:

It is already on the way and Scheduled Delivery:
"Tuesday, 12/29/2015, By End of Day"
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 21, 2015, 04:54:46 am
That is good news!  I still need to do a bit more on this, so any constructive criticism will be welcome.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on December 21, 2015, 06:28:05 am
It seems like I'm a bit behind with the updates for the plugin. I have "2014.11.12  @akbooer" according to advanced tab and 3.20141113 according to MyApps. Not sure what the latest version is.

I will grab the latest files from the Netatmo Wind Gauge thread when the time comes to set this up right?

btw, I'm stil on UI5 but I will give feedback when I have something on hand to play with.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 21, 2015, 06:44:08 am
I will grab the latest files from the Netatmo Wind Gauge thread when the time comes to set this up right?

Yes, that's right.

Having reached a bit of a plateau in development of openLuup, I'm revisiting my other plugins - all due for a major refresh.  I feel I have learned a great deal over the last year and I see much better ways to do things.  As well as being much easier to keep up to date in the App Store, I will also post all the code for the new versions on GitHub.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on December 21, 2015, 06:52:56 am
I will also post all the code for the new versions on GitHub.

That would be great! One good source for the latest files ;)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 14, 2016, 10:50:20 am
I'm preparing a new release for the App Store (and GitHub).  The new Netatmo API has enabled me to do some significant code refactoring and along with that I'm making other changes.  Any comments on the following:


On a more positive note, are there any things I should consider including? (aside from getting the wind module to function correctly.)
Title: Re: Netatmo Weather Station plugin
Post by: m0jon on January 18, 2016, 03:54:57 pm
Just a quick thank you for a great app.

Got my Netatmo weather station today. Downloaded the app and all worked straight away. Great addition to my Vera.

Thank you
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 18, 2016, 04:24:55 pm
Oh, that's great news - thanks for the feedback.

New update in the works with some new features:

Still in testing, but hope it won't be too long.
Title: Re: Netatmo Weather Station plugin
Post by: m0jon on January 18, 2016, 04:37:07 pm
also found this https://github.com/ekkelenkamp/netatmo2wow/ and now have netatmo automatically updating Met office weather observations website.

Looking forward to the updates, already planning to add the rain gauge

cheers
Title: Re: Netatmo Weather Station plugin
Post by: mcalistair on January 18, 2016, 04:55:09 pm
Oh, that's great news - thanks for the feedback.

New update in the works with some new features:
  • battery level indication on child devices
  • pressure trend text for atmospheric pressure
  • support for new wind gauge
  • extra measurement variables in master device
  • full support for UI5, UI7, AltUI

Still in testing, but hope it won't be too long.

Nice  ;D
Title: Re: Netatmo Weather Station plugin
Post by: guest20975 on January 20, 2016, 01:37:27 pm
AK
Just installed r4 on openLuup with no problems so far, will keep you informed of any problems found.

David
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 21, 2016, 03:11:11 am
Thank you, as ever, for the prompt feedback!
Title: Re: Netatmo Weather Station plugin
Post by: vodoley213 on March 23, 2016, 12:41:53 pm
Hello to everyone!
I've just downloaded the files in the latest zip. But... I am newbie and have to ask a stupid question: whether there is a guide on how to install this plugin? "Develop apps" tab is not obvios...
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on March 24, 2016, 04:08:48 am
Hi @vodoley213 your best option is to install this plugin from the "Install apps" on your Vera device web interface. Just search for Netatmo.

Check the first post in this thread -> http://forum.micasaverde.com/index.php/topic,16276.0.html

When this is installed you need to get the following from Netatmo:

ClientSecret
ClientID
Username
Password

There are instruktions for this also in the first post.


When you have this set up and working then you can get the latest files from github and update the plugin by uploading the files under Apps -> Develop apps -> Luup files. (looks like the latest version is allready available in the apps store so I think you do not need this at this moment)

(restart luup after upload and your done)

Good luck!
Title: Re: Netatmo Weather Station plugin
Post by: jbrink on March 25, 2016, 10:44:46 am
Hello Guys,

Having some problems with the Veraplus and the netatmo plugin. Keep getting authorization failed, but dit fill all four fields with the correct data. Resetted the client ID and Secret, rebooted logged in en out, but no result.

Anyone an idea what i do wrong?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on March 25, 2016, 12:44:44 pm
Please see this response to your other post...
http://forum.micasaverde.com/index.php/topic,36061.msg276174.html#msg276174

Ideally, please don't post the same question twice in different threads.  Thanks.
Title: Re: Netatmo Weather Station plugin
Post by: jbrink on March 26, 2016, 02:19:39 pm
Sorry,

wil not happen again  ::)
Title: Re: Netatmo Weather Station plugin
Post by: mcalistair on March 28, 2016, 06:12:54 am
Just a stupid question :-[, how can I update my existing Netatmo AppStore App v3.20141113 to the latest version?
Without having to de-install it first (losing all my devices and breaking scenes and triggers)?

I tried the ALTUI option in More > Plugin: Action Update... But that doesn't seem to do anything.

Thnx!

PS its on my "productive" UI5 (1.5.622)
Title: Re: Netatmo Weather Station plugin
Post by: amg0 on March 28, 2016, 11:13:42 am
Just a stupid question :-[, how can I update my existing Netatmo AppStore App v3.20141113 to the latest version?
Without having to de-install it first (losing all my devices and breaking scenes and triggers)?

I tried the ALTUI option in More > Plugin: Action Update... But that doesn't seem to do anything.

Thnx!

PS its on my "productive" UI5 (1.5.622)
there is an issue with that plugin page. I am fixing it now as it should have worked
Title: Re: Netatmo Weather Station plugin
Post by: Lonestar10 on April 24, 2016, 11:26:51 am
I apologize for such a newbie question, but in April of 2016, I am total confused on how to install and configure a Netatmo Weather Station plugin in a Vera Plus UI7.

I downloaded the plugin from the Vera App store.  I think I have proper credentials from Netatmo (Client ID and Client Secret), username and password are correct, but I am stuck at "Authorization Failed."

Is there an up-to-date, step-by-step guide?  Do I need to download something else?

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 24, 2016, 11:58:13 am
It sounds like you've done everything right, except, perhaps enter the authorization credentials.

Did you, in fact, remember to tick the box before entering the relevant text?
Title: Re: Netatmo Weather Station plugin
Post by: Lonestar10 on April 24, 2016, 06:28:15 pm
Quote
It sounds like you've done everything right, except, perhaps enter the authorization credentials.

Did you, in fact, remember to tick the box before entering the relevant text?

Yes.  I even deleted the app and re-installed it, making sure the four boxes were checked before inputting text (Client ID, Secret, username and password).

Still reads: "Authorisation (sic) failed"

UPDATE:  After an hour passed, I checked again and the Plugin has installed.  I'm now getting pressure, CO2 and noise readings, but no temperature.  Wind and rain sensors will be installed to the Netatmo next week.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 25, 2016, 02:43:56 am
Still reads: "Authorisation (sic) failed"

Although I lived in Texas for five years, and am almost bilingual, that is the way we spell it in English.

Quote
UPDATE:  After an hour passed, I checked again and the Plugin has installed.  I'm now getting pressure, CO2 and noise readings, but no temperature.  Wind and rain sensors will be installed to the Netatmo next week.

Very odd about the temperature. Do you have any temperature readings as variables under the main device?  What is your ChildSensors string?

Title: Re: Netatmo Weather Station plugin
Post by: Lonestar10 on April 25, 2016, 12:17:44 pm
Main device variable lists temperature of 21.6 (C), which is the indoor temperature of 70.88 (F).

Also under variable, Station Children and Module Children are blank, if that means anything.

Wind station is now up and running on Netatmo and has now appeared in Vera.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on April 25, 2016, 04:12:20 pm
Main device variable lists temperature of 21.6 (C), which is the indoor temperature of 70.88 (F).

Yes, that's correct.  All of the main device variables are copied directly from the Netatmo's API and are in metric units.  However, the measurements as shown by the individual child devices are converted into local units and can optionally be calibrated with a user-defined offset if you wish (most useful for small temperature adjustments and somewhat larger ones in humidity.  Pressure is generally spot on.)

Quote
Also under variable, Station Children and Module Children are blank, if that means anything.

Yes, it looks like you haven't customised the names of your indoor and outdoor unit, so I suspect they are just called 'Station' and 'Module'.  These parameters are user-definable and are ways of specifying, to the individual measurement level, what child devices you'd like to show, possibly in addition to the broad classes specified in ChildSensors.  Described here http://forum.micasaverde.com/index.php/topic,16276.msg183096.html#msg183096

Quote
Wind station is now up and running on Netatmo and has now appeared in Vera.

Excellent!

I know the lack of proper documentation is a pain.  It's on the list to do.
Title: Re: Netatmo Weather Station plugin
Post by: chris66 on November 30, 2016, 07:23:44 am

Wind station is now up and running on Netatmo and has now appeared in Vera.

Hi Lonestar, is this ok with the WindSensor for you? What is the reactivity time? I mean, I will use it for outside Blind management, so when there is strong wind, I have to react quickly. Thanks.
Title: Re: Netatmo Weather Station plugin
Post by: 84sigge on December 03, 2016, 02:22:40 pm
Hello!
I have some problem when I install the Plugin, I have type in clientid, client secret, username and password. Now it says "Netatmo: Startup LUA failed". And when I check in devices is says "can't detect device"

do I have to do something in Netatmo connect?

Can some one help me with this? Whats wrong?
Title: Re: Netatmo Weather Station plugin
Post by: withay on December 26, 2016, 10:47:46 am
Got a Netatmo for xmas - went to install, and (silly me!) I was at the registration page tearing my hair out!  I could NOT figure out what to put in the "name" field...

After fifteen minutes, I took a guess that it wanted my VERA Plus name, and that worked!  :)

Is the app that I installed using the "Install App" on UI7 current?

It seems pretty darn cool so far!!  Everything seems to be working properly.

Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 26, 2016, 11:54:27 am
Yes, I think it's current.  No changes since February!

Actually, ANY name will do for registering the application, IIRC, it's just a way of labelling that particular set of client credentials.

Glad it's working for you!
Title: Re: Netatmo Weather Station plugin
Post by: 84sigge on January 03, 2017, 01:29:32 pm
Somone have any Idea?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 03, 2017, 01:35:04 pm
Somone have any Idea?
Title: Re: Netatmo Weather Station plugin
Post by: 84sigge on January 05, 2017, 02:13:57 pm
1. In Apps
2. 1.7.2406
3. Where can I find log file? (sorry I'am a newbie)

edit:
Maybe I found someting In:
x.x.x.x/cgi-bin/cmh/log.sh?Device=LuaUPnP

10   01/05/17 21:49:47.283   Device_Variable::m_szValue_set device: 117 service: urn:micasaverde-com:serviceId:HaDevice1 variable: Configured startup: 0 v:0xdebfe8/NONE <0x77657000>
10   01/05/17 21:49:47.284   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: Version startup: 2016.01.26  @akbooer v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.285   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: TokenRefresh startup: 120 v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.285   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: MeasurementPoll startup: 10 v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.286   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: TimeFormat startup: %a %H:%M v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.287   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: ChildSensors startup: THCPNRW v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.287   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: IconSet startup: 4 v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.288   Device_Variable::m_szValue_set device: 118 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailure startup: 1 v:0xf86c40/NONE <0x77657000>
10   01/05/17 21:49:47.288   Device_Variable::m_szValue_set device: 118 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailureTime startup: 1483579665 v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.289   Device_Variable::m_szValue_set device: 118 service: urn:micasaverde-com:serviceId:HaDevice1 variable: CommFailureAlarm startup: 1483583265,1 v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.290   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: ClientID startup: 58404e892b2b4nnnnnnn v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.290   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: ClientSecret startup: Ba7y8XAHu3wyXbNAEul4v43nelRnQbKUHnnnnnnn v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.291   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: Username startup: xxxxx@xxxxx v:(nil)/NONE <0x77657000>
10   01/05/17 21:49:47.292   Device_Variable::m_szValue_set device: 118 service: urn:akbooer-com:serviceId:Netatmo1 variable: Password startup: xxxxxxxx v:(nil)/NONE <0x77657000>
02   01/05/17 21:49:47.292   Device_Service::MatchupUpnpServices no upnp service for urn:akbooer-com:serviceId:Netatmo1 <0x77657000>
02   01/05/17 21:49:47.293   Device_Basic::m_eConfigured_set device 118 was 0 now 0 startup <0x77657000>
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 06, 2017, 05:45:09 am
Well done on finding the log file.  I see you used the URL... that's probably the simplest way without logging in with ssh.

The log entries you show seem (I think) normal and I believe they're just part of the startup where the variables are initialised from the previously stored file.  Further on, there should be something where the actual plugin code starts to run (or not) which will be more useful.  However, it's must be true that the code has previously run at least partially since some of the variables have indeed been created.

The log is buffered, so you may have to wait a little while for later entries to appear.
Title: Re: Netatmo Weather Station plugin
Post by: 84sigge on January 07, 2017, 03:36:52 pm
OK, I checked today and find some more lines with netatmo:

Device_LuaUPnP::MatchupImplementations device 118 using implementation: I_Netatmo.xml with 0 services <0x771d7000>
JobHandler_LuaUPnP::ParseAllImplementations parsed I_Netatmo.xml <0x771d7000>

Device 118 Description: Netatmo <0x771d7000>
Parsing device 118: template urn:akbooer-com:device:Netatmo:1 controlled via 0 room 0 IPaddress  mac  disabled 0 <0x771d7000>

edit:
XXX-UpdateSystemMessagesTasks now 2=Netatmo[118]: Startup Lua Failed timeout 0 (-1483822803) count: 6 pend:(null)/err:Startup Lua Failed/done:(null) <0x7776e520>


Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 08, 2017, 07:27:41 am
Well, we are getting closer, but there should be yet more in the log before your last edit.  The relevant line may not include the word Netatmo, if that's what you've been searching for, but it should include the device number 118.
Title: Re: Netatmo Weather Station plugin
Post by: 84sigge on January 08, 2017, 02:55:53 pm
Now I have searched in the file and can?t find anything with device 118, who I have not pasted here.

I searched for failed and found this:

local function EscapeJson( json, dkjson )
         local dkjson = dkjson
         if not dkjson then
            dkjson = require("dkjson")
            if not dkjson or type(dkjson) ~= "table" then
               luup.log("ApexisUI7:GetWifiNetworks- Failed to load dkjson.lua", 1)
               return "{}"
            end
         end

         return dkjson.quotestring(json):sub(2, -2)
      end

Have this something with my problems to do?
I was wondering if I have to open ? port i my firewall to get this work?

Thanks for you helping me.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 08, 2017, 05:32:24 pm
This is nothing to do with Netatmo.

Do you know what "ApexisUI7" is?
Title: Re: Netatmo Weather Station plugin
Post by: 84sigge on January 09, 2017, 03:16:03 pm
Apexis is my camera who is not connected just now.

Today I deleted the App and reinstalled it. During the installation it come?s up a screen with:

Config: start configuration. This should not take more than 2 minutes.
Config: found device: 121 for app: 4456
Config: waiting app data for app: 4456
Config: found app data.
Config: config data was not found. Waiting for it...
Config: it is now safe to exit this screen.

Is this normal (the red text) or is this the problem?

In Netatmo connect, is it just creat an app and take client ID and client secret? Do I have to fill in someting else?
Redirect URI? Webhook URL?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 09, 2017, 03:39:24 pm
I have no idea what that is.

You're not using Vera's built-in Netatmo capability, are you?
Title: Re: Netatmo Weather Station plugin
Post by: 84sigge on January 09, 2017, 04:08:05 pm
Now Idon?t know what you mean?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 09, 2017, 04:22:42 pm
I wrote the Netatmo plugin a while ago (but have kept it up to date with Rain / Wind / ...)   Some time afterwards, Vera produced some built-in support for Netatmo.  I don't know anything about it.  I've never used it.  But what you're showing me is something I don't recognise as my own plugin.
 
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on January 16, 2017, 02:58:10 pm
I don't see any built in support for the Netatmo in my Edge.
There is Netatmo plugin on the Apps list and that's more or less all (or I don't know how to set this up).

The plugin works fine, although I had some problems saving the user data (login/pass/client secret/client ID) - I had to enter them several times because they were not saving - maybe this is part of the problem you are discussing?

By the way, I tried to change measurement poll in variables section to less than 10 minutes to get more frequent updates (I use Netatmo to steer heating, so more frequent updates are helpful), but it goes back to 10 every time I try.
It isn't possible to go below 10 minutes or something is not working properly?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 16, 2017, 03:42:53 pm
By the way, I tried to change measurement poll in variables section to less than 10 minutes to get more frequent updates (I use Netatmo to steer heating, so more frequent updates are helpful), but it goes back to 10 every time I try.
It isn't possible to go below 10 minutes or something is not working properly?

No.  The Native Netatmo system actually updates on a 5 minutes basis, but the Web API limits you to 10 minutes at best, so the plugin enforces that as a lower limit for the parameter.

The API documentation is here: https://dev.netatmo.com/dev/resources/technical/guides/developerguidelines

Quote
Do not try to pull data every minute. Netatmo Weather Station sends its measures to the server every ten minutes.
Title: Re: Netatmo Weather Station plugin
Post by: Inzax on January 16, 2017, 03:44:08 pm
I wrote the Netatmo plugin a while ago (but have kept it up to date with Rain / Wind / ...)   Some time afterwards, Vera produced some built-in support for Netatmo.  I don't know anything about it.  I've never used it.  But what you're showing me is something I don't recognise as my own plugin.

There is a plugin in the app store.  However, when I first installed my netatmo weather station it did so without me installing any application.  I was somewhat confused and did not know if I should install the app.  I eventually did so. 

I think there is a bit more functionality with the app.  I
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 20, 2017, 08:22:20 pm
I have read over the directions on page 1, created the client ID and Client password.  Double check username and password.  My password does have an ! in it.

I cant get beyond authorization failure.

Thoughts
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 21, 2017, 03:09:58 am
Try with a different password with ugly alphanumerics.
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 21, 2017, 12:01:20 pm
Modified password, no luck,
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on January 21, 2017, 07:01:18 pm
Have you tried to check the option "switch to input type text" under the password field? That way it should accept all characters.

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 22, 2017, 12:25:16 pm
Still no luck, I checked the boxes on all 4 of the inputs.  This is almost like old comma deliminated  programming LOL.

Next idea
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 23, 2017, 06:00:40 pm
I decided to try my vera lite to get this app working.  Moderate success.  I am getting everything except the humidity sensors.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 23, 2017, 06:07:53 pm
What is in your ChildSensors variable?  Should be something like THCPNR.  If the H is missing, the humidity child devices will not be there.
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 23, 2017, 06:32:30 pm
my childsensor variable has  THCPNRW

These are the errors I am getting.
System error : Device: 254. Fail to load implementation file D_HumiditySensor1.xml
System error : Device: 257. Fail to load implementation file D_HumiditySensor1.xml

Cant see the devices in the vera user interface.

One strange aspect is I can access the humidity sensor via Homewave and they are giving the correct values.
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 23, 2017, 06:37:40 pm
I checked the logs and it looks like my vera is restarting over and over again.

01   01/23/17 16:32:00.316   UserData::WriteUserData saved--before move File Size: 27967 save size 27967 <0x2bf85680>
02   01/23/17 16:32:00.317   UserData::TempLogFileSystemFailure start 0 <0x2bf85680>
02   01/23/17 16:32:00.390   UserData::TempLogFileSystemFailure 5121 res:1

Do you have any idea what  could be causing this?
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 23, 2017, 06:40:17 pm
01/23/17 15:41:27.223   LuaInterface::CallFunction_Startup-2 device 253 function init failed Netatmo with return false <0x2b5fb680>
01/23/17 15:41:27.226   LuImplementation::StartLua running startup code for 253 I_Netatmo.xml failed <0x2b5fb680>

Dont know if these error messages help
Title: Re: Netatmo Weather Station plugin
Post by: dbmccallum on January 23, 2017, 07:42:23 pm
I deleted the device from the Vera Edge, added it back, and now that one works just fine.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 24, 2017, 03:05:57 am
Just one of those Vera things... glad it's working now.
Title: Re: Netatmo Weather Station plugin
Post by: acote5 on February 19, 2017, 11:22:12 am
I got the app to work - but data from my Netatmo Healthy Home Coach is not synchronized at all. Normal?
Title: Re: Netatmo Weather Station plugin
Post by: Kaizen on June 09, 2017, 08:23:39 am
Hi All,

N00b question.... Is there a water-tight process to resolve the Netatmo authentication issue?

I have the following:
- Client ID
- Client Secret
- Username
- Password

But the bloody thing still shows "Netatmo : Authorisation failed". Is there any odd requirement for the password?

Thank you
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 09, 2017, 08:28:52 am
Title: Re: Netatmo Weather Station plugin
Post by: Kaizen on June 09, 2017, 08:35:16 am
Thanks for the quick reply!

I have:
- Current Version:4.20160128
- Password is numbers and letters (upper and lower case)
- Yeah... I think I have this one right. The Client Secret is the longer string.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 09, 2017, 08:53:18 am
Latest is 20170116, suggest you update.

Also, of course, you the need authorised application to be enabled on the Netatmo site.
Title: Re: Netatmo Weather Station plugin
Post by: Kaizen on June 09, 2017, 09:01:15 am
Also, of course, you the need authorised application to be enabled on the Netatmo site.

^^^ Ah... Would you mind explaining?  :-[
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 09, 2017, 09:06:15 am
You may be OK, but IIRC, each licensed application has an enable/disable button which turns authorization on/off for that particular set of client ID/Secret ids.

I'd have to look at the site to check if you need more.
Title: Re: Netatmo Weather Station plugin
Post by: Kaizen on June 09, 2017, 09:58:27 am
YES! She's alive!

Apparently, I didn't have application active on the Netatmo site. Doh!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 09, 2017, 10:36:02 am
Phew!  I'm glad I thought of that!  Hope it all runs smoothly for you now.
Title: Re: Netatmo Weather Station plugin
Post by: Andries on June 22, 2017, 12:52:08 am
Where can i find the latest Netatmo app version 20170116, as in the app list shows only 4.20160128 also after update
please advice
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on June 22, 2017, 04:24:36 am
I think the latest files can be found from here -> https://github.com/akbooer/Netatmo/tree/development
Title: Re: Netatmo Weather Station plugin
Post by: Andries on June 23, 2017, 02:41:36 am
I Found it, many thanks
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on June 23, 2017, 02:58:02 am
@korttoma, thanks for responding with the right answer!

Title: Re: Netatmo Weather Station plugin
Post by: Stiansen on August 28, 2017, 08:16:09 am
Hi

Need some help with the authorization failed problem (bear in mind that I'm a so called newbie).

I just got the Netatmo and created an account with my email as username. I see that the thread say to only have alphanumeric signs but thats not easy using an e-mail account. Have not found any place where you can change this username.. Have I missed something here?

Next question is regardin installing from your github to get the new version. Can I get a quick (but also alittle detailed) guide on how to do this? Which files to upload and so on...

Thank you!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on August 30, 2017, 08:07:57 am
I just got the Netatmo and created an account with my email as username. I see that the thread say to only have alphanumeric signs but thats not easy using an e-mail account. Have not found any place where you can change this username.. Have I missed something here?

I don't think that you can change your Netatmo account name without deleting and starting all over again.  It's a while since I last tried to fix this problem (and gave up in frustration) but have you actually tried this?  The username is not usually a problem, but if you can stick to alphanumeric in the password that may work.

Quote
Next question is regardin installing from your github to get the new version. Can I get a quick (but also alittle detailed) guide on how to do this? Which files to upload and so on...

The latest files are in the development branch https://github.com/akbooer/Netatmo/tree/development

All the .xml, .json, and .lua files should go into /etc/cmh-ludl/ and the easiest way to get them there is to drag them to the Upload box on the Apps > Develop apps > Luup files page.  The icon files from the GitHub folder are harder.  If you know how to use scp or the like, then they go into /www/cmh/skins/default/img/devices/device_states/.

Ask again if you need further help or the authorization doesn't work.
Title: Re: Netatmo Weather Station plugin
Post by: Stiansen on November 26, 2017, 08:51:51 am
Thank you thank you..

Worked very nicely today and got all the child nodes in automatically. Very nice, and now I can rely on my netatmo and not WU.

Title: Re: Netatmo Weather Station plugin
Post by: STAIK on January 06, 2018, 02:06:30 pm
Hi,

I need some help, I don?t understand what I?m missing or set wrong.

I only get the app to show the main current measurement of each variable, I don?t get a device for max and min for temperature as example.

I can see in the Device list, MinTemp, MaxTemp, SumRain1, SumRain24... (Figure attached, Device list). Can I get these measurements as a Device (, in the figure Weather station)?

I have set ChildSensors, Netatmo (device) Advanced -> Variables, to ?THCPNRW?. Is this correct?

I?m running a Vera3 with UI7 and firmware 1.7.963 and Netatmo app version 4.20160128

Grateful if anyone can advise and help me!
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 06, 2018, 04:48:30 pm
By default, only the principal measurement of each sensor type is enabled as a child device by the ChildSensors variable.

For finer control, there is a master Netatmo device variable named XXXChildren, where XXX is the sensor name, which may contain the name of each required child device(s).  For example

Code: [Select]
GardenRoomChildren    MaxTemp, MinTemp, DewPoint

will enable those child temperature devices to be shown, even if T does not appear in the ChildSensors variable.
Title: Re: Netatmo Weather Station plugin
Post by: STAIK on January 07, 2018, 02:59:55 am
Thanks you!

Now I have the child devices max, min and SumRain... for the different Child Devices.
Thanks very much, and a very fast answer to my question!
 
The plugin is really great! I would probably not have bought Netatmo without this plugin to Vera!
Title: Re: Netatmo Weather Station plugin
Post by: gdme on January 08, 2018, 06:50:42 am
Just a FYI that I was having trouble setting up my new NetAtmo with Vera and couldn't figure out why

I was getting "Can't detect device" errors.

Searching through this thread I was able to eventually find the luup logs and found that I hadn't named my outdoor module during NetAtmo setup - this caused a NIL response to be returned to the name of the module which caused the NetAtmo plugin to fail to load.

Logging in to the NetAtmo web page and naming my outdoor module properly and then rebooting my Vera (to fast-tract the next poll) resolved the issue.

Hope this helps others in the future.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 08, 2018, 07:59:50 am
...found that I hadn't named my outdoor module during NetAtmo setup

Thanks for that... I'll try to fix that in the next update.
Title: Re: Netatmo Weather Station plugin
Post by: Erik01 on January 21, 2018, 05:25:37 am
I have the Netatmo plugin running. There is the main icon with the green indicator and it is updating every 10 minutes.
But there are no child devices, so no single reading of temperature, CO2 etc.

I use Vera Ui7. Version of the app is 2017.01.16. All icons (from Github) are in /www/cmh/skins/default/img/devices/device_states/
Other files are in /etc/cmh_ludl/ (with a .lzo extention)
I thought that the child devices were created automatically?
What can I do?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 21, 2018, 06:23:23 am
As I said in response to your previous post...

The child devices are defined as per this recent post in the Netatmo sub-forum

http://forum.micasaverde.com/index.php/topic,16276.msg339142.html#msg339142
Title: Re: Netatmo Weather Station plugin
Post by: Erik01 on January 21, 2018, 07:08:20 am
Sorry, I try to understand this.
When I go to the device list it is empty.

Diagnostics:
NETATMO CONFIGURATION PAGE at Sun Jan 21 13:07:08 2018


NetatmoConfig = {
  "devices":[],
  "user":{
    "administrative":{
      "country":"NL",
      "feel_like_algo":0,
      "lang":"nl-NL",
      "pressureunit":0,
      "reg_locale":"nl-NL",
      "unit":0,
      "windunit":0
    },
    "mail":"xxxxxxxxx@outlook.com"
  }
}

StationInfo = []

VERSION = 2017.01.16  @akbooer
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 21, 2018, 07:12:14 am
Well, that looks like it's not receiving any device information from the Netatmo web server, so the problem is not the child device configuration it's communication with the server.

Have you edited this listing?
Title: Re: Netatmo Weather Station plugin
Post by: Erik01 on January 21, 2018, 07:13:03 am
only the mail address
Title: Re: Netatmo Weather Station plugin
Post by: Erik01 on January 21, 2018, 08:21:22 am
Solved it!
My new station was connected to a wrong mail address. :-[
Now I added the mail address I use in de Netatmo API as extra 'administrator' for this new station.
Restarted the engine and YES there are the devices for CO2, temperature etc. :)
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 21, 2018, 08:23:26 am
Good news... thought it had to be something basic, but they're always the hardest problems to find!
Title: Re: Netatmo Weather Station plugin
Post by: npapailiou on May 23, 2018, 10:35:43 am
Hi,
I see that this topic is inactive for some time now. However, maybe someone watches and can provide help.
I have the Netatmo and I am trying to install the plugin but with no success. I uploaded the latest files from https://github.com/akbooer/Netatmo/tree/development, I have username and password but I get a message
System error : Device: 1193. Fail to load implementation file D_Netatmo.xml
Netatmo : Lua error

I use UI7 Veralite. I get the message only after uploading the updated files, not before.
Moreover, I cannot find out how to Register at http://dev.netatmo.com/ and get the clientid and the clientsecret. The form asks me for the app name and description, I don't know if there have been changes since the last topic post.
Thanks in advance for any help
Title: Re: Netatmo Weather Station plugin
Post by: Kositch on June 10, 2018, 09:04:34 am
Hello,

I am trying to make Netatmo Plugin work, but I am not successful. I can't use native Netatmo cloud-to-cloud because I have Windgauge and it is not working properly on my Vera (known issue).

I have installed Netatmo plugin from Appstore. I have uploaded all files from this GitHub https://github.com/akbooer/Netatmo/tree/development using Develop Apps - Luup Files - Upload. I have rebooted Vera. It still tells me I have old version 4.20160128 (in Variable there is already version 2018.02) in My Apps screen. I have recreated device Netatmo, I have entered variables Client ID and Client Secret. I don't have any Username and Password variable visible (known issue) so I added it via New Service. All credentials show filled in if I look on: http://10.0.0.130:3480/data_request?id=status&output_format=xml&DeviceNum=26. But nothing happens, no child devices are created and Netatmo device still tells me Netatmo.Cant.Detect.Device error. When I go back to Variables after a while, they are empty, like all the credentials are erased after a while.

I am quite frustrated. My Netatmo password has only alphanumeric characters.

Update: Restarted Vera and now all sensor are up and running :-) I have uploaded latest icon set using Win SCP and on WWW interface it looks great. Only problem is iOS app - there is only temperature showed with correct values, other sensor are there showed as Z-way device without any value, any advice on that?


Thanks for any help. I include screenshots.
Title: Re: Netatmo Weather Station plugin
Post by: lisam77 on July 01, 2018, 12:05:13 am
Hi, I am trying to connect my Netatmo weather station with my new Vera Plus.  It's the first device I'm attempting to connect.

My weather station is just basic at the moment - base (indoor), and outdoor.  More to come, but I just want to at least see something in my Vera dashboard for now.

I was following along with a youtube video and installed the Netatmo app.  It shows in my device with an error and says can't detect device, which is explained as expected first time up.  Going in to the app and in to advanced/variables (as my guide is telling me) I see something slightly different...

The guide has blurred the details in the variables screen so I can't see the version, but the guide was uploaded August last year.  The next rows are username, password, token refresh, etc

I have version (2016.01.26 @akbooer) which I believe is old - how do I update?  I see links and downloads, but how do I get it in to my system (can't the app be updated so it installs as current?).  Assuming that doesn't totally fix things, the next rows I have are client id and client secret.  I have no username or password row, it goes straight to token refresh.

The client id and client secret text boxes are populated with 'Register at http://dev.netatmo.com/'.  That site seems to think I'm going to create an app, which is getting way out of my depth!  I got an alert telling me of incorrect authentication information.

I came across a post in the forums that mentioned having to enable something in the Netatmo settings, but I can't find anything in there (standard dashboard site).


Edit: I have sorted out client id and client secret, and enabled on Netatmo.  But it still isn't connected, and I still don't have fields for username and password.

I hope someone can help - I thought this would be straightforward, like adding a skill in the Alexa app.  I can follow step by step instructions if I have them, but only if they match what I'm seeing... where do I find client id and client secret (which sound so much like username and password, but I tried typing in my Netatmo username and password and obviously that didn't work).

Thanks in advance!
Title: Re: Netatmo Weather Station plugin
Post by: lisam77 on July 03, 2018, 12:11:56 am
So this one was a case of confusion for me, and not quite enough information in any one place.  The guide I was following had fields in different places, and logging in to 'create an app' threw me entirely.  In case it helps anyone else in future:

I was using this youtube guide: https://www.youtube.com/watch?v=qI1zNPNSj6s&index=59&list=WL&t=472s (https://www.youtube.com/watch?v=qI1zNPNSj6s&index=59&list=WL&t=472s) (instructions start around 3:20 in).

In the dashboard I went to apps/install apps/Netatmo: Details --> devices (Netatmo will show error)/Netatmo/Advanced/Variables.

In my dashboard the 2nd and 3rd row were Client ID and Client Secret, and there was no Username or Password row.

To get Client ID and Client Secret go to dev.netatmo.com and register (create app) - scroll down the page and you'll find them - enter them in the respective fields in Vera.

Username and password refer to your Netatmo username and password.  I still had no fields for them so I used the advice given by the developer of the plugin in a different thread:

Type this into the UI page at Apps > Develop apps > TestLuup code (Lua)

Code: [Select]
luup.variable_set ("urn:akbooer-com:serviceId:Netatmo1", "Username", "XXX", DDD)
luup.variable_set ("urn:akbooer-com:serviceId:Netatmo1", "Password", "YYY", DDD)

where:
  • DDD - is the device number of your Netatmo plugin
  • XXX - is your Netatmo account username
  • YYY - is your Netatmo account password (avoid special characters)

then press GO.

I didn't have a problem with special characters.  Device number is shown on the 'params' tab of Devices/Netatmo/Advanced (it's the default tab before you click on 'variables'.  For me it was '5'.

It's still showing as the older version but doesn't seem to be hurting in  any way.  I still don't know how to update that...

Since then I've added a second indoor module with no problems on the Vera end.  Next will be my rain and wind gauges!  And in the not too distant future I should have enough devices to start playing with scenes!
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on July 03, 2018, 04:51:32 am
Latest files can be found from here -> https://github.com/akbooer/Netatmo/tree/development
Title: Re: Netatmo Weather Station plugin
Post by: lisam77 on July 06, 2018, 11:05:14 pm
Latest files can be found from here -> https://github.com/akbooer/Netatmo/tree/development
Thanks.  I've come across the files from a few different posts, but could you tell me how to actually do the update?  I've had auto update checked, but when I've gone back in it's unchecked.  I've hit update app and it's appeared to update, but when I go back in the only thing that has changed is that auto update is unchecked again.

It doesn't seem to be causing any problems, but seems like something that should be done, and is bound to cause problems eventually.  I think there might be updates to wind and/or rain.  I was to be installing my gauges this weekend, but so far it's been too wet and too windy!
Title: Re: Netatmo Weather Station plugin
Post by: cybrmage on July 07, 2018, 12:53:59 am
I've hit update app and it's appeared to update, but when I go back in the only thing that has changed is that auto update is unchecked again.

The version available on the App Marketplace is from 2016... and is no longer maintained... So if you do an "Update App" from the Apps/My Apps section, it will restore the last version publish on the App Marketplace - the 2016 version.

You need to download the files from the github repository ("Clone or Download"/"Download ZIP"), then unzip the files on your computer, then upload them to your Vera in "Apps/Develop Apps/Luup files" (make sure "Restart Luup after upload" is checked)...
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 07, 2018, 02:44:21 am
The version available on the App Marketplace is from 2016... and is no longer maintained...

I have (at last) summoned up the courage to go into the MiOS App Store an update this to the latest.  There will, of course, be the inveitable delay whilst this is approved.

Quote
You need to download the files from the github repository...

Your alternative, of course, is to install AltUI (and why would you not?) plus the Alternative App Store plugin (AltAppStore) which always has the latest version.
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 11, 2018, 03:32:01 am
I am sorry I have the same problem since I switched form vera lite to vera plus.

I put the last fils from the link but I dont get any password user.

If i enter the lines to create them i get Failed to test code, please try again

I hope someone can help
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 11, 2018, 04:50:49 am
An error when running test Lua must mean that you typed something incorrectly. 
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on July 11, 2018, 05:29:56 am
Or there is a problem with Lua code in scenes, in such case code in test lua window also won't work
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 11, 2018, 12:52:06 pm
Thanks for your help ! but I still can't make it work


I am using this

luup.variable_set ("urn:akbooer-com:serviceId:Netatmo1", "Username", "mynetatmoemaillogin", 154)
luup.variable_set ("urn:akbooer-com:serviceId:Netatmo1", "Password", "mynetatmopassword", 154)

So I use my email to log in my netatmo account and my password.... 154 is the device.

Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 12, 2018, 04:30:27 am
I am sorry, I mean it's still not working.

I uninstalled the device and put the on from the app again (this one show the netatmo icon)

If i send the new files... result is the same but device is shown without any icon
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 12, 2018, 06:50:36 am
Not really enough information yet. 


Try this in Lua Test:
Code: [Select]
local x = luup.attr_get "Mode"

what response does this give?


Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 12, 2018, 08:23:02 am
ok here it seem to have a probelm..

got last verion firmaware of vera plus

it seem lua is the problem, i tried local x = luup.attr_get "Mode"

get this in return

Failed to test code, please try again
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 12, 2018, 11:10:29 am
Call support.  Looks like the latest firmware has screwed things up AGAIN!
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 12, 2018, 11:14:52 am
I sent a message, I will tell you  ;)

Thanks for help
Title: Re: Netatmo Weather Station plugin
Post by: reneboer on July 13, 2018, 04:42:45 am
Try

local x = luup.attr_get ("Mode",0)

Not specifying the device ID (zero for Vera attributes) gives unexpected results.

Cheers Rene
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 13, 2018, 04:51:59 am
same result and I am wondering if the guys I have for support are waken..

I sent a picture including command and result and they answer:

Hello Criss,

Can you tell us the code that you wanna run on your unit for us to have a look at it ?

 
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on July 14, 2018, 03:51:35 am
Turn on notification bar and see if you don't have error in lua for scenes and events message. I don't think your problem is related to firmware, but if you have something wrong in lua in scenes, any code in test lua window (even the good one) will fail
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 14, 2018, 07:06:42 am
Messages display are

INSTEON : No INSTEON
Netatmo : Authorisation failed


that's what I have..... anyway can't find way to remove insteon also
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on July 14, 2018, 08:03:48 am
Notification about Netatmo is understandable, but there shouldn't be any information about insteon if you don't have one. Maybe you turned on some options for it by accident and this makes the code stuck?
Do you have any lua in scenes, by the way?
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 14, 2018, 10:08:11 am
ok I removed insteon.

In scenes, I have the one I created.... not shure what lua in scene is.

I went in scene and added this to light on living room

return luup.is_night() == false


Saved and get no error I think
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on July 14, 2018, 11:21:07 am

return luup.is_night() == false

Shouldn't it be
Code: [Select]
return (luup.is_night() == false)

?
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 14, 2018, 11:30:57 am
Shouldn't it be
Code: [Select]
return (luup.is_night() == false)

Nope. There's no ambiguity.  The comparison returns a single boolean value.
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 16, 2018, 03:46:26 pm
Well, I was able to send this command

luup.variable_set ("urn:akbooer-com:serviceId:Netatmo1", "Password", "YYY", 136)


No error,

same with account

but still in variables no way to see them

:-(


reboot did not help too
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on July 16, 2018, 04:19:53 pm
If Vera has decided that they won't show these variables, then there's nothing I can do about it.

However, this command in your browser:

Code: [Select]
http://your_Vera_IP/port_3480/data_request?id=status&DeviceNum=154

should show you the value of all your device's variables:

Code: [Select]
{
"Device_Num_307": {
"states": [
{
"id": 135,
"service": "urn:akbooer-com:serviceId:Netatmo1",
"variable": "Version",
"value": "2016.01.26  @akbooer"
},
{
"id": 136,
"service": "urn:akbooer-com:serviceId:Netatmo1",
"variable": "ClientSecret",
"value": "SSS"
},
{
"id": 137,
"service": "urn:akbooer-com:serviceId:Netatmo1",
"variable": "ClientID",
"value": "III"
},
{
"id": 138,
"service": "urn:akbooer-com:serviceId:Netatmo1",
"variable": "Username",
"value": "XXX"
},
{
"id": 139,
"service": "urn:akbooer-com:serviceId:Netatmo1",
"variable": "Password",
"value": "YYY"
},
{
"id": 140,
"service": "urn:akbooer-com:serviceId:Netatmo1",
"variable": "TokenRefresh",
"value": "120"
},
...

What does it show?
Title: Re: Netatmo Weather Station plugin
Post by: sundreamer on July 16, 2018, 05:11:19 pm
Ok I was able to make it work and aslo send icons in www/.............../icons with winscp as flashfxp wouldn't work

Now they are at the right spot but sitll not showing even after reboot.

Any idea ?



Title: Re: Netatmo Weather Station plugin
Post by: Taso M on July 24, 2018, 06:27:54 am
Hi all,I am new to Vera and home automation.
I have installed the latest version of Netatmo on my Vera Plus Controller to be able to turn the irrigation off when it rains from data off my Netatmo weather station. The problem I have is that the interface Vera-Netatmo is working correctly but there are no values or icons for Rain, Wind, CO2, Noise, Pressure. I can't create a  scene to run as Rain sensor doesn't show up in scenes only Temp/humidity. The data is in the Weather Station Advanced/Variables table but not on the Interface.

What would be the be process to fault find this problem?

Thanks In advance
TasoM
Title: Re: Netatmo Weather Station plugin
Post by: Taso M on August 06, 2018, 06:06:44 am
Hi,

Just sorted it out, I changed the Device-json field on Device-Advanced-Variables to D_NetatmoMetric.json and now works perfectly except all data from my other weather stations is also shown, is there a way to only show weather station data from a specific house?

TasoM
Title: Re: Netatmo Weather Station plugin
Post by: raoul on September 04, 2018, 11:47:30 am
Hi,

Just sorted it out, I changed the Device-json field on Device-Advanced-Variables to D_NetatmoMetric.json and now works perfectly except all data from my other weather stations is also shown, is there a way to only show weather station data from a specific house?

TasoM

Thanks TasoM, I had the same issue with Rain Gauge as well as CO2, Noise and pressure not showing readings. I found all elements just needed device_json needed updating.
Title: Re: Netatmo Weather Station plugin
Post by: Soso1234 on November 26, 2018, 10:41:21 am
Hi
please tell me what I need to do to modify my icons :wind, rain, CO2, noise and pressure.
I also want to show my values.
I'm asking for your help
thank you
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on November 28, 2018, 05:41:21 am
Find the latest plugin files from here -> https://github.com/akbooer/Netatmo/tree/development

Use  Apps -> Develop apps -> Luup files to upload the latest plugin files

Use scp or equivalent to transfer icon files to /www/cmh/skins/default/icons/

Title: Re: Netatmo Weather Station plugin
Post by: Soso1234 on November 28, 2018, 01:33:36 pm
Hi
I did as you said, but my icons are disappearing from the netatmo station and it still shows nothing.
Please if you have another solution
Thx.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on November 29, 2018, 12:32:06 am
Did you restart Vera a few times and then refresh your browser (Ctrl + F5)?
Title: Re: Netatmo Weather Station plugin
Post by: Soso1234 on November 29, 2018, 01:31:33 am
Thanks Tomas
We've restarted.
But now he is not updating.
All the old data (temperature and humidity)
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on November 29, 2018, 04:15:16 am
I'm also having issues with netatmo plugin recently. During last two days I'm getting continuous "Netatmo: Lua startup error". Sometimes reloading Lua helps, sometimes it have to be repeated couple of times.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on November 29, 2018, 06:57:12 am
It seems to me that there may have been problems with their website.  I've also recently had external modules drop from the main Netatmo system, and had to turn it off and on again several times.

As a diagnostic, check that the Netatmo app itself is showing that all is well.  However, this likely has nothing to do with icons being wrong.  That may still be user error?

I don't use my Netatmo plugin (or any others) on Vera these days, but run it under openLuup where it is certainly working fine.  The code hasn't changed for quite a while, though, so the plugin itself should be fine.
Title: Re: Netatmo Weather Station plugin
Post by: Cheesegeezer on December 10, 2018, 02:35:52 am
Can someone please help me out here.

I can't seem to get the app to work.
I installed the app
I have my username and password from the netatmo.com website
I read that i needed to create an app and then enter my client id and client secret, which i have done.  I also clicked on the Activate App button.
Vera is still saying Can't detect device. 
Version is 2018.02.27

Do I need to install Netatmo thru vera first then use plugin or just install the plugin
Everytime i reboot my vera plus all the info from the plugin, defaults to ??? or register at http://dev.netatmo.com - nothing is being saved by the plugin.
Should an app be created by your plugin or do i need to create one(as i have done already)

Any help would be really appreciated.


I
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 10, 2018, 10:19:55 am
Do you have any non-alphanumeric characters in your password?  This can sometimes cause Vera problems, so if so, change password and try again.
Title: Re: Netatmo Weather Station plugin
Post by: Cheesegeezer on December 10, 2018, 12:21:45 pm
Do you have any non-alphanumeric characters in your password?  This can sometimes cause Vera problems, so if so, change password and try again.

nope not at all. Thanks for reply
So I have installed the device using the vera standard inclusion process and it has created an indoor module and outdoor module.  It has also installed an app by orange.
I don't know what i'm doing wrong.
Could you explain the dev.netatmo.com process for me please
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 10, 2018, 12:33:46 pm
If it has created an indoor and outdoor module then it has, at least once, successfully connected to the Netatmo cloud.

Does the diagnostic link on the Netatmo plugin Control page return anything?
Title: Re: Netatmo Weather Station plugin
Post by: Cheesegeezer on December 10, 2018, 12:53:18 pm
no, I just get "no handler" when the page tries to open
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on December 10, 2018, 03:20:21 pm


So I have installed the device using the vera standard inclusion process and it has created an indoor module and outdoor module.  It has also installed an app by orange.

It is a different plugin, "supported" by Vera. Has issues with wind gauge which have been reported to Vera long ago and not fixed by them.

@Akbooer's plugin is a different one
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 10, 2018, 05:28:48 pm
@Akbooer's plugin is a different one

Good point!  I had read the OP's "inclusion process" to mean installation from the MiOS store, but apparently not.
Title: Re: Netatmo Weather Station plugin
Post by: Cheesegeezer on December 11, 2018, 01:56:47 am
This is why i'm confused guys.

When I added the device, I went to add devices in Vera UI, then clicked on thermostats and then selected the Netatmo weather station.  This then has everything working, but during the inclusion process it also installs a plugin by "orange"

So what is the correct process for getting your app to work.

Many Thanks
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 11, 2018, 06:43:20 am
Remove whatever plugin you've managed to install.

Go to the MiOS App Store and install the Netatmo plugin from there.  Ask again if you need more help.
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on December 30, 2018, 03:59:08 am
@akbooer,

I have some issues with your plugin recently. I'm getting constant "Netatmo[ID]: Startup lua failed" message (ID is the ID of device created by Netatmo plugin).
The message like that was appearing before, but usually reload of lua solved the issue. Now it doesn't go. I've tried to reboot controller as well, but it didn't help.
Netatmo had some works on their servers recently, I'm not sure if it is correlated or not.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 30, 2018, 06:10:20 am
Yes, I have been having trouble too, recently.

Nothing has changed, AFAIK, on their cloud REST API, so I can only assume that it is a server problem.

I've found that initially contacting the servers appears to fail quite often, but once connected, all is well.

I really don't know what to suggest other than restarting, until it works.
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on December 31, 2018, 07:34:35 am
Doesn't help, tried number of times during last couple of days without luck.

I tried to change password (there is one special character in it, although it was never a problem before), but according to their password policy using special characters is mandatory now.
Any suggestions?
Title: Re: Netatmo Weather Station plugin
Post by: kwieto on January 02, 2019, 04:29:47 pm
OK, so I figured it out.
I have two Netatmo stations, one of them for unknown reason stopped reporting and needed a restart to be active again.
I've checked the dates and the last measurements available in Netatmo app were at the same date as last update reported by plugin (couple of hours difference, though).

After restarting the station, everything went back to normal. As I don't need that station in Vera, it would be nice to have option to choose which station is used by plugin, hopefully this would solve also issues with connection to servers (?).
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 02, 2019, 05:37:45 pm
Yes indeed.  When I first had problems I restarted both my main Netatmo stations in a attempt to resume operation.  This seemed to help in one case, but I think that there were also server problems at the time which compounded the issue.

Anyway, glad that you're back in business. 

The only current way to separate stations is to use separate accounts.  I'm not sure that a client-side selection of one station out of several would solve anything in this case.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on January 04, 2019, 01:21:54 am
Opened my Vera interface this morning and noticed that the Netatmo plugin had not got any values for the last 2 hours.
Engine Reload results in "Startup Lua Failed" (tried multiple times).
Strange since the Netatmo station updates just fine @ https://my.netatmo.com/app/station
No errors @ https://dev.netatmo.com

I will have to wait until I get home so I can try restarting the Netatmo Station.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on January 04, 2019, 10:29:23 am
Rebooting the Netatmo Main unit an the reloading vera engine solved the issue.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on January 16, 2019, 03:07:26 am
feedback from Netatmo support:

"Restarting the station should not influence 3rd party applications, so I am unable to explain this situation.
Netatmo will not be providing localized services, we are exclusively working on cloud services.
Thanks again for your interest in Netatmo.
wish you a nice day."
Title: Re: Netatmo Weather Station plugin
Post by: Asfaltsystem on January 21, 2019, 04:35:31 pm
I have Vera Secure and when i installed the latest plugin 2018.02.27 i got Netatmo.Can't Detect Device.
Regards
HC
Title: Re: Netatmo Weather Station plugin
Post by: P-a on January 30, 2019, 02:22:18 am
Hi,

I am also getting Start-up Lua failed. Rebooted my station and reloaded engine. Any advice?

BR
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 30, 2019, 06:04:13 am
Yup, happening to me too.

Nothing has changed in the app or the API, so I can only assume it is their problem once again.

Very frustrating.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on January 30, 2019, 10:43:05 am
...and, for me, it's now started working again ...  :o
________

Edit:  I just checked my data logging and it seems that for quite a number of hours over the last three days there have been communication failures, and a running system resumes once they're back online.  This does make debugging and diagnosing any code issues MUCH harder!
Title: Re: Netatmo Weather Station plugin
Post by: opel-oleg on January 30, 2019, 02:36:12 pm
In Russia, worked without comment. I think the gestures are unnecessary ...
Title: Re: Netatmo Weather Station plugin
Post by: lennier on January 31, 2019, 11:44:26 pm
Edit: Don't worry, found the answer in another thread. Seems you have to manually set the username/password variables via luup now as they don't appear in the AdvancedVariables UI anymore.

-------------
I'm also having issues getting this plugin to work. I've installed it from the MiOS app store (version 2019.02.27) and it creates a 'Netatmo' device. As expected it initially reports auth failures (and can't detect device presumably as a result).

However when I go to the Advanced/Variables tab I only see variables for ClientID and ClientSecret, no username or password ones (as mentioned somewhere in this thread about setting this up). I've registered at http://dev.netatmo.com/ and created an ID and secret and entered them in the plugin but I still get auth failures. Is there somewhere I should be entering my Netatmos account username and password still as the earlier doc said, or is this no longer needed and something else is wrong?

Any help appreciated.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 03, 2019, 09:04:26 am
Opened my Vera interface this morning and noticed that the Netatmo plugin had not got any values for the last 2 hours.
Engine Reload results in "Startup Lua Failed" (tried multiple times).
Strange since the Netatmo station updates just fine @ https://my.netatmo.com/app/station
No errors @ https://dev.netatmo.com

I will have to wait until I get home so I can try restarting the Netatmo Station.

I believe that I have found, and partially fixed, this intermittent problem.

It appears to happen when the Netatmo base station loses contact, for whatever reason, with an external module for a period of time.  This seems, despite what Netatmo say, to cause some data to be missing from the periodic update of station measurements.

What this now means (post fix) is that if a station is missing during a Luup reload, and you have configured the plugin to show that measurement as a child device, then that child device will be missing and Luup restarted once again.

If you reload at a letter time and the missing data is back, a new child device (with a different device number) will be created.

This seems to be the best I can do at the moment. 

The update is in the latest GitHub development branch.
Title: Re: Netatmo Weather Station plugin
Post by: korttoma on February 03, 2019, 11:44:24 pm
Nice work akbooer!!

Unfortunately I get "Startup Lua Failed" with the new development version of "L_Netatmo.lua"

Going back to the older version ( https://github.com/akbooer/Netatmo/tree/a795fa0c1cff6b811465226c57776256807e8486 ) and it works fine again.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 04, 2019, 02:59:18 am
Odd. I can't think how this could be.

A significant difference is that even in the event of startup failure, the plugin will still run its server so it is possible to retrieve diagnostics from it and see what is happening.
Title: Re: Netatmo Weather Station plugin
Post by: mcalistair on February 04, 2019, 09:04:13 am
I can confirm this... Battery of Rainmodule was flat, replaced it, restarted Vera... all back to normal again.
So Flat battery can cause the startup /initialize issues.

Opened my Vera interface this morning and noticed that the Netatmo plugin had not got any values for the last 2 hours.
Engine Reload results in "Startup Lua Failed" (tried multiple times).
Strange since the Netatmo station updates just fine @ https://my.netatmo.com/app/station
No errors @ https://dev.netatmo.com

I will have to wait until I get home so I can try restarting the Netatmo Station.

I believe that I have found, and partially fixed, this intermittent problem.

It appears to happen when the Netatmo base station loses contact, for whatever reason, with an external module for a period of time.  This seems, despite what Netatmo say, to cause some data to be missing from the periodic update of station measurements.

What this now means (post fix) is that if a station is missing during a Luup reload, and you have configured the plugin to show that measurement as a child device, then that child device will be missing and Luup restarted once again.

If you reload at a letter time and the missing data is back, a new child device (with a different device number) will be created.

This seems to be the best I can do at the moment. 

The update is in the latest GitHub development branch.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on February 04, 2019, 09:11:39 am
Thanks indeed for independent confirmation of this!

It used not to happen, so something in the data structure must be different.  I just haven't tracked it down quite yet.
Title: Fixed problem with square icons and no data!!!
Post by: Dan-n-Randy on February 05, 2019, 09:12:36 pm
Totally solved my issue with only getting the square icons and no data on my child devices!!!

Thanks,
Randy :)

Hi,

Just sorted it out, I changed the Device-json field on Device-Advanced-Variables to D_NetatmoMetric.json and now works perfectly except all data from my other weather stations is also shown, is there a way to only show weather station data from a specific house?

TasoM
Title: Re: Netatmo Weather Station plugin
Post by: PrincessCleavage on February 17, 2019, 06:06:48 am
I can confirm this... Battery of Rainmodule was flat, replaced it, restarted Vera... all back to normal again.
So Flat battery can cause the startup /initialize issues.

Opened my Vera interface this morning and noticed that the Netatmo plugin had not got any values for the last 2 hours.
Engine Reload results in "Startup Lua Failed" (tried multiple times).
Strange since the Netatmo station updates just fine @ https://my.netatmo.com/app/station
No errors @ https://dev.netatmo.com

I will have to wait until I get home so I can try restarting the Netatmo Station.

I believe that I have found, and partially fixed, this intermittent problem.

It appears to happen when the Netatmo base station loses contact, for whatever reason, with an external module for a period of time.  This seems, despite what Netatmo say, to cause some data to be missing from the periodic update of station measurements.

What this now means (post fix) is that if a station is missing during a Luup reload, and you have configured the plugin to show that measurement as a child device, then that child device will be missing and Luup restarted once again.

If you reload at a letter time and the missing data is back, a new child device (with a different device number) will be created.

This seems to be the best I can do at the moment. 

The update is in the latest GitHub development branch.
Thanks, I also had a flat wind module and Netatmo Vera app staying startup Lua failed.
Replaced battery and Vera reload fixed it but pretty slack how lup engine can be so easily effected by non existing child device. I also get failed to start luup engine when a http endpoint I call in a scene is not available, bloody silly and difficult to troubleshoot as logs are very vague.
Title: Re: Netatmo Weather Station plugin
Post by: 3rdStng on March 14, 2019, 02:41:41 pm
Ugh... I was just bit with this Lua Startup Failed issue. I bought a second Netatmo station for my cabin and configured it as a second station/home. I then boxed it back up for when I head to the cabin within the next few weeks. This morning I restarted my ZWave engine and "Lua Startup Failed". I needed to plug the station back in to clear the message. I hope a solution can be found soon. Once installed in my cabin, I won't be able to power cycle it in the event there is an issue. I suppose I could the unit on a smart plug and restart it via Vera. Seems a bit much though.
Title: Re: Netatmo Weather Station plugin
Post by: PrincessCleavage on March 16, 2019, 10:06:31 pm
Does anyone have a workaround for the failed to start lua as this is very painful to troubleshoot when you don?t have physical access?
Title: Re: Netatmo Weather Station plugin
Post by: 3rdStng on March 16, 2019, 11:30:49 pm
Make sure all of your Netatmo devices are online, fresh batteries, and reporting to Netatmo. Without physical access, I'm thinking about getting a smart switch that I can reboot my main unit at my cabin.
Outside of that, I hope that a workaround can be programmed into the plugin to skip the missing node data.