We have moved at community.getvera.com

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

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #60 on: October 03, 2018, 06:49:28 am »
The thing is that I'm currently using OpenWeather plugin and it is working fine but I heard that its days are numbered.
Now as OpenWeather and DarkSky plugin are quite similar i'm sure that it can work but unfortunately my coding skills do not seem to be enough.

I'm sure I can use the variables for my purpose by just checking from the DarkSky documentation what their names are but it would be nice to be able to see the variables in the UI.
- Tomas

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #61 on: October 03, 2018, 08:32:09 am »
Yes Dark Sky / Vera issue, sorry did I post in wrong place?

Well, yes, really.  I think I can move these posts to the Weather Plugin subforum if you'd like me to do 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 korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #62 on: October 04, 2018, 03:14:59 am »
It does not matter so much to me where my posts are as long as the right person takes note of them and find it in their interest to lend me a helping hand.

I think logread would be the best person to look in to my request since I think he it the author of both openWeather and DarkSky plugins and openWeather shows the advanced variables page just fine. Anyhow I bet anyone with a little bit more programing skills than me could figure it out. I will also try again myself and let you know if I manage to manipulate the plugin to start showing the advanced variables (if you akbooer have any hints please let me know).
- Tomas

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #63 on: October 04, 2018, 06:37:08 am »
I took another look at this and I found that I had one "," missing between the declaration of the menu tabs from my modified .json file. Now it is working :D

- Tomas

Offline chris66

  • Sr. Member
  • ****
  • Posts: 318
  • Karma: +9/-8
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #64 on: October 30, 2018, 03:33:12 am »
I took another look at this and I found that I had one "," missing between the declaration of the menu tabs from my modified .json file. Now it is working :D
Hi Tomas, so you use it without AltUI, right? What files with the .json do you have uploaded? Thanks, Chris

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #65 on: October 30, 2018, 08:39:41 am »
I took another look at this and I found that I had one "," missing between the declaration of the menu tabs from my modified .json file. Now it is working :D
Hi Tomas, so you use it without AltUI, right? What files with the .json do you have uploaded? Thanks, Chris

Hi, Yes, I use Dark Sky Weather Plugin without AltUI. You can find the other files from here -> https://github.com/999LV/DarkSkyWeather

Upload the the files:
D_DarkSkyWeather.json
D_DarkSkyWeather.xml
I_DarkSkyWeather.xml
L_DarkSkyWeather.lua

Then manually create a device from vera UI under Apps -> Develop apps -> Create device

Upnp Device Filename* = D_DarkSkyWeather.xml

Then check the DarkSky documentation for configuring the mandatory variables.
Not sure if the variables will show up automatically or if you need to add them. Let me know if you need help creating the mandatory variables.

There are also some icon files @ github but I have no idea where to put them and if they can even be used in the Vera UI.
« Last Edit: October 30, 2018, 08:43:46 am by korttoma »
- Tomas

Offline chris66

  • Sr. Member
  • ****
  • Posts: 318
  • Karma: +9/-8
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #66 on: October 30, 2018, 09:59:41 am »
Thanks for the answer Tomas, will try this.

Offline chris66

  • Sr. Member
  • ****
  • Posts: 318
  • Karma: +9/-8
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #67 on: November 02, 2018, 11:23:56 am »
Ok, uploaded the files and created new device. I can see the device with usual Tabs, but no Variables available. After refreshing the browser I just have the Control Tab available, but no fieds available. Tried to reboot. So I'm not  able to type the Key (Old key Forecast.IO, but still valid) and Location.
As I'm not in OpenLuup environment, I do not have Lua libraries ?ssl.https? and ?dkjson? installed.

So maybe just help me to create the mandatory variables, thanks!

EDIT: Now appears following devices DarkSky Humidity and DarkSky Temperature. Added manually in L_DarkSkyWeather.lua my key and lat long but still missing values, because I have to create mandatory variables, if you can help me, thanks, Chris
« Last Edit: November 03, 2018, 03:55:30 am by chris66 »

Offline korttoma

  • Hero Member
  • *****
  • Posts: 729
  • Karma: +26/-5
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #68 on: November 07, 2018, 07:28:33 am »
sorry for the late reply.

You need to use the D_DarkSkyWeather.json from my earlier post to be able to see the Advanced page -> http://forum.micasaverde.com/index.php/topic,40406.msg420817.html#msg420817

From the top of the advanced page you should be able to see the device id (in my case it is device #548)

Then run the following commands from Apps -> Develop apps -> Test Luup code

First (replace the xxx with your API key and 548 with your device id!):

local KEY1 = "xxxxxxxxxxxxxxx"

luup.variable_set("urn:upnp-micasaverde-com:serviceId:Weather1", "Key",KEY1,548)


Then this (again replace 33.1 with you latitude and device id):

local VAR1 = 33.1

luup.variable_set("urn:upnp-micasaverde-com:serviceId:Weather1", "Latitude",VAR1,548)


Then this (again replace 51.6 with you longitude and device id):

local VAR2 = 51.6

luup.variable_set("urn:upnp-micasaverde-com:serviceId:Weather1", "Longitude",VAR2,548)


Then this (again remember device id):

luup.variable_set("urn:upnp-micasaverde-com:serviceId:Weather1", "Period",1800,548)


And finally (again remember device id and change also sv (sv=swedish) to your prefered language, see DarkSkyWeather.pdf for options):

luup.variable_set("urn:upnp-micasaverde-com:serviceId:Weather1", "Language","sv",548)


Restart luup engine if it did not restart automatically...
« Last Edit: November 07, 2018, 07:38:11 am by korttoma »
- Tomas

Offline chris66

  • Sr. Member
  • ****
  • Posts: 318
  • Karma: +9/-8
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #69 on: November 12, 2018, 04:30:31 am »
Thanks for your very accurate indications, succeed. Now I can see on the main device the weather (Clear) and Pressure. On 2 child devices I get Humidity and Temperature. Do you know if I can get another child for Wind? Or I can easily query the WindSpeed value in Variables to get some scenes interaction, great job, thanks!
« Last Edit: November 12, 2018, 05:16:21 am by chris66 »

Offline Seth22

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #70 on: December 22, 2018, 01:03:38 pm »
I have the plugin installed on my Vera and I have 2 child devices for temp and humidity.  I am trying to get a third child device installed to show the weather conditions (clear, rain etc).  I have searched for a while and I cannot figure out how to do this.  Can you point me in a direction? 

To clarify a bit.  I am trying to come up with an alternative to the Weather Underground plugin.  With that plugin I can build conditions around if the weather is clear rainy etc.  When I try to create these conditions now the only devices exposed to vera are the 2 child devices.  The master plugin which shows the wx status is not available.  So i think i need a child device to also be able to use the wxstatus as a condition?
« Last Edit: December 22, 2018, 01:35:01 pm by Seth22 »

Offline akbooer

  • Moderator
  • Master Member
  • *****
  • Posts: 6387
  • Karma: +290/-70
  • "Less is more"
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #71 on: December 22, 2018, 01:46:03 pm »
Hmmm...  not an expert, but not sure the app does that itself.

However, you can certainly create a dummy device with a repeating scene to transfer the variable needed to the dummy device.  Why, in fact, do you need this as a separate device?
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 Seth22

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #72 on: December 22, 2018, 02:41:38 pm »
I have zwave shades in my sunroom.  When the wx is clear I have a schedule where certain shades open and close at certain times. (to prevent the temp from getting too high) but if the wx is cloudy then I don't want any shades to close.

I am doing this now with the vera wx underground plugin. I have a master device and children.  When I create a condition, the master device shows up and I can select weather status, clear, cloudy etc. This works great.

With darksky I have the parent device with 2 children. The problem is that the parent device does not show in my conditions, only the 2 child devices (temp and humidity)
The parent devices wx status and icons show perfectly in Vera's device view but they are invisible in Vera's scene creation or my PLEG conditions.

Basically I am looking for a way to write conditions based on the parent devices variables.  Wx underground works great for this and I cannot replicate this functionality with darksky even though I can see what I want in the ui.

My thought was to create another child device that shows the conditions (clear rain etc). But I cannot figure out how to do this.

Any help would be greatly appreciated. I'm not opposed to other methods to accomplish this, I just want the data for my conditions somehow
« Last Edit: December 22, 2018, 02:43:35 pm by Seth22 »

Offline rigpapa

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1121
  • Karma: +187/-3
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #73 on: December 22, 2018, 02:45:51 pm »
Reactor will show and access all variables in the parent and child devices and let you use them in conditions.
Author of Reactor, DelayLight, SiteSensor, Rachio, Deus Ex Machina II, Intesis WMP Gateway, Auto Virtual Thermostat and VirtualSensor plugins. Vera Plus w/100+ Z-wave devices. Vera3, Lite. Hassio, Slapdash.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: openLuup: Dark Sky (formerly Forecast.io) weather plugin
« Reply #74 on: December 31, 2018, 05:40:03 am »
Hi Logread,

I found three more value useful that the DarkSky API returns : WindGust, uvIndex, Visibility

So i added this to the VariablesMap in my copy of the plugin:
Code: [Select]
  currently_uvIndex = {serviceId = SID_Weather, variable = "uvIndex"},
  currently_visibility = {serviceId = SID_Weather, variable = "Visibility"},
  currently_windGust = {serviceId = SID_Weather, variable = "WindGust"},

Would you consider adding these to a next release?

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.