We have moved at community.getvera.com

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

Offline Mike Yeager

  • Hero Member
  • *****
  • Posts: 603
  • Karma: +11/-12
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #30 on: November 28, 2016, 10:24:03 am »
Sweet! I figured the rain sensor thing might hold you up a bit. Depending on how involved you want to get into it, it could be an undertaking. I believe the original one I'm using in Z-Way just uses the probability of rain as a threshold. The one for Vera uses a far more intricate method that I haven't cared to figure out. Thanks again for this plugin!!!

Now I have to figure out this blockly editor to make things function....
« Last Edit: November 28, 2016, 12:33:59 pm by Mike Yeager »

Offline Mike Yeager

  • Hero Member
  • *****
  • Posts: 603
  • Karma: +11/-12
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #31 on: November 28, 2016, 05:20:58 pm »
Okay, I created a dummy device in AltUI for heatindex. The code below :

new = (luup.variable_get("urn:upnp-micasaverde-com:serviceId:Weather1", "ApparentTemperature", 136))
luup.variable_set("urn:upnp-micasaverde-com:serviceId:TemperatureSensor1", "CurrentTemperature", new , 140)

Creates and updates the variable of the dummy device but it doesn't display. Still displays NaN... Any Suggestions? I need several of these variables exposed so that I can export them via HTTP call to another process and I don't think it's fair to subject everyone else to a butt load of variables pulled out into their own elements...

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #32 on: November 28, 2016, 05:31:17 pm »
Don't know where it's gone... but when it was there, was it a Temperature device?  The UI will only display, by default, the relevant device variable on its front panel.
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 #33 on: November 28, 2016, 06:00:42 pm »
It was a temperature device. I recreated it and have it working but I can't figure out why it disappeared. When I recreated it, it used the next device number so it's either still there and I can't see it, or it's gone completely. Now I'm working on a humidity type device to expose the PrecipProbability variable... It seems to play a little different...

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #34 on: November 28, 2016, 06:21:45 pm »
Easiest to check the More > Devices page and sort by device number to see if it's still there.

Possibly in an unexpected room...?
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 #35 on: November 28, 2016, 08:02:26 pm »
Nope! Poof and it's gone. Oh well, I got the rest working. Are there any pre-made elements for wind direction (possibly in degrees), speed (mph), and rain (inches)?

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #36 on: November 29, 2016, 02:45:06 am »
I don't think that there are any standard UPnP-defined ones; weather plugins seem to make their own.  That's what I did for the Netatmo plugin.

There is a GenericSensor device that you can use, although last time I looked it had been incorrectly modified from a light sensor (wrong variable name.)  Nevertheless, you could try that.
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 #37 on: November 29, 2016, 01:49:49 pm »
I guess I'll be experimenting with modifying device type files then. Not important at the moment...

My next project will be getting OpenLuup running again and to see if I can get it stable and able to survive a reboot on the RPi. The RPi (Razberry) setup I was incorporating at one time has been completely done away with as of this plug in. I migrated the last of what it was doing last night.

How does one offload the Vera into OpenLuup and use it for just the radios? Since this seems like the eventual goal, leaving the Vera to do as little as possible. Right now I'm running AltUI on the vera, so the Vera is still carrying the full load....

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #38 on: November 29, 2016, 02:36:10 pm »
Well, what plugins are you running?  Should be possible to migrate at least some.
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 #39 on: November 29, 2016, 02:49:35 pm »
Well, I'm starting to play with the rules engine, that's going to take a little getting used to. As for actual plug ins, I'm running virtual switch, multiswitch, EcoBee, Ping Sensor, AutoVera, and PLEG. There are a few others but they're not essential. I have Heliotrope installed but as of yet, I'm not really using it. There are people on here that have migrated the devices out to OpenLuup as well. That was the bigger question. I'm not there yet though...

Offline Mike Yeager

  • Hero Member
  • *****
  • Posts: 603
  • Karma: +11/-12
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #40 on: December 23, 2016, 04:50:03 pm »
By the way, the DarkSky plugin is working great! So happy to have this native to the HA environment and not having to pull it in from elsewhere....

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #41 on: February 15, 2017, 07:49:09 am »
Version 0.4 is now available from the Alt App Store.
Changelog:
- more DarkSky API exposed as device variables

Any reason why the parent device doesn't have a CurrentHumidity variable?
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 #42 on: February 15, 2017, 10:08:20 am »
It's there, it just reads as CurrentLevel. I don't know why it's that way but I assume it's because the child device reads the CurrentLevel variable. It was probably made to conform to MCV's variable lists....

Just a guess... :)

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #43 on: February 15, 2017, 10:22:26 am »
Ah, I see it now.  But that's very inconsistent, given that these:

Code: [Select]
CurrentCloudCover
CurrentConditions
CurrentDewPoint
CurrentPressure

...are all there under the Weather1 serviceId.

I do understand that there is a formally-defined UPnP Temperature service, but the Humidity one is MCV home-grown.  Seems like it might be more complete to add CurrentTemperature and CurrentHumidity also under the Weather1 service. 

Just a thought, but I'm glad it's there somewhere.  Thanks for pointing that out.
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 #44 on: February 15, 2017, 10:28:57 am »
It was probably made to conform to MCV's variable lists....

Just a guess... :)
Excellent guess... I indeed followed MCV's ServiceId and variable name from http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#HumiditySensor1

The other non-MCV variables are all arbitrarily using the Weather1 service id in an effort I made to make this plugin consistent with the original Weather Underground plugin

Happy to consider any better alternative if it makes more sense
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.