Adding Sensor to DTH

I was playing around with the simulated Garage Door Opener DTH. This basically does an open, waits 6 seconds then signals open. And same with closed.

What I was wondering is, is it possible to add sensors to this to tell it when it is open or closed? I was trying to modify the code to have input preference, but that didn’t seem to work.

What I am doing is controlling my garage door with a smart outlet and a relay. That seems to work fine, just wanted to try and make it more intuitive.

Hope all that made sense.

There is an app for that :slight_smile:

1 Like

Tried that app and it wasn’t quite what I wanted.

But I got to studying a little bit and figured out how to modify the ST simulated Garage Door DTH to do what I wanted. By adding a variable in the DTH I can control it better.
Calling OPEN the first time sets it to opening.
Calling OPEN a second time sets it to open.
And ditto for calling CLOSE.
If you call OPEN then CLOSE it will force it back to Closed. And opposite for OPEN.
That way it only shows open if it is actually open and vice versa.

So by using WebCore I can control the door more intuitively. Don’t have all the logic finished yet, but getting there.

1 Like