Weather data of Vera box into a variable?

Hi,
To regulate the opening’s percentage of my roller shutters, I used a weather plugin which has now disappeared.
I was testing sunshine and cloud cover in a script Lua.
Today I’m trying to do it with a FGMS-001 that gives the lux brightness, but it’s not easy.
I noticed that on the Vera page at the top right, the date, time, temperature and weather are displayed.
Would it be possible to recover the weather information of Vera in a variable for a Lua script ?
Thx

That would be great!
I also used the weather plugin to determine if I should let the sun in in case of cold weather or block it outside when too hot to prevent house overheat.

there’s a plugin for that: MiOS Apps
not sure if it’ll display also the condition, but it’s a simple call to a remote url, just in case you want to fiddle with it.

It works with MIOS Weather which has disappeared :frowning:
I used it before.

I have a OpenWeatherMap plugin written by myself. I basically just cooke a couple of HTTP requests starting with the docs here: Weather API - OpenWeatherMap

I moved most of my not-strictly-HA logic to my Linux box with a custom app written using .NET Core + C#, so I doubt that sharing here will make any difference.

it’s free and it’s working good for me. Current condition are very easy to fetch: Current weather data - OpenWeatherMap
https://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22 (fake date, just an example, with the free Key you’ll get real data)

There’s also a SiteSensor recipe for fetching and storing OpenWeatherMap data, here (scroll down to the recipes section).

1 Like

Hi,

I installed SiteSensor and I use OpenWeatherMap.
It’s very well explained on both sites.
I can now retrieve any weather information like the percentage of cloud.
It’s very cool. Thanks for that.

But how to retrieve the contents of one of the values (1 to 8) in a Lua script ?
Before I do something like this :
local lul_condition = luup.variable_get(“urn:upnp-micasaverde-com:serviceId:Weather1”,“ConditionGroup”, <number_device>)

Could help me please ?

Thx

It would be: local val = luup.variable_get( "urn:toggledbits-com:serviceId:SiteSensor1", "ValueX", ssdevnum)

Where X is the expression number (1-8 by default, e.g. Value1, Value2, etc.; more possible if you need them), and ssdevnum is the device number of your SiteSensor instance.

It’s fine. Thx very much.

1 Like

I installed DarkSky Weather, works fine.

After reading the Terms for using the Dark Sky API I’ll pass:
“(The Dark Sky API not intended to be used directly by end-users)”

Well you got 1000 calls free per day and it works right out of the box.
It’ll do for me (at least for now) :wink:
And I think it’s $0.001 per call after that.

And 1000 calls per days is more than adequate to get decent outdoor temperature and sky condition for my thermostat and exterior lights logic.

Yes indeed.
I’ve set a 5 min refresh, so that’s pretty acurate and it’s still less than 300 call per day.
I use it to close a roof when it’s raining and open it when it’s snowing (because of the snow accumulation weight)