Script help please.

Hi all,
Ive been trying to get vera to notify me if I forget to set my away scene when Im at work. I would like to check the status of a switch, and if its off send me a prowl notification. If its on do nothing. Ive tried two different scripts and several variations of each with the help from the members in this thread http://forum.micasaverde.com/index.php/topic,4508.0.html. Still cant get it to work.

My frist script will send me a notification no matter what state the switch is in

local home_away = luup.variable_get(“urn:schemas-upnp-org:device:BinaryLight:1”, “Status”, 5)
if (home_away == ‘1’) then
return false
else
luup.inet.wget(“http://www.prowlapp.com/publicapi/add?apikey=12345678901234567890&application=Vera&event=Scene&description=Home+still+set&priority=1”)
end

The other one never sends a notification

local home_away = luup.variable_get(“urn:schemas-upnp-org:device:BinaryLight:1”, “Status”, 5)
if (home_away == ‘0’) then
luup.inet.wget(“http://www.prowlapp.com/publicapi/add?apikey=12345678901234567890&application=Vera&event=Scene&description=Home+still+set&priority=1”)
end

For both i created a new scene and added the code in the LuuP tab. I then set a schedule.

Its starting to drive me nuts! Any help would be greatly appreciated.

As @futzle pointed out for your other posting, the first argument of variable_get is a ServiceId string and not a deviceType

Check the strings she posted, they are correct.

Ok,
That makes sense. Im looking at a device type and not a variable for that device. I was assuming that part pointed to the device i was checking. As normal, an assumption was wrong. Think I get it now.

Thanks for the help! :smiley:

If you ever want to know the serviceId string for any given variable, go into the Advanced tab of that device, and hover the mouse over the Label. The bubble help that displays is the name of the serviceId to use.

@guessed, that seems to only work with pre-UI5. Any recommendations for UI5. Mike

Im running UI5 and the hover worked for me. My problem is my script had a case of notunderstandingwhatinfoIneed syndrome. Thanks to the people on this forum I found a possible cure.

I have found that UI5 works better in safari or firefox than in IE. HAve you tried a different browser?