We have moved at community.getvera.com

Author Topic: openLuup: Dark Sky (formerly Forecast.io) weather plugin  (Read 9930 times)

Offline logread

  • Full Member
  • ***
  • Posts: 214
  • Karma: +7/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #15 on: November 20, 2016, 04:38:10 am »
In my OpenLuup I dont have any directories under cmh and I dont have a skins directory under cmh-ludl either ????
I am puzzled... I am having the plugin version 0.3 running fine with dynamic icons on 3 different openLuup systems...

you should have an "icon" sub-directory in your "/etc/cmh-ludl/" directory (assuming this is the openLuup working directory in your setup, and in it should be the DarkSky-xxxx.png icons... This should (?) be created by the App Store upon installation for version 0.3 if it does not already exists. Could you please check this ? If it does not exist (please let me know of that), then could you create it and re-install the plugin version 0.3 ? At least we will know if this is an installer configuration issue (my bad if it is)...
Vera Lite UI7, Fibaro FGS-221, FGS-212, FGSS-001, FGK-101, FGWPE/F-101, FGMS-001, Aeon HEM G2, GreenWave PowerNode 6,  Everspring ST-814, SE-812, Swiid SwiidInter.
Raspberry Pi2 Raspbian w/ openLuup. AltUI, SV Thermostat, Virtual Switch, Weather (openWeather), System Monitor (openSysMon), HomeWave.

Offline logread

  • Full Member
  • ***
  • Posts: 214
  • Karma: +7/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #16 on: November 20, 2016, 04:45:18 am »
Glad it seems to work for you
Any chance that it would be easy to either add a virtual rain sensor output to this or tag off of it to set and clear a virtual rain sensor?
Not sure I fully understand what you want, but if it helps I can make the plugin expose as device variables the "precipIntensity", "precipType" and "precipProbability" values returned by the DarkSky API but ignored by the plugin for now ?
Vera Lite UI7, Fibaro FGS-221, FGS-212, FGSS-001, FGK-101, FGWPE/F-101, FGMS-001, Aeon HEM G2, GreenWave PowerNode 6,  Everspring ST-814, SE-812, Swiid SwiidInter.
Raspberry Pi2 Raspbian w/ openLuup. AltUI, SV Thermostat, Virtual Switch, Weather (openWeather), System Monitor (openSysMon), HomeWave.

Offline NikV

  • Full Member
  • ***
  • Posts: 143
  • Karma: +2/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #17 on: November 20, 2016, 06:03:05 am »
In my OpenLuup I dont have any directories under cmh and I dont have a skins directory under cmh-ludl either ????
I am puzzled... I am having the plugin version 0.3 running fine with dynamic icons on 3 different openLuup systems...

you should have an "icon" sub-directory in your "/etc/cmh-ludl/" directory (assuming this is the openLuup working directory in your setup, and in it should be the DarkSky-xxxx.png icons... This should (?) be created by the App Store upon installation for version 0.3 if it does not already exists. Could you please check this ? If it does not exist (please let me know of that), then could you create it and re-install the plugin version 0.3 ? At least we will know if this is an installer configuration issue (my bad if it is)...

yes I have an Icons subdirectory  see attach image - it only has the darksky.png in it which I put there after finding the path to it from your updated json so i downloaded it - I did just update the plugin from the plug ins page , should i do something different

Offline logread

  • Full Member
  • ***
  • Posts: 214
  • Karma: +7/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #18 on: November 20, 2016, 12:34:25 pm »
yes I have an Icons subdirectory  see attach image - it only has the darksky.png in it which I put there after finding the path to it from your updated json so i downloaded it - I did just update the plugin from the plug ins page , should i do something different
I cannot reproduce the issue you are having.... I deleted and re-installed the plugin version 0.3 and the installer indeed installed all the 11 icons the app uses in the /etc/cmh-ludl/icons directory... Not sure why you are having the issue, but still you can dowload the icons yourselves from the GitHub respository at https://github.com/999LV/DarkSkyWeather and manually add these to the icons subdirectory on your target system... Not ideal, but at least it should get you going...
Vera Lite UI7, Fibaro FGS-221, FGS-212, FGSS-001, FGK-101, FGWPE/F-101, FGMS-001, Aeon HEM G2, GreenWave PowerNode 6,  Everspring ST-814, SE-812, Swiid SwiidInter.
Raspberry Pi2 Raspbian w/ openLuup. AltUI, SV Thermostat, Virtual Switch, Weather (openWeather), System Monitor (openSysMon), HomeWave.

Offline NikV

  • Full Member
  • ***
  • Posts: 143
  • Karma: +2/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #19 on: November 20, 2016, 04:50:59 pm »
Thanks for that

looking at the log file im a little confused
Code: [Select]
2016-11-20 21:41:51.823   openLuup.server:: GET /cmh/skins/default/img/devices/device_states/DarkSky-cloudy.png HTTP/1.1 tcp{client}: 0x10704b8
2016-11-20 21:41:51.825   openLuup.server:: request completed (33363 bytes, 3 chunks, 2 ms) tcp{client}: 0x10704b8
2016-11-20 21:41:51.848   openLuup.server:: receive error: closed tcp{client}: 0x10704b8

at least it gets the file but it doesnt put the icon on the device

Perhaps i would be better if I unistalled and reinstalled it

Offline Mike Yeager

  • Hero Member
  • *****
  • Posts: 603
  • Karma: +11/-12
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #20 on: November 20, 2016, 05:28:56 pm »
Glad it seems to work for you
Any chance that it would be easy to either add a virtual rain sensor output to this or tag off of it to set and clear a virtual rain sensor?
Not sure I fully understand what you want, but if it helps I can make the plugin expose as device variables the "precipIntensity", "precipType" and "precipProbability" values returned by the DarkSky API but ignored by the plugin for now ?

That would probably do the trick. I have a virtual rain sensor that runs under ZWay (on my RPi) that I use to trigger a few things (including delaying my sprinklers). It triiger off of the precipIntensity and precipProbability variables. Have you seen the virtual rain sensor plugin for Vera? It's a bit more involved to use, but it's also hardwired to WU...

Offline NikV

  • Full Member
  • ***
  • Posts: 143
  • Karma: +2/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #21 on: November 23, 2016, 03:47:59 am »
Thanks for that

looking at the log file im a little confused
Code: [Select]
2016-11-20 21:41:51.823   openLuup.server:: GET /cmh/skins/default/img/devices/device_states/DarkSky-cloudy.png HTTP/1.1 tcp{client}: 0x10704b8
2016-11-20 21:41:51.825   openLuup.server:: request completed (33363 bytes, 3 chunks, 2 ms) tcp{client}: 0x10704b8
2016-11-20 21:41:51.848   openLuup.server:: receive error: closed tcp{client}: 0x10704b8

at least it gets the file but it doesnt put the icon on the device

Perhaps i would be better if I unistalled and reinstalled it

ok I removed and reinstalled this from the app store but still no luck although it appaers to have installed the icons this time but in /var/log/cmh !!!

Code: [Select]
2016-11-23 08:39:32.246   openLuup.server:: GET /cmh/skins/default/img/devices/device_states/DarkSky-partly-cloudy-day.png HTTP/1.1 tcp{client}: 0x1ecedf8
2016-11-23 08:39:32.247   openLuup.server:: request completed (6859 bytes, 1 chunks, 1 ms) tcp{client}: 0x20175a0
2016-11-23 08:39:32.247   openLuup.server:: request completed (3162 bytes, 1 chunks, 1 ms) tcp{client}: 0x1cf3978
2016-11-23 08:39:32.248   openLuup.server:: request completed (33516 bytes, 3 chunks, 1 ms) tcp{client}: 0x1ecedf8
2016-11-23 08:39:32.762   luup.variable_set:5: 10005.urn:micasaverde-com:serviceId:ZWaveNetwork1.LastPollSuccess was: 1479890139 now: 1479890370 #hooks:0
2016-11-23 08:39:32.763   luup.variable_set:5: 10021.urn:micasaverde-com:serviceId:EnergyMetering1.Log was: 231,231,232,1479890337,538 now: 232,231,232,1479890367,568 #hooks:0
2016-11-23 08:39:33.282   openLuup.server:: request completed (15254 bytes, 1 chunks, 5366 ms) tcp{client}: 0x1b32c78
2016-11-23 08:39:33.398   openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=850181401&Timeout=60&MinimumDelay=1500&_=1479845843847 HTTP/1.1 tcp{client}: 0x1b32c78
2016-11-23 08:39:34.244   openLuup.server:: GET /data_request?id=lu_status2&output_format=json&DataVersion=1&Timeout=60&MinimumDelay=1500&_=1479890370156 HTTP/1.1 tcp{client}: 0x1ecedf8
2016-11-23 08:39:35.887   openLuup.server:: request completed (214850 bytes, 14 chunks, 1643 ms) tcp{client}: 0x1ecedf8
2016-11-23 08:39:36.006   openLuup.server:: GET /cmh/skins/default/img/devices/device_states/DarkSky-partly-cloudy-day.png HTTP/1.1 tcp{client}: 0x1ecedf8
2016-11-23 08:39:36.007   openLuup.server:: request completed (33516 bytes, 3 chunks, 1 ms) tcp{client}: 0x1ecedf8
2016-11-23 08:39:36.021   openLuup.server:: receive error: closed tcp{client}: 0x1ecedf8

this is the excerpt from the log file where I am assuming that it is trying to set the icon but  it is not even setting the default icon - just the generic Z-wave icon - the 2 daughter devices are working ok and it appears to be getting the forecast/weather ok - its jusrt not setting the Icon

Offline logread

  • Full Member
  • ***
  • Posts: 214
  • Karma: +7/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #22 on: November 23, 2016, 05:50:41 am »
@NikV,

Strange... you must have an unusual directory setup for your openLuup install... Please overwrite your D_DarkSkyWeather.json file with the attached patch that will fetch the icons from the GitHub repository over the internet instead of the local ones (at least you should get the icons as long as you have internet connectivity...
Vera Lite UI7, Fibaro FGS-221, FGS-212, FGSS-001, FGK-101, FGWPE/F-101, FGMS-001, Aeon HEM G2, GreenWave PowerNode 6,  Everspring ST-814, SE-812, Swiid SwiidInter.
Raspberry Pi2 Raspbian w/ openLuup. AltUI, SV Thermostat, Virtual Switch, Weather (openWeather), System Monitor (openSysMon), HomeWave.

Offline NikV

  • Full Member
  • ***
  • Posts: 143
  • Karma: +2/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #23 on: November 23, 2016, 07:37:00 am »
Thanks

 - that now works ok

I used a turnkey image (think it was based on jessie lite  by cudanet IIRC) and havent tampered with the directory structure since, just did updates from the plugin.  If I save this json elsewhere and update the plugin will that give me the original so I can have a look to see what was going wrong ?

Code: [Select]
016-11-23 08:39:36.007   openLuup.server:: request completed (33516 bytes, 3 chunks, 1 ms) tcp{client}: 0x1ecedf8
2016-11-23 08:39:36.021   openLuup.server:: receive error: closed tcp{client}: 0x1ecedf8


looked  to me that it was getting the file locally but there was some sort or error which closed the tcp client before setting the icon but im a bit lost trying to find out why :-)


EDIT UPDATE :  all of the images downloaded onto the pi are have a size of 33k and are unreadable !! If I use your links in the json file and download and save to my windows machine they are fine but when I download them straight to the pi they end up unreadable. odd  ???

The only one I cant download is Darksky-darksky ... I get

The image "https://raw.githubusercontent.com/999LV/DarkSkyWeather/master/icons/DarkSky-darksky.png" cannot be displayed because it contains errors

I assume its just the original Darksky.png so I will rename that

UPDATE 2 I have updated the plugin and am now using the original Json file with the readable icon files (copied from my windows m/c) and it is all working fine - Thank you for your help with this its much appreciated  :)
« Last Edit: November 23, 2016, 08:06:00 am by NikV »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +291/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #24 on: November 23, 2016, 08:46:55 am »
I've just done a DarkSky download from the AltAppStore and get this log:

Code: [Select]
2016-11-23 13:27:15.491   luup_log:4: AltAppStore : updating icons in icons/ ...
2016-11-23 13:27:15.491   luup_log:4: AltAppStore : updating device files in ./ ...
2016-11-23 13:27:15.557   luup_log:4: AltAppStore : ... 0 icon files
2016-11-23 13:27:15.557   luup_log:4: AltAppStore : ... 4 device files
2016-11-23 13:27:15.557   luup_log:4: AltAppStore : DarkSky Weather update completed

...which clearly shows that, indeed, no icons are downloaded.

The AltAppStore database has this entry under the DarkSky Repository field:

Code: [Select]
[{"type":"GitHub","pattern":"","source":"999LV/DarkSkyWeather","folders":[""," icons"],"versions":{"1":{"release":"0.2"},"2":{"release":"0.3"}}}]
which looks OK... but isn't.

Turns out that there is a leading space in the icons folders definition: " icons" should be "icons".

I've fixed that and re-installed from the store:

Code: [Select]
2016-11-23 13:45:00.264   luup_log:4: AltAppStore : updating icons in icons/ ...
2016-11-23 13:45:00.264   luup_log:4: AltAppStore : updating device files in ./ ...
2016-11-23 13:45:00.297   luup_log:4: AltAppStore : ... 11 icon files
2016-11-23 13:45:00.297   luup_log:4: AltAppStore : ... 5 device files
2016-11-23 13:45:00.297   luup_log:4: AltAppStore : DarkSky Weather update completed

... success!



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

Offline logread

  • Full Member
  • ***
  • Posts: 214
  • Karma: +7/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #25 on: November 23, 2016, 10:34:49 am »
Many thanks @akbooer... glad you found this out as this was driving me crazy !
Apologies to @NikV and possibly others for the time wasted...

Incidentally I am working on a new version of the plugin that includes an optional virtual rain sensor child device based on DarkSky weather data as per @Mike Yeager's suggestion... now in testing but should be posted soon.
Vera Lite UI7, Fibaro FGS-221, FGS-212, FGSS-001, FGK-101, FGWPE/F-101, FGMS-001, Aeon HEM G2, GreenWave PowerNode 6,  Everspring ST-814, SE-812, Swiid SwiidInter.
Raspberry Pi2 Raspbian w/ openLuup. AltUI, SV Thermostat, Virtual Switch, Weather (openWeather), System Monitor (openSysMon), HomeWave.

Offline NikV

  • Full Member
  • ***
  • Posts: 143
  • Karma: +2/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #26 on: November 23, 2016, 11:09:35 am »

Apologies to @NikV and possibly others for the time wasted...


No need its really great to have folks moving things forward and its kind of fun to try and work out whats happening  :).   

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +291/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #27 on: November 23, 2016, 11:13:36 am »
... glad you found this out as this was driving me crazy !
Apologies to @NikV and possibly others for the time wasted...
... now in testing but should be posted soon.

Well, apologies to you both, since, clearly, the AltAppStore plugin should remove invalid spaces!
3x Vera Lite-UI5/Edge-UI7, 25x Fibaro, 23x TKB, 9x MiniMote, 2x NorthQ Power, 2x Netatmo, 1x Foscam FI9831P, 9x Philips Hue,
Razberry, MySensors Arduino, HomeWave, AltUI, AltHue, DataYours, Grafana, openLuup, ZWay, ZeroBrane Studio.

Offline Mike Yeager

  • Hero Member
  • *****
  • Posts: 603
  • Karma: +11/-12
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #28 on: November 25, 2016, 01:11:00 pm »
Incidentally I am working on a new version of the plugin that includes an optional virtual rain sensor child device based on DarkSky weather data as per @Mike Yeager's suggestion... now in testing but should be posted soon.

Any chance that the Darksky API exposes heatindex? I see that dewpoint is already there, I just need to figure out how to extract it for my needs. I'm sure it won't be difficult but if I have problems, you'll be the first to know...

Offline logread

  • Full Member
  • ***
  • Posts: 214
  • Karma: +7/-1
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #29 on: November 28, 2016, 06:58:43 am »
Version 0.4 is now available from the Alt App Store.
Changelog:
- more DarkSky API exposed as device variables
- updated documentation including all device variables and their service Ids

@Mike Yeager:
I elected for now not to create a "virtual rain sensor" child device (the event triggering by a child device seems a bit awkward. I need to think about it more.), but I exposed the precipitation intensity and probability variables which should make it easy to create scenes triggered by variable watches in AltUI that could act like a virtual rain sensor.
Also, I exposed the "ApparentTemperature" variable that - I think - is similar to the heat index you were looking for...
Vera Lite UI7, Fibaro FGS-221, FGS-212, FGSS-001, FGK-101, FGWPE/F-101, FGMS-001, Aeon HEM G2, GreenWave PowerNode 6,  Everspring ST-814, SE-812, Swiid SwiidInter.
Raspberry Pi2 Raspbian w/ openLuup. AltUI, SV Thermostat, Virtual Switch, Weather (openWeather), System Monitor (openSysMon), HomeWave.