Kaldek / rat-ratgdo

Open source schematics for ratgdo PCB
MIT License
302 stars 46 forks source link

Wall panel occasionally loses its time setting #60

Closed kaechele closed 6 months ago

kaechele commented 7 months ago

I am currently running a board conforming to this schematic: ratgdo open source D1 Mini_KiCad.png @ commit `8bc761bee5adbe136ca000d01d58e69b7b4ec53c`

Since attaching the board, occasionally, my wall panel will lose its time setting (i.e. the clock will have reset to 12:00 and is blinking on the display).

I have not been able to figure out when exactly it happens and what is happening on the bus at this time, but generally my garage door is not used a lot, maybe once a day if at all. I see a reset about once every 3-4 days. Also, we generally control the door using wireless remotes or the wall panel.

My guess it that this is likely due to the parasitic load on the bus introduced by the rat-ratgdo and the wall panel rebooting as a result. I remember seeing it mentioned in other issues (such as https://github.com/Kaldek/rat-ratgdo/issues/44#issuecomment-1826256679).

Opening this issue to track if this is happening to others as well or whether it's specific to my setup.

My setup:

foreverimagining commented 7 months ago

Well, Paul Wieland has removed the issues from his original Ratgdo repository, so I can't point you to the issue where people had noted this activity, nor do I remember if there was a solution or if it was another "that's just to be expected". Your wall panel looks to be about the right model, if memory serves, and I think the reasoning was something along the lines of the Ratgdo occasionally pulling the power line to ground long enough that the capacitors in the wall panel run out so it resets like any other power outage.

I don't really remember or know enough, but I can tell you that it's almost certainly not because of your particular setup.

YBonline commented 7 months ago

ratgdo v2.0 used the D4 pin which is pulled high on boot of the esp8266, causing the clock to reset whenever the esp8266 restarts. ratgdo v2.5 solves this issue by using D1 instead. I assume the pins that the esp32 pulls high on startup are different, but you need to make sure you use pins that are not on bootup. Even if your not rebooting manually, the board automatically reboots if it does not connect to Home Assistant or MQTT or something for a period of time

kaechele commented 7 months ago

Good point. I'm using GPIO5 for TX, GPIO6 for RX and GPIO7 for obstruction sensor input. GPIO5 is a strapping pin on the ESP32, apparently. I can move it to GPIO8.

EDIT: It's actually an ESP32S3, so GPIO5-7 should be fine to use, according to the datasheet.

hacsjalano commented 7 months ago

I've been struggling with this too. With the ESPHome firmware, this would happen a lot - like almost every 3rd-5th time I opened or closed the garage door. It definitely happened whenever I would restart HomeAssistant for any updates. With the official firmware, it does not happen at all with routine opening/closing of the garage door, but with HomeAssistant reboots, it would happen maybe once every 2-3 times, and even then it was never a clock-reset. It would just ask to press the wall button to re-sync the wall button the opener.

I have the official version 2.0 board from Paul Wieland, and also am running the Liftmaster 8550 - it came with the wall panel that shows a clock, temperature and the battery level of the backup battery on the main screen. For me it's the 880LM (no W), so I think my version is earlier than yours. It was installed in 2013.

At this point I'm just waiting to see if the ESPHome firmware will have the ability to read the battery charge level for the backup battery. If that happens, I can remove the wall module completely because the only reason I have it is so I can see the battery level inside the garage door opener.

kaechele commented 7 months ago

Actually, now that you say that, my wall panel is also the non-W 880LM. Fixed my initial post. And to clarify: I'm, so far, not seeing any issues with having to reactivate the wall panel (i.e. the rolling codes going out of sync). It just loses it's time setting but comes back up fully functional.

hacsjalano commented 7 months ago

I think we're seeing the exact same behavior. To summarize, for anyone else reading later, I've tried both the ESPHome firmware and the official Ratgdo MQTT firmware using the V2.0 official Ratgdo hardware.

ESPHome behavior:

Official Ratgdo MQTT firmware:

With both firmwares, Home Assistant and the Ratgdo appear to function perfectly completely unaware anything is wrong. The sensors all work in Home Assistant and I can always open and close the door immediately from Home Assistant. It's only the 880LM that experiences issues.

kaechele commented 7 months ago

Related: https://github.com/ratgdo/esphome-ratgdo/issues/79

foreverimagining commented 7 months ago

Must have missed it when I was looking, but that's the issue I had seen before. Looks like there's a combination of factors that are possibly contributing to the problem. Based on discussions in the Home Assistant forum, there are at least a few models of wall panels that aren't really compatible with Ratgdo, to varying extents.

hacsjalano commented 7 months ago

That related issue was created by me, so apparently we're the only ones with this problem so far! :)