Closed mbaran5 closed 6 years ago
Closing: This was solved in another issue.
@mbaran5 please mention which specific issue or just link to it. Still seems to be an issue IMO.
@mbaran5 no need to comment. Turns out the contact capability of SmartThings is read-only. The only workaround was to have a hidden switch on the same device that syncs with the contact sensor capability.
Sorry for the delay. You're correct in that contact is read only, and I worked around it the same way. I used this UVDT to set on/off which synced with the state of open/close
https://community.smartthings.com/t/release-universal-virtual-device-type-and-translator/47836/95
I only used the switch functionality of it and disabled the rest.
@mbaran5 thanks for sharing, very nice to see an all-encompassing DTH --- wish I tried it before coding my own :)
I am running into a wall with a project I am working on. I am trying to use this project to set the state of a virtual contact sensor.
Is the command ‘contact’ read-only?
I have a real contact sensor, it reports as:
When i try to issue either command to a virtual contact sensor, it never changes. The smartthings sample one has a open/closed press action, but trying to set it via MQTT never changes the state. Is there something I am missing, or does ST not allow this?
my ST log looks like this:
Received device event from bridge: [name:Office Window, value:close, command:true, type:contact]
The command I am sending via MQTT looks like
smartthings/Office Window/contact open
Essentially I have combined rtl_433 with MQTT and a python script to re-use about 15 SimpliSafe 433mhz sensors. Everything is working except for the state of the contact changing.
What I have tested is using a Simluated Switch which does work, I can use MQTT messages to change the switch to on or off so I know everything up and into SmartThings is working. I am not sure where to proceed… It may just be impossible to change a contact sensor's state. Any thoughts?