I’ve wanted to make this forever. I have contact sensors I want to act like motions… (they all should be by default IMO). If a door options, that’s motion!
Thanks for this!
1 Like
bamarayne
(Jason "The Enabler" as deemed so by @Smart)
3
so you’re saying that setting this up will allow an opening door (contact sensor) to be seen as a motion action?
It accepts actuator inputs as these are commands. A device type can’t subscribe to other device events.
So this is more of a glue device to be used between two apps that don’t share a common device type.
1 Like
bamarayne
(Jason "The Enabler" as deemed so by @Smart)
6
You could take the code and add it to a real device handler.
I can do this if there is interest with specific device types.
Converting an existing device type would be much easier that creating this one.
Just let me know which devices your interested in.
Take shm, the security section only accepts contact and motion sensors.
You could use another app to turn on this dth, and send a contact or motion event to shm.
You could use smart lighting to turn on this dth, then sent another type of event to any other app.
That type of thing.
It’s a virtual sensor who’s output is controlled by typical binary actuator commands.
Mike, can you add to every action if it’s already on, don’t turn it on, or if it’s off don’t turn it off? Or do you think I should do that via a custom app? I’d like to use Smart Lighting, but I notice that for motion, for example it fires the switch on constantly.
This is awesome! I see many uses for this… Thank you!
May I make a feature request for all those who connected their hard wired smoke alarms to open/close sensors and can’t use them in SHM? Capability for command “Smoke Detector”, attribute “alarmState”. (Hope I got this right and it is not more complicated than this…)
Thanks Mike, couple more things. First would you be able to add versioning. Ive updated the device, but it still fires with every motion event see pic. Also, would it be possible to turn off the capabilities that are not used/enabled? I set one for garage control and it shows in the ‘Family’ section. This is esthetic more than functionality, really so no big deal if not possible.
alarm could be an input since it has commands (strobe, siren etc)
however contact only has attributes (open, close)
a device can read the attributes of another device (probably not intended), but it can’t subscribe to any device attribute changes like a smart app.
Now having said that, this DTH could in fact do this, but would require something to poll it, when the device is polled, it would then have a look at the contact sensor state, and then set the alarm attribute.
This isn’t ideal obviously, and the ability of one device to retrieve attributes from another device that’s been selected in the preferences section I believe is something of an unintended “feature”, that I’m guessing ST will prevent in the future.
The device capabilities that the device presents can’t be modified programmatically.
I can ignore any commands, but there’s no way to change them after the device is published.
The only way to remove them is to comment them out.
Can you tell me what you’ve got configured there?
is that a switch to motion converter?
I have the specific setup that you do, I hacked the contact DTH specifically to make it act like a smoke/CO device.
Depending on the contact that you have, these DTH’s may work for you too.
Let me know which DTH your contact sensors are currently using.
I use an old Schlage Sensor RS100HC V N N SL and a slightly modified a “z wave Door/Window Sensor” DTH. It has contact sensor, sensor, and battery capabilities (even though the Schlage sensor does not support battery)