marthoc / GarHAge

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

Mqtt issue or code? #23

Open codedmind opened 5 years ago

codedmind commented 5 years ago

After some days working well now i'm getting issues when the garage doors is closed the homeassistant is getting wrong status inside a minute it open and close again, the garage door is always close...

If open everything is ok.

Any suggestion for debug?

marthoc commented 5 years ago

Possible that your esp8266 device is dropping off the wifi network?

sam-wright commented 5 years ago

Mine does the opposite of this (if open, it alternates between open and close every minute or so). This is because I didn't install a pull-down resistor, so when the door is open, the pin is left floating. Depending on your circuit, you may have left out a pull-up or a pull-down resistor.

codedmind commented 5 years ago

When I test the first time with version 1 don't have issue only see that after upload the vldev version.

But in none of the cases I use a pull up resistor :/

On Mon, Sep 3, 2018, 06:01 sam-wright notifications@github.com wrote:

Mine does the opposite of this (if open, it alternates between open and close every minute or so). This is because I didn't install a pull-down resistor, so then the door is open, that pin is left floating. Depending on your circuit, you may have left out a pull-up or a pull-down resistor.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/marthoc/GarHAge/issues/23#issuecomment-418000636, or mute the thread https://github.com/notifications/unsubscribe-auth/ACxnX7Zsc_ubTYWrLstgO9eG78R3e8NAks5uXLeUgaJpZM4WWTZa .

marthoc commented 5 years ago

@sam-wright The pin shouldn’t be floating as I’m enabling the INPUT_PULLUP mode for the door status input pins. So when the door is closed, the pin is pulled low, but when open, the internal pull-up resistor should be pulling it high. Possible though that the resistor is too weak depending on your own environment. @codedmind you can try using a pull-up resistor and see if it solves your problem.

codedmind commented 5 years ago

Any sechematics to use the pull-up? Thanks

On Tue, Sep 4, 2018, 00:35 Mark Coombes notifications@github.com wrote:

@sam-wright https://github.com/sam-wright The pin shouldn’t be floating as I’m enabling the INPUT_PULLUP mode for the door status input pins. So when the door is closed, the pin is pulled low, but when open, the internal pull-up resistor should be pulling it high. Possible though that the resistor is too weak depending on your own environment. @codedmind https://github.com/codedmind you can try using a pull-up resistor and see if it solves your problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/marthoc/GarHAge/issues/23#issuecomment-418205489, or mute the thread https://github.com/notifications/unsubscribe-auth/ACxnX1KdbPEyY3uwxo7m-TDkwgdDsORuks5uXbzSgaJpZM4WWTZa .

codedmind commented 5 years ago

Ok @marthoc i made the connections (no resistor) an try the both versions (master and dev) in the master the serial connections show normal output, change status and keep, but the dev is always connection and publish to mqtt don't now why... same connections , same hardware

. WiFi connected - IP address: 192.168.1.80 Ready for OTA Upload... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 open! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action... Garage Door 3 closed! Publishing to garage/door/3/status... Attempting MQTT connection...Connected! Subscribing to GarHAge/api... Publishing birth message "online" to GarHAge/availability... Subscribing to garage/door/3/action...