Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp-rfid keeps disconnecting from mqtt #611

Open
IVCrossway opened this issue Dec 9, 2023 · 5 comments
Open

esp-rfid keeps disconnecting from mqtt #611

IVCrossway opened this issue Dec 9, 2023 · 5 comments

Comments

@IVCrossway
Copy link

esp-rfid latest dev branch. It keeps disconnecting from mqtt and this results in home assistant thinking the door is open.
Rebooting the esp solves the problem temporarly. The disconnects seem to be random and other mqtt devices are not experiencing this issue.

Mosquitto logs show:

1702112729: New client connected from 192.168.188.148:60303 as esp8266-f9c4d6 (p2, c1, k15, u'mqtthome').
1702113162: Client esp8266-f9c4d6 has exceeded timeout, disconnecting.
1702113237: New connection from 192.168.188.148:62236 on port 1883.
1702113237: New client connected from 192.168.188.148:62236 as esp8266-f9c4d6 (p2, c1, k15, u'mqtthome').
1702113692: Saving in-memory database to /mosquitto/data//mosquitto.db.
1702114968: Client esp8266-f9c4d6 has exceeded timeout, disconnecting.
1702115035: New connection from 192.168.188.148:63326 on port 1883.
1702115035: New client connected from 192.168.188.148:63326 as esp8266-f9c4d6 (p2, c1, k15, u'mqtthome').
1702115493: Saving in-memory database to /mosquitto/data//mosquitto.db.
1702116054: Client esp8266-f9c4d6 has exceeded timeout, disconnecting.

While esp-rfid just shows:
immagine

@matjack1
Copy link
Collaborator

hey @IVCrossway I'm sorry for your problem :(

Unfortunately this is not something that happens to me, MQTT connection is reliable to me.

It's strange that HA thinks that the door is open when esp-rfid is disconnected, is it something we can fix on esp-rfid side?

Instead on the MQTT connection, maybe you have already tried, but is the esp close to the WiFi AP? Also, have you tried another board? Sometimes boards are not very reliable, maybe try another one. Finally, is the esp-rfid reconnecting to MQTT automatically or only if you reboot?

@IVCrossway
Copy link
Author

IVCrossway commented Dec 19, 2023

It's strange that HA thinks that the door is open when esp-rfid is disconnected, is it something we can fix on esp-rfid side?

I think this should be handled by home assistant itself, I just have to figure out how.

Instead on the MQTT connection, maybe you have already tried, but is the esp close to the WiFi AP? Also, have you tried another board? Sometimes boards are not very reliable, maybe try another one. Finally, is the esp-rfid reconnecting to MQTT automatically or only if you reboot?

The wifi connection I guess is fine. The esp is connected to a Range Extender to get the best possible signal quality. I don't know if it's dropping packets or something but, correct me if I'm wrong, this should not be an isseue since packet drops happen every so often and the packet will be delivered before the mqtt timeout. (I'll further investigate into my network reliability)

The fact is that after some time (could be hours, could be minutes... It's random like the disconnects) it reconnects itself without any reboot. And in this timeframe the web interface is working just fine, so I guess this is not a connectivity issue.

@matjack1 matjack1 added this to the V2 milestone Jan 16, 2024
@matjack1
Copy link
Collaborator

Hey @IVCrossway are you still interested and using this project? Do you have any news about this issue? Since I've not received any similar issue and not experienced it myself I'm inclined to close this. Let me know how it's going, thanks!

@IVCrossway
Copy link
Author

Yes I'm still using it. As a "workaround" I added another esp with esp-home to have an app control of the garage door. I needed the MQTT connection just to open the door using my phone.
If you want you can close the issue, unfortunatly I do not have time to troubleshoot this any further.

@matjack1
Copy link
Collaborator

I'm leaving this here, in case similar reports come through, but right now I don't have clues on what to work on, sorry :(

@matjack1 matjack1 removed this from the V2 milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants