esprfid / esp-rfid

ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MQTT restart

timknowlden opened this issue · comments

Hi,
Sometimes my device becomes unresponsive via mqtt command. I haven't yet worked out if its due to the device or the server.

I have to restart the esp device to get it to respond again. Is there a way to restart the connection without restarting device and automatically too?

Running the latest dev build.

Also when I restart my device it sends a message by mqtt to say the door has been opened by the push button. Is there a way to disable this message being sent, or change the message to say device has restarted.
Screenshot_20230310_162547_Brave
Screenshot_20230310_162611_Brave
Screenshot_20230310_162547_Brave

hello @timknowlden are you only sending MQTT commands and then it stops responding or are you also using the Web UI?

If MQTT only, which messages are you sending?

It's only mqtt commands that it is not working with.

The Web ui is still functional and that is how I'm restarting the device

Can you share a log of calls that you are sending/receiving from the esp-rfid, so that I can try reproducing? Or some steps that you take that reproduce the problem. I have a very stable system with MQTT (mostly sending from esp-rfid)

I am using home assistant to issue commands via mosquito broker, the log will be flooded with messages to and from other devices. It can last for days on end before becoming unresponsive.

If the message on restart was not that the door was operated then I could set the device to restart daily?

Yes @timknowlden that's what I would do! You can setup the autorestart from here:

immagine

You can also set a custom time, if 24h are too much.

I'm going to close this for now, but reopen if this is not good enough. Unfortunately there's only so much we can do from esp-rfid to mitigate these type of issues.

I had a power cut at home today. The esprfid device started sooner than the server so no connection to mqtt broker was made. I therefore was unable to open by home assistant.

The device then needed manually restarting from the UI.

The only message I received was a new connection in mqtt log.

This gives a message to home assistant to say the device was operated by button which it was not. It simply just connected to the broker.
Screenshot_20230313_151849_Home Assistant