marthoc / GarHAge

a Home-Automation-friendly ESP8266-based MQTT Garage Door Controller
MIT License
170 stars 42 forks source link

Continual Status MQTT Commands #26

Closed benmprojects closed 5 years ago

benmprojects commented 5 years ago

Hi,

I have just hooked up my reed switch and it is reporting the state correctly but I receive continual garage/door/1/status reports every 2 seconds. Looking at the code this should not happen as the CurrentState is the same as PreviousState.

Any ideas?

Thanks Ben

marthoc commented 5 years ago

Can you try the dev branch? There have been some updates which may address. Otherwise you may need to add a pull-up resistor on the input pin to hold it high, it sounds like it could be floating. Not all esp8266 hardware packages are made equal unfortunately and it could be that the pull-ups in whatever version you have just aren’t doing it.

benmprojects commented 5 years ago

Hi Mark, pull up resistor worked. Thanks for your reply.