I am using a Raspberry Pi with Homeassistant and MQTT. I wanna switch from Modbus to MQTT.
My problem is to hold the MQTT alive. My connection is working and I get every 3 sec. a data refresh (Controlled by a Desktop MQTT Explorer).
My conf file:
connection cerbo-home
address 192.168.1.201
keepalive_interval 10 (useless)
topic # both 0 cerbo-home/
But this works only as long a APP on iOS is open and hold the connection alive. After closing my App, the MQTT will close his connection and I see only my serial.
There are many manuals, and I´ve tried some of them, but nothing works.
Thank you for your help.