I have a garage door sensor that will call a webhook whenever the door is either opened or closed. (I have complete control over the format of the webhook, the HTTP headers, and the data that is included in the call).
I’m trying to create a “Garage Door” Device Handler that uses the “Contact Sensor” capability to keep track of whether the door is currently opened or closed. I’ve included a parse() method, but beyond that I’m not sure how to subscribe my Device Handler to a certain URL/topic that I can then call from my garage door sensor to activate the parse() method.
I tried including an “installed()” and “initialized()” method in my Device Handler so that I could call the SUBSCRIBE HubAction, however, those functions don’t appear to get called.
Is it possible to do this without creating a SmartApp, or do I need to combine a Device Handler + SmartApp to keep track of the door open/closed position? If you know of any source code for other projects that utilize webhook updates from LAN devices, please let me know.