[quote=“rlmalisz, post:2, topic:168493”][quote=“rlmalisz, post:1, topic:168493”]I’m sure this isn’t that hard, but it doesn’t seem like others are doing it, and being cautious, thought I’d ask if there’s a sample of this sort of thing about–my searches haven’t hit any, but my searches may be ham-handed.
Now that I’ve got the doorbell sensor working, and have a scene set up to send us Prowl alerts when the button gets pressed IFF the HRSD1 in that circuit is armed, I’d like to be able to arm/disarm the sensor through SQC. I don’t see a way to do that, save through a scene control…in this case, two, no doubt.
–Richard[/quote]
Actually, on thinking about this some more, a better approach is probably to muddle up a virtual binary switch of sorts that gets its current state by querying the armed state from the HRSD1, and upon toggle, sends the appropriate command to the HRSD1. This should be doable, right? And if done correctly, wouldn’t take much modification to adapt for locks? I guess the “device” could even have a variable that can be set to the correct URN and serviceId for the armed/disarmed device and its attributes, making it a generic arm/disasm binary switch. Would be lovely to be able to create those as required, and then suck them into SQC.
–Richard[/quote]
So are there known issues with trying to send a command to a battery-powered device, such as an HRSD1? I have cabbaged together a D and I file for setting (and displaying) the armed status of one of these things via a Binary_Switch. When I press either the “on” or “off” buttons, I get the beloved “delivery failed” error dialog. If I paste the set command into the LUA test window:
luup.call_action("urn:upnp-org:serviceId:SecuritySensor1","SetArmed",{ newArmedValue="1" },26)
And hit “go”, it displays that it all went fine. I am starting to think this window is a placebo.
For these devices, do I need to implement some sort of retry loop? FWIW, I am observing that when I hit the “arm” button for the sensor in UI4, it’s sometimes several minutes before the value of the “armed” variable changes, and UI shows the “armed” button as highlighted.
–Richard