This must be something that is easy to answer!
I have my ESP node working nicely in OpenHAB with several sensors - DHT22, SR04 and a couple of simple magnetic contact switches. The ESP properly detects any OPEN or CLOSE event on the switches but I need to be able to read the OPEN/CLOSE status of the switches on initialization. I need to know whether my windows are open or closed without having to first generate an event on each switch!
My OpenHAB items file contains:
Number ESP01_Contact1 "Contact 1 [%d]" (ESP01) {mqtt="<[localbroker:/ESP01/Contact1/status:state:default]"}
My Settings are..
Name: Contact1
1st GPIO: GPIO-5
Pull UP: Yes
Inversed: No
Switch Type: Switch
Switch Button Type: Normal
Send Data: Yes
Value Name1 : status
The above settings detect changes in the contact status - how can I poll the ESP for a status update?
Thanks for your help.
N
Switch Input - Help Please
Moderators: grovkillen, Stuntteam, TD-er
Who is online
Users browsing this forum: Google [Bot] and 39 guests