Cerbo Gx V3.75,Telegraf V1.39 Influxdb2. Telegraf and Influxdb2 are running on a Raspberry Pi Debian 13 and Grafana is on MacBook, all within wired ethernet LAN.
I have the MQTT writing to Telegraf, which is writing to Influxdb and all data is correct.
I cannot however manage to keep the Cerbo MQTT server open.
I ran a mosquitto_pub message to the Cerbo with a message “” (empty) and put this in a crontab which repeats every 45 seconds. The job is running correctly but the Cerbo MQTT closes after 1 minute. - mosquitto_pub -h 192.168.8.xxx-t ‘R/c0619abxxxxx/keepalive’ -n
I tried the NodeRed Inject - MQTT out as suggested in the post - Local MQTT connection times out
From this Github GitHub - victronenergy/dbus-flashmq: Plugin for FlashMQ that interfaces between DBUS and MQTT. · GitHub , which details a keepalive in the document.
I ran the script in the terminal - ( first=“”; while true; do if [[ -n “$first” ]]; then echo ‘{ “keepalive-options” : [“suppress-republish”] }’; else echo “”; fi ; first=true; sleep 30; done ) | mosquitto_pub -t ‘R/c0619abxxxxx/keepalive’ -l -h ‘192.168.8.xxx’ But the terminal froze.
I am only just beginning in my computer knowledge, is anyone able to help me with a keepalive as above and if so what I did wrong when running the terminal script.