I don’t think I know what mqtt is, but I think i’m following you now. The modifications I was making was too automatically have the device handler show open/closed with the status of another contact. For debugging I think i did add some manual switches to open and close it.
I added the following to the definition:
capability "Switch"
Threw in some nice little tiles:
standardTile("open", "device.door", inactiveLabel: false, decoration: "flat") { state "default", label:'open', action:"door control.open", icon:"st.doors.garage.garage-opening"}
standardTile("close", "device.door", inactiveLabel: false, decoration: "flat") { state "default", label:'close', action:"door control.close", icon:"st.doors.garage.garage-closing" }
Then I sent the contact event based on that action:
def open() {
sendEvent(name: "contact", value: "open")
}
This is my best estimate looking at the device. I removed and commented a lot out after I finished debugging so I couldn’t accidentally open or close the simulated device.