The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Netatmo Weather Station Plugin => Topic started by: guest20975 on December 04, 2015, 09:03:45 am

Title: Netatmo Wind Gauge
Post by: guest20975 on December 04, 2015, 09:03:45 am
Just added the wind gauge to my Netatmo weather station, would be great if we could add it to the netatmo app, particularly living on top of a hill!!!!
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 04, 2015, 10:17:45 am
Ah, you got one.  Where from?

I'll certainly add it.
Title: Re: Netatmo Wind Gauge
Post by: guest20975 on December 04, 2015, 11:08:27 am
Bought mine from www.danholt.de in Germany together with a mounting bracket, free delivery to UK and rest of EU.
Title: Re: Netatmo Wind Gauge
Post by: mcalistair on December 04, 2015, 11:12:31 am
Bought mine from www.danholt.de in Germany together with a mounting bracket, free delivery to UK and rest of EU.
How cool, as it aint released yet in my country NL
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 04, 2015, 11:58:18 am
Bought mine from www.danholt.de in Germany together with a mounting bracket, free delivery to UK and rest of EU.

Sounds good.  I take it that you have it plugged in, but it's not appearing on Vera.  I'm hoping that everything else works OK, as before.

If this is the case, I'd be very interested if you could PM me a copy of the Netatmo configuration from the diagnostics link on the control panel.  This will help a lot (since I haven't got one yet.)

Thanks if possible.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 04, 2015, 02:03:30 pm
Here's a modified L_Netatmo.lua file to try.  It uses the new API as well as adding some support for the wind gauge.

Also attached is a file (server.lua) to fix the openLuup (Release 6) blank diagnostics page error (goes into openLuup's /etc/cmh-ludl/openLuup directory, if you're using it.)

This doesn't give you the D_NetatmoWind.xml or .json files, so there will be no measurement display or icon, just a generic device, but I'm interested in what you find under the main Netatmo device variables.  Also, if it works, the Netatmo diagnostics page.

You will also need to add 'W' to the list of Netatmo ChildSensors device variable.

I'm doing this without a device, so it may well not work too well.

Thanks
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 04, 2015, 02:54:13 pm
Ooops!  You'll also need this for openLuup.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 04, 2015, 05:17:09 pm
Updated file to address "Can't get child device for wind gauge" issue...
Title: Re: Netatmo Wind Gauge
Post by: guest20975 on December 05, 2015, 04:41:30 am
akbooer

luaUPnP.log as requested.

David
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 05, 2015, 05:38:04 am
Thanks... and could you try the new file too?
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 05, 2015, 05:57:44 am
The log is encouraging - it shows that the plugin is downloading the data from the wind gauge...

Code: [Select]
2015-12-05 09:27:03.320   luup.variable_set:22: 22.urn:micasaverde-com:serviceId:GenericSensor1.Wind GaugeTimeUtc was: 1449297166 now: 1449307387 #hooks:0
2015-12-05 09:27:03.321   luup.variable_set:22: 22.urn:micasaverde-com:serviceId:GenericSensor1.Wind GaugeGustAngle was: 252 now: 290 #hooks:0
2015-12-05 09:27:03.322   luup.variable_set:22: 22.urn:micasaverde-com:serviceId:GenericSensor1.Wind GaugeGustStrength was: 38 now: 37 #hooks:0
2015-12-05 09:27:03.323   luup.variable_set:22: 22.urn:micasaverde-com:serviceId:GenericSensor1.Wind GaugeWindStrength was: 15 now: 13 #hooks:0
2015-12-05 09:27:03.323   luup.variable_set:22: 22.urn:micasaverde-com:serviceId:GenericSensor1.Wind GaugeWindHistoric was: table: 0xf96070 now: table: 0x2077800 #hooks:0
2015-12-05 09:27:03.324   luup.variable_set:22: 22.urn:micasaverde-com:serviceId:GenericSensor1.Wind GaugeWindAngle was: 259 now: -1 #hooks:0

It's just not creating the child device.  Latest file may fix that.
Title: Re: Netatmo Wind Gauge
Post by: guest20975 on December 05, 2015, 06:31:10 am
Tried updated file, no success. Had a look at the lua file in bbedit and noticed you're declaring D_NetatmoWind.xml, something I don't have on my machine. Where do I get it from?
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 05, 2015, 09:46:54 am
D_NetatmoWind.xml, something I don't have on my machine. Where do I get it from?

Here.
Title: Re: Netatmo Wind Gauge
Post by: guest20975 on December 05, 2015, 10:16:20 am
OK added files and reloaded. No wind device got this error in luaUPnP.log

"2015-12-05 15:10:09.536   luup_log:22: Netatmo: Netatmo initialisation...
2015-12-05 15:10:11.213   luup_log:22: Netatmo: user.administrative.unit = 0
2015-12-05 15:10:11.216   luup_log:22: Netatmo: user.administrative.pressureunit = 0
2015-12-05 15:10:11.217   luup_log:22: Netatmo: user.administrative.windunit = 1
2015-12-05 15:10:11.217   luup_log:22: Netatmo: station name: DSR_Home
2015-12-05 15:10:11.218   luup_log:22: Netatmo: module name: Outdoor
2015-12-05 15:10:11.219   luup_log:22: Netatmo: module name: Main Bedroom
2015-12-05 15:10:11.220   luup_log:22: Netatmo: module name: Conservatory
2015-12-05 15:10:11.221   luup_log:22: Netatmo: module name: Rain gauge
2015-12-05 15:10:11.221   luup_log:22: Netatmo: module name: Wind Gauge
2015-12-05 15:10:11.222   luup_log:22: Netatmo: creating child devices...
2015-12-05 15:10:11.223   openLuup.context_switch::  ERROR: [string "[22] I_Netatmo.xml"]:818: table index is nil
2015-12-05 15:10:11.223   openLuup.scheduler:: job aborted : [string "[22] I_Netatmo.xml"]:818: table index is nil"
Edit 06/12/15

Added W to strings around line 818 in I_Netatmo.xml, now getthis in log
"2015-12-06 10:01:23.821   openLuup.scheduler:: [7] device startup completed: status=nil, msg=nil, name=nil
2015-12-06 10:01:23.821   openLuup.scheduler:: [22] device startup
2015-12-06 10:01:23.823   luup_log:22: Netatmo: Netatmo initialisation...
2015-12-06 10:01:24.666   luup_log:22: Netatmo: user.administrative.unit = 0
2015-12-06 10:01:24.669   luup_log:22: Netatmo: user.administrative.pressureunit = 0
2015-12-06 10:01:24.670   luup_log:22: Netatmo: user.administrative.windunit = 1
2015-12-06 10:01:24.670   luup_log:22: Netatmo: station name: DSR_Home
2015-12-06 10:01:24.671   luup_log:22: Netatmo: module name: Outdoor
2015-12-06 10:01:24.672   luup_log:22: Netatmo: module name: Main Bedroom
2015-12-06 10:01:24.673   luup_log:22: Netatmo: module name: Conservatory
2015-12-06 10:01:24.674   luup_log:22: Netatmo: module name: Rain gauge
2015-12-06 10:01:24.674   luup_log:22: Netatmo: module name: Wind Gauge
2015-12-06 10:01:24.675   luup_log:22: Netatmo: creating child devices...
2015-12-06 10:01:24.676   openLuup.context_switch::  ERROR: [string "[22] I_Netatmo.xml"]:817: attempt to index global 'THCPNRW' (a nil value)
2015-12-06 10:01:24.676   openLuup.scheduler:: job aborted : [string "[22] I_Netatmo.xml"]:817: attempt to index global 'THCPNRW' (a nil value)"

Edit  06/12 12:45pm GMT
solved the failure to create child sensors missed a "W", doh!!! STILL can't create Wind child!!!!!!
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 07, 2015, 01:30:17 pm
This is work in progress.  I don't think the units conversion for wind speed is correct yet, but if you're using default units it may be.

However, it should create a child device (if you ask it to) with windspeed and direction.  Under the child device (as for the main one) you will find relevant other information relating to gusts, times, etc...

Please to hear any feedback.
Title: Re: Netatmo Weather Station plugin
Post by: akbooer on December 08, 2015, 01:09:42 pm
Any thoughts on a favourite icon for the Wind Gauge?  Suggestions attached.  Perhaps I should start a poll?

Title: Re: Netatmo Wind Gauge
Post by: korttoma on December 08, 2015, 01:21:05 pm
The first one looks good to me 😉 ;)
Title: Re: Netatmo Wind Gauge
Post by: guest20975 on December 08, 2015, 02:38:12 pm
working fine so far, units are fine for me. Sorry for delay had to rebuild my raspberry pi before trying new file.
Title: Re: Netatmo Wind Gauge
Post by: guest20975 on December 08, 2015, 03:11:37 pm
First one for me also
Title: Re: Netatmo Wind Gauge
Post by: korttoma on December 29, 2015, 05:50:30 am
The Wind Sensor was delivered to my door today and since I'm on vacation I included it to my weather station right away.

Then I uploaded the following latest files I found from this thread:

D_NetatmoWind.json
D_NetatmoWind.xml
L_Netatmo.lua

also added  'W' to the list of Netatmo ChildSensors device variable.

The Wind strength device showed up in the Vera UI (UI5) with a generic icon and shows the same value as Netatmo online site.

All is well so far!!

To bad it is now to cold to mount it on my roof.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 29, 2015, 06:05:19 am
Well, that's all good news except for the cold weather.)  You can pick up your favourite icon from a couple of posts back.  If I recall, the wind direction, etc, is also in the child device variables, but I need to change the code to add wind direction to the display variable.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on December 31, 2015, 01:52:21 am
I noticed yesterday that some values were not updating to the vera devices. At least the outdoor sensor does not update. If I do a loop restar I get new values from Netatmo but not after that. Is there some aditional file (s) I would need to update?
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 31, 2015, 03:34:53 am
Oh yes, I missed that you only picked up some files, you need all the latest .lua files. Sorry.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on December 31, 2015, 04:09:48 am
Ok, I uploaded all files from here -> http://forum.micasaverde.com/index.php/topic,30478.msg247304.html#msg247304

except the L_Netatmo.lua

I?ll let you know if I still have problems.


I also grabbed one of the Icons from the previous post and renamed it to NetatmoWind.png and used WinSCP to put it here -> /www/cmh/skins/default/icons/ and the icon showed up nicely.

Thanks for everything so far.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on December 31, 2015, 07:47:30 am
Still no values are updated for me. Not sure what my next move is.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on December 31, 2015, 07:59:32 am
Still no values are updated for me. Not sure what my next move is.

Well, that would be for me to fix it!  Not so easy since I don't have one.  I know that @dsroberts1945 has one and, indeed, gave me access to develop this - I don't know if he's having the same problems?

Do you have any errors in the log?
Title: Re: Netatmo Wind Gauge
Post by: korttoma on December 31, 2015, 08:16:56 am
I did not see any errors in the Vera log but it seemed like it only updated the values for the main unit and then said it was done.

I uploaded the L_Netatmo.lua from the zip archive just to see if that one works. Is seems like it does.

Now trying the latest from this thread again.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on December 31, 2015, 08:36:54 am
here is what I see in the log file during an update.

Title: Re: Netatmo Wind Gauge
Post by: guest20975 on January 07, 2016, 01:08:17 pm
Just seen these latest posts. Im having no problems with values being seen from all modules, both indoor and outdoor. I am however only running netatmo on openLuup and not on my UI7 vera edges. the only problems with the wind gauge is finding the right position in my garden!!!
Title: Re: Netatmo Wind Gauge
Post by: crielv on January 12, 2016, 05:27:15 am
2 Questions:
1.Im trying to change from default icons to the one provided in the "icon" pack earlier in this thread.(http://forum.micasaverde.com/index.php/topic,30478.msg247304.html#msg247304)
   I can?t get the icon to show in my vera edge V7.

"plugin updated"
2.I get info from the wind Gauge - but only Wind Str to show in Vera.

Im using the L_Netatmo.lua 04-Dec-2015, add support for new wind module
Also added:
D_NetatmoWind.json
D_NetatmoWind.xml

But no "child device" is showing up ( see image ) - added W to devices

I
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 12, 2016, 06:37:00 am

Can you pm me your configuration page?
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 12, 2016, 07:09:35 am
@crielv

You will need the L_Netatmo.lua from 07-Dec-2015 to get the child device for wind.
Also try LoopRestart a few times and then refresh your browser.


@akbooer nice to see you back in action ;) hope you had a nice holiday.
Since no one else is having trouble geting data updates with the latest L_Netatmo.lua I'm givning it another go, I'll report back in a bit.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 12, 2016, 07:39:25 am
I stil have no luck with the latest L_Netatmo.lua

Only the values for the Main unit is updated.

Code: [Select]
50      01/12/16 14:23:39.642   luup_log:228: Netatmo: {"BarkamoIndoor":{ "AbsolutePressure":1003.8, "CO2":435, "DateMaxTemp":1452566032, "DateMinTemp":1452594928, "DewPoint":6, "Humidity":40, "MaxTemp":20.6, "MinTemp":20.1, "Noise":35, "Pressure":1006.1, "PressureTrend":"stable",

"TempTrend":"stable", "Temperature":20.1, "TimeUtc":1452601047}} <0x2dfd3680>
01      01/12/16 14:23:39.645   luup_variable_set interface 0x10e9e50 no date_max_wind_str/(null) <0x2dfd3680>
01      01/12/16 14:23:39.645   luup_variable_set interface 0x10e9e50 no max_wind_angle/(null) <0x2dfd3680>
01      01/12/16 14:23:39.646   luup_variable_set interface 0x10e9e50 no VindWindHistoric/(null) <0x2dfd3680>
06      01/12/16 14:23:39.655   Device_Variable::m_szValue_set device: 228 service: urn:micasaverde-com:serviceId:GenericSensor1 variable: IndoorTimeUtc was: 1452600445 now: 1452601047 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2dfd3680>
06      01/12/16 14:23:39.659   Device_Variable::m_szValue_set device: 228 service: urn:micasaverde-com:serviceId:GenericSensor1 variable: IndoorCO2 was: 444 now: 435 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2dfd3680>
06      01/12/16 14:23:39.659   Device_Variable::m_szValue_set device: 233 service: urn:micasaverde-com:serviceId:GenericSensor1 variable: CurrentLevel was: 444 now: 435 #hooks: 1 upnp: 0 v:0xcc3468/NONE duplicate:0 <0x2dfd3680>
06      01/12/16 14:23:39.774   Device_Variable::m_szValue_set device: 233 service: urn:upnp-org:serviceId:altui1 variable: DisplayLine1 was: 444 ppm now: 435 ppm #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 __LEAK__ this:16384 start:6242304 to 0x1c1a000 <0x2dfd3680>
06      01/12/16 14:23:39.775   Device_Variable::m_szValue_set device: 228 service: urn:akbooer-com:serviceId:Netatmo1 variable: Timestamp was: Tue 14:13 now: Tue 14:23 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2dfd3680>
06      01/12/16 14:23:39.776   Device_Variable::m_szValue_set device: 228 service: urn:upnp-org:serviceId:altui1 variable: DisplayLine1 was: Tue 14:13 now: Tue 14:23 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2dfd3680>
06      01/12/16 14:23:39.778   Device_Variable::m_szValue_set device: 228 service: urn:akbooer-com:serviceId:Netatmo1 variable: AppMemoryUsed was: 1001 now: 819 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:0 <0x2dfd3680>


If I do a LuupRestart all values will be updated.

Please tel me what you need from me to find the cause.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 12, 2016, 08:09:35 am
I stil have no luck with the latest L_Netatmo.lua
[...]
Please tel me what you need from me to find the cause.

You DO have the files D_NetatmoWind.json and D_NetatmoWind.xml ?

Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 12, 2016, 08:10:49 am
You DO have the files D_NetatmoWind.json and D_NetatmoWind.xml ?

Yes I do. I now uploaded them again just to be sure they are OK.

Stil no luck with data update. Only main unit (Indoor) data gets updated.

Code: [Select]
Station Module Sensor Raw Value Raw Units Local Value Local Units
Barkamo Regn SumRain24 0 mm 0 mm
Barkamo Regn SumRain1 0 mm 0 mm
Barkamo Regn Rain 0 mm 0 mm
Barkamo Vind MinTemp 0 ?C 0 ?C
Barkamo Vind MaxTemp 0 ?C 0 ?C
Barkamo Vind WindStrength 6 kph 1.7 ms
Barkamo VR MinTemp 20.3 ?C 20.3 ?C
Barkamo VR Humidity 33 % 33 %
Barkamo VR Temperature 20.3 ?C 20.3 ?C
Barkamo VR DewPoint 3.5 ?C 3.5 ?C
Barkamo VR CO2 374 ppm 374 ppm
Barkamo VR MaxTemp 20.8 ?C 20.8 ?C
Barkamo AR MinTemp 19.8 ?C 19.8 ?C
Barkamo AR Humidity 32 % 32 %
Barkamo AR Temperature 19.9 ?C 19.9 ?C
Barkamo AR DewPoint 2.7 ?C 2.7 ?C
Barkamo AR CO2 439 ppm 439 ppm
Barkamo AR MaxTemp 20.2 ?C 20.2 ?C
Barkamo Ute MinTemp -10 ?C -10 ?C
Barkamo Ute MaxTemp -8.7 ?C -8.7 ?C
Barkamo Ute Humidity 82 % 82 %
Barkamo Ute Temperature -8.9 ?C -8.9 ?C
Barkamo Ute DewPoint -11.5 ?C -11.5 ?C
Barkamo Indoor MinTemp 20 ?C 20 ?C
Barkamo Indoor Humidity 40 % 40 %
Barkamo Indoor AbsolutePressure 1004 mbar 1004 mbar
Barkamo Indoor DewPoint 5.9 ?C 5.9 ?C
Barkamo Indoor Temperature 20 ?C 20 ?C
Barkamo Indoor Pressure 1006.3 mbar 1006.3 mbar
Barkamo Indoor MaxTemp 20.6 ?C 20.6 ?C
Barkamo Indoor Noise 35 dB re ? 35 dB re ?
Barkamo Indoor CO2 440 ppm 440 ppm
Title: Re: Netatmo Wind Gauge
Post by: crielv on January 12, 2016, 09:39:39 am
  • you need to put the icons, uncompressed, into /www/cmh/skins/default/img/devices/device_states/
  • have you added W to your ChildSensors device variable in the parent Netatmo plugin?

Can you pm me your configuration page?

Sendt :) -
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 12, 2016, 11:12:45 am
Stil no luck with data update. Only main unit (Indoor) data gets updated.

...and nothing in the log to show a problem?

I can only imagine an unreported error that I catch in the code.  I'll take a look and see if there's room for better error reporting.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 13, 2016, 02:13:16 am
@akbooer

maybe I can give you access to my netatmo or Vera somehow? Would that help?
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 13, 2016, 03:26:55 am
Yes, access to the Netatmo would do it.  @dsroberts1945 was kind enough to do this to enable me to develop the wind module in the first place.  Why it's just you having problems, I don't know, but access will let me tidy things up,anyway.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 13, 2016, 04:04:33 am
So you need all of these then?:
ClientID   
ClientSecret   
Username   
Password

or just some of them?
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 13, 2016, 04:11:19 am
All, sadly, but they are easily changed and, indeed, you could set up a new app with its own client credentials for the purpose, so would not need to change the setup on your own system subsequently.
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 13, 2016, 04:33:38 am
You should have a PM right now...

Lets just hope my issue is reproducible at your end.

In case you forgot, I'm stil on UI5 btw... But have ordered a VeraPlus so in a few months I will have UI7 to...
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 16, 2016, 10:20:43 am
Can you give this a whirl and see if it fixes your child update problem with the wind gauge?
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 16, 2016, 11:22:18 am
Sorry @akbooer did not get far with those files:

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

Tried to download and add to Vera twice. No change.

Allso tried removing W from the ChildSensor property, still getting Lua error.

Then I went back to the lua files from the archive.zip and then I tried the new files once again.
Still no luck, only lua error. I noticed that even if I removed the W and when back to the archive luas the device tree and device list still show some wind related stuff. Maybe I have some old crap now disturbing my system?

Were you able to reproduce the issue by connecting to my station?
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 16, 2016, 11:26:48 am
Sorry @akbooer did not get far with those files:

Really?  Curious - it works for me.  UI5, you say?  I'll try it on that.

Quote
Were you able to reproduce the issue by connecting to my station?

I'm not sure.  The wind strength doesn't seem to vary, so hard to tell?
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 16, 2016, 11:31:40 am
It is easiest to see from the CO2 levels because they almost always change. You can login to my Netatmo account online to compare the values.

No fun trying to fix an issue you can not reproduce.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 16, 2016, 12:11:03 pm
It is easiest to see from the CO2 levels because they almost always change. You can login to my Netatmo account online to compare the values.

My (your) problem has specifically been with the wind gauge?  Do you actually have that indoors at the moment?

Quote
No fun trying to fix an issue you can not reproduce.

No indeed.

Is the attached any better?
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 16, 2016, 12:34:16 pm
My (your) problem has specifically been with the wind gauge?  Do you actually have that indoors at the moment?

When I have the problem with data updates only the values for the Main indoor unit are updated, so no updates from additional indoor units, outdoor unit, rain or wind. I do have the wind unit outside at the moment but there is not much wind and I think there is allot of snow on the unit that might disturb it. According to the netatmo online site it veries between 0.3 and 0.6 but can stay at one of those values for up to 30min.

Quote

Is the attached any better?

Yes! No more lua error. But unfortunately I still do not get any data updates for other units only the Main one. So far I tried this without the Wind device in Vera. Adding it now.
Title: Re: Netatmo Wind Gauge
Post by: mda on January 16, 2016, 02:39:19 pm
@korttoma - sorry for slightly off topic question but can I ask where you purchased your wind gauge? I can not seem to find them for sale. Thanks !
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 16, 2016, 04:30:18 pm
Conrad.com
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 17, 2016, 06:53:51 am
@akbooer, if you cannot reproduce my issue using UI5 and connection to my station I think you should not spend any more time trying to fix this. The wind data is just not that important at the moment. Besides I will replace my Veralite UI5 with a VeraPlus the next 2-3 months anyway.

Thanks for your effort.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 17, 2016, 06:58:56 am
I will fix it, but as part of a major refactoring to make it easier to deploy though the App Store and add (even) more modules in future.

I notice with a degree of horror, that I started this in 2013.  It has grown a bit ugly since then, with incremental changes and two Netatmo API updates, so it needs some work.

If you're OK at the moment, then that's good.

Thanks
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 17, 2016, 07:12:30 am
If you're OK at the moment, then that's good.

Yes, I am OK and I have no problem with waiting for a major refactoring, even if it takes 6 months. No preasure from my side.

Thanks again for everything!
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 26, 2016, 04:09:27 am
Just testing Version 4 and everything seems to work nicely.

One thing I noticed was that some of the variables available under the Wind device seems to show kph instead of m/s

MaxWindStr   23
GustStrength   11

23kph equals 6.388m/s ( this matches the 6.4 m/s highest wind gust recorded today )
11kph equals 3.05m/s (  this matches the current gust strength )

I'll let you know if I notice anything else.
Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 26, 2016, 06:04:24 am
One thing I noticed was that some of the variables available under the Wind device seems to show kph instead of m/s

Shame on me.  Can you try this?
Title: Re: Netatmo Wind Gauge
Post by: korttoma on January 26, 2016, 06:18:55 am
Shame on me.

No biggie, just thought I would mention it since I noticed it.

Quote
  Can you try this?

That seems to fix it ;)

MaxWindStr   6.4
GustStrength   1.7


BTW, I also love that you now have the latest files available on github maybe there would also be an idea ti have a development branch for files like the one you just had me test?
Title: Re: Netatmo Wind Gauge
Post by: crielv on January 26, 2016, 03:56:27 pm
Now i can see the child devices under controll and "device tree", but "only" the Wind Gauge - WindStr..is show under my devices.
1. Is it possible to display directions "more" from/in the device?
2. Loaded all the icons from latest update and put it under /www/cmh/skins/default/img/devices/device_states/ - but "only" the Green Netatmo is showing.
    Do i need to change some values?

Title: Re: Netatmo Wind Gauge
Post by: akbooer on January 26, 2016, 04:17:10 pm
Now i can see the child devices under controll and "device tree", but "only" the Wind Gauge - WindStr..is show under my devices.

I'll need a bit more information than that.  What settings do you have in your main Netatmo devices configuration variables?  What are you trying to achieve? By default, if you have specified 'W' as part of the ChildSensors variable value, then a WindStrength child device should be created.  It should display WindAngle on the front panel but also have things like GustStrength, etc., as its own child variables.  There should be a variable with a name something like WindGaugeChildren under the parent Netatmo device to which you can add the names of other wind variables you want as additional child devices.

Quote
1. Is it possible to display directions "more" from/in the device?

I don't quite understand the question - was this answered in any way in the above?

Quote
2. Loaded all the icons from latest update and put it under /www/cmh/skins/default/img/devices/device_states/ - but "only" the Green Netatmo is showing.
    Do i need to change some values?

What system are you running under?  Have you refreshed your browser? Perhaps an image of how your devices look on the UI will help me understand your problem.

Title: Re: Netatmo Wind Gauge
Post by: boykster on April 24, 2016, 02:48:41 am
Can anyone summarize how to add support for the weather gauge?  Ie - point to what files need to be uploaded and where they need to go (icons) for things to work?
Title: Re: Netatmo Wind Gauge
Post by: akbooer on April 24, 2016, 03:01:10 am
What version are you running?  The las test from the App Store should do it.
Title: Re: Netatmo Wind Gauge
Post by: boykster on April 24, 2016, 03:07:14 pm
I'm on ui7 but don't recall what plug in version I'm on.  If the app store version has it then I'll give it a go, thanks
Title: Re: Netatmo Wind Gauge
Post by: boykster on April 24, 2016, 06:12:27 pm
Installed new version from appstore and all is good - great work, love the plugin!
Title: Re: Netatmo Wind Gauge
Post by: Henninne on July 03, 2017, 06:31:09 am
Hi All,

Can anyone show me how I can access the other variables on the Wind Gauge, I like to be able to use Gust strength and other parameters in a scene. Can I make more devices or do I need to access the value via Lua script?

Thanks
Title: Re: Netatmo Wind Gauge
Post by: akbooer on July 03, 2017, 09:13:03 am
There's no need to have variables as discrete child devices in order to be able to use them in a scene.

From Lua, you would access them in the same way as any other device variable, using luup.variable_get()

Triggering a scene from an arbitrary variable is more difficult, since Vera's UPnP-defined triggers are not available for everything.  You could choose either to run a scene on a fixed schedule, or use a device variable watch callback to run some code when it changes.

Depends a lot on exactly what you are wanting to do.

Title: Re: Netatmo Wind Gauge
Post by: Henninne on July 03, 2017, 12:34:05 pm
Thanks for quick answer!

I am a bit of a noob ::) when it comes to Lua code, but I found an example and tried to adapt it. First is this the correct way to get the GustStrength variable? The plan is that this luup code will if GustStrength is above 6 m/s run a scene due to the true statement.


local HIGH_LEVEL  = 6
local DEVICE_NO  = 224
local WS_SID     = "urn:akbooer-com:device:NetatmoMetric:1"

local currentLevel = luup.variable_get (WS_SID, "GustStrength", DEVICE_NO)
currentLevel = tonumber(currentLevel)
 
if currentLevel >= HIGH_LEVEL then
    return true
else
    return false
end
Title: Re: Netatmo Wind Gauge
Post by: akbooer on July 03, 2017, 02:06:22 pm
It's nearly correct...

The SID is incorrect and should be urn:micasaverde-com:serviceId:GenericSensor1

I can't be sure, though, since I don't have a wind gauge!
Title: Re: Netatmo Wind Gauge
Post by: korttoma on July 04, 2017, 03:55:30 am
You  can always check the SID by hovering you mouspointer over the variable in the advanced tab of your device. It should show up as a tooltip.
Title: Re: Netatmo Wind Gauge
Post by: Henninne on July 04, 2017, 05:15:43 am
Thanks for the tip!

I checked and akbooer is right about the SID.

Thanks all
Title: Re: Netatmo Wind Gauge
Post by: BrianLBeaton on July 04, 2017, 06:40:03 pm
I use PLEG with my Netatmo wind sensor.  A snapshot of my status report is attached which shows the information you may be searching for.