Problem:
ST_Anything Contact sensors - report open/closed when they are not opening and closing.
The sensor works when I physically open and close the door. (100% of the time)
Unfortunately - it also mis-reports sometimes and I don’t know why? (example middle of the night)
The magnet is a neodymium and is perfectly aligned with the contact sensor. The gap is very close 1/8 of an inch.
The door does not wiggle in the jam. If I shake or wiggle the door - I am not able to get the sensor to show ‘open’ or generate an event.
At first I thought maybe the unit was rebooting and sending alerts?
However, If I cycle power to the NodeMCU and it powers up and reboots - it does not send any door alerts.
Environment: (No batteries)
NodeMCU-12E - powered with a USB-cable to a 110 outlet.
Using GPI-PINS: 2 & 6
The physical hardware that connects to the NodeMCU-12E is a contact/magnet sensor.
It’s a round white piece of plastic with 2 wire whips / and their is a magnet attached to the door frame
One sensor is on the garage service door, the other sensor is on the Garage overhead door.
ST_Anything Example script with the following lines uncommented:
#define PIN_CONTACT_1 D6 //SmartThings Capabilty “Contact Sensor”
#define PIN_CONTACT_2 D2 //SmartThings Capabilty “Contact Sensor”
static st::IS_Contact sensor3(F(“contact1”), PIN_CONTACT_1, LOW, true);
static st::IS_Contact sensor7(F(“contact2”), PIN_CONTACT_2, LOW, true);