Use Http to obtain device status

Not sure which area to post this in… here goes

Hello all, I was hoping someone could help me with some syntax.

I’m trying to use http commands to get the on/off status of a Vera device. I found a few links but when I run them, I get a variable not found error. I have successfully used http to turn a device on and off, now I just need to find an http command which returns the on (1) or off (0) state of a switch, plug, etc.

Thank you!

http://wiki.micasaverde.com/index.php/Luup_Requests#variableget
http://ip_address:3480/data_request?id=variableget&DeviceNum=6&serviceId=urn:micasaverde-com:serviceId:SwitchPower1&Variable=Status

just add your device number and the ip of your vera

Thanks,

that is what I had found but when I enter my Vera local IP address and device # (I’ve also tried the altID), the http request just returns “error: variable not found”

Post your url.

1 Like

http://10.0.1.10:3480/data_request?id=variableget&DeviceNum=1002&serviceId=urn:micasaverde-com:serviceId:SwitchPower1&Variable=Status

The service ID is incorrect… SwitchPower1 is urn:upnp-org:serviceId:SwitchPower1

So the correct URL should be:

http://10.0.1.10:3480/data_request?id=variableget&DeviceNum=1002&serviceId=urn:upnp-org:serviceId:SwitchPower1&Variable=Status

OMG. Thank you. I was beating my head against the wall!!!

1 Like

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy