Weather Plugin

Hello,
I have installed the Google Weather plugin. This is working fine, can see all the items on the dashboard and can create an event when temperatur drops below a certain degree for example.
However, following code is not working :

local lul_cond=luup.variable_get(“urn:demo-micasaverde-com:device:weather:1”,“Condition”,6)
luup.log(lul_cond)
if( lul_cond == “Icy” ) then
**** do something ***
end

In the log I can see that lul_cond has value ‘null’.

Has anybody some experience in checking the ‘Condition’ and possibly know what I am doing wrong?

Thanks in advance!
Pascal

http://wiki.micasaverde.com/index.php/Luup_Variables#Other_Devices_or_Services

I’ve tweaked both the Weather Plugin Wiki page (on code.mios.com) as well as the Luup_Variables wiki page in the Main Wiki, to better link these together.

Folks should feel free to use the main Forums post for general questions:
http://forum.micasaverde.com/index.php?topic=1435.0

as well as updating the Luup_Variables wiki page with other examples:
http://wiki.micasaverde.com/index.php/Luup_Variables#Weather_Plugin

Unfortunately that is also giving me null value :frowning:

Code=local lul_cond = luup.variable_get(“urn:micasaverde-com:serviceId:Weather1”,“Condition”,6)

luup.log(lul_cond)
if( lul_cond == “Overcast” ) then
luup.inet.wget(“https://prowl.weks.net/publicapi/add?apikey=5319669f7f09708334d2547802a2ef4faba55e56&application=Vera&event=Sneeuw&description=Mostly Cloudy”)
end <0x2c0c>
50 12/01/10 22:44:44.713 luup_log:6: (null) <0x2c0c>

The correct service is:
urn:upnp-micasaverde-com:serviceId:Weather1

That works!
Snowing in Belgium, now my lights outside pop on when it Snows or there is Fog.
Superb!

In UI4, I corrected part of the code, so it’s serviceId is now:

[tt] urn:upnp-micasaverde-com:serviceId:Weather1[/tt]

in other words, it has an extra “[tt]upnp-[/tt]” bit on the front. I believe I previously had 1/2 the code using it and 1/2 not, so the change was to align to a single serviceId, lest they every actually validate it :wink:

Where did you get the Google Weather Plugin? I’m new to Luup and want to play with this to learn the ropes.

Repository Hosting :smiley: