volkszaehler / mbmd

ModBus Measurement Daemon - simple reading of data from ModBus meters and grid inverters
BSD 3-Clause "New" or "Revised" License
224 stars 81 forks source link

No reconnect to MQTT after restart MQTT-Server #346

Open Fowow opened 2 months ago

Fowow commented 2 months ago

Hello,

after rebooting the remote MQTT, the MQTT data on the broker disapears. I need to restart MBMD and then , it connects successful and sends data.

I use a Node-Red MQTT-Broker.

andig commented 2 months ago

Sounds like reconnect handler needs be added.

Fowow commented 2 months ago

OK, how can this be done? This is important for me because I sometimes forget to manualy restart the MBMD Daemon for reconnecting :-(

andig commented 2 months ago

Seems reconnect is already enabled. No idea why this wouldn't work. It should.

Fowow commented 2 months ago

I use the "aedes broker" included in NODE-RED. I have connected many clients to access this broker. If i deploy some changes in Node-Red all devices re-connets, except the MBMD. I need to go t my raspi and restart the MBMD-Service.

Looks that there is a BUG in the "reconnect handler"?

Fowow commented 1 month ago

Some days ago, I restarted my NodeRed-MQTT Server and I forgot the MDMD daemon to restart. All 10 MQTT clients have successful re-connect exept the MDMD-Daemon. :-(

It is possible that this bug will be fixed because I have los important accounting data from my solar-devices.

andig commented 1 month ago

Seems reconnect is already enabled. No idea why this wouldn't work. It should.

This will need someone to debug why the reconnect isn't working.

Fowow commented 1 month ago

This would be great, I realy like MBMD :-) It is easy for you to debug, just install Node-Red and "aedes broker". After connecting everything you can restart the Node and you see the disconnect.