Changed MQTT server, now all inputs are N/A

I’ve got an EmonPi and EmonTX3 which have been working for about 2 years. My SD card died and I discovered I have no backups. So I got a new SD, installed the latest image, and got everything working again.

Then I went to change the MQTT server so it would use my HomeAssistant instance, so data would show up there. Now all my inputs show n/a NULL.

I’ve changed the MQTT details in these files, per Service Credentials - Guide | OpenEnergyMonitor:

/opt/openenergymonitor/emonpi/lcd/emonPiLCD.cfg
/etc/emonhub/emonhub.conf
/var/www/emoncms/settings.ini

I did not have a /var/www/emoncms/settings.php file.

My emonhub.log file shows no errors, and repeats this:
2022-11-28 22:44:45,124 DEBUG    RFM2Pi     112 NEW FRAME : OK 5 0 0 25 0 25 0 118 44 140 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
2022-11-28 22:44:45,127 DEBUG    RFM2Pi     112 Timestamp : 1669675485.124112
2022-11-28 22:44:45,128 DEBUG    RFM2Pi     112 From Node : 5
2022-11-28 22:44:45,129 DEBUG    RFM2Pi     112    Values : [0, 27.797525, 25, 124.79304474, 14, 0, 0, 0, 0, 0, 0]
2022-11-28 22:44:45,130 DEBUG    RFM2Pi     112 Sent to channel(start)' : ToEmonCMS
2022-11-28 22:44:45,131 DEBUG    RFM2Pi     112 Sent to channel(end)' : ToEmonCMS
2022-11-28 22:44:45,212 DEBUG    MQTT       Publishing: emon/emonpi/power1 0
2022-11-28 22:44:45,214 DEBUG    MQTT       Publishing: emon/emonpi/power2 27.797525
2022-11-28 22:44:45,215 DEBUG    MQTT       Publishing: emon/emonpi/power1pluspower2 25
2022-11-28 22:44:45,217 DEBUG    MQTT       Publishing: emon/emonpi/vrms 124.79304474
2022-11-28 22:44:45,219 DEBUG    MQTT       Publishing: emon/emonpi/t1 14
2022-11-28 22:44:45,220 DEBUG    MQTT       Publishing: emon/emonpi/t2 0
2022-11-28 22:44:45,222 DEBUG    MQTT       Publishing: emon/emonpi/t3 0
2022-11-28 22:44:45,223 DEBUG    MQTT       Publishing: emon/emonpi/t4 0
2022-11-28 22:44:45,225 DEBUG    MQTT       Publishing: emon/emonpi/t5 0
2022-11-28 22:44:45,226 DEBUG    MQTT       Publishing: emon/emonpi/t6 0
2022-11-28 22:44:45,228 DEBUG    MQTT       Publishing: emon/emonpi/pulsecount 0
2022-11-28 22:44:45,230 INFO     MQTT       Publishing 'node' formatted msg
2022-11-28 22:44:45,231 DEBUG    MQTT       Publishing: emonhub/rx/5/values 0,27.797525,25,124.79304474,14,0,0,0,0,0,0

The values do not change, and I don’t see anything from the emontx in there, only from the emonpi (node 5).

Any idea what I managed to screw up?

[Formatted by Mod]

Can you post the emonhub.conf and settings.ini files, please?

[edit]

The alternative is to Bridge the 2 MQTT Brokers - Mosquitto MQTT Bridge-Usage and Configuration

[edit2]

I think you needed to restart the emoncms_mqtt service as it reads those server details at start (or just reboot the EmonPi).

The MQTT bridge is the way to go, apparently. Once I put everything back to use the internal MQTT server, the EmonCMS side was good to go.

For anyone else’s reference, here’s the relevant code to add to /etc/mosquitto/mosquitto.conf on the EmonPi:

connection bridge-01
address [IP of destination MQTT broker]
try_private false
cleansession true
topic emon/feed/# out 0
remote_clientid emonpimqtt
remote_username [Username on remote broker]
remote_password [Password on remote broker]

The topic will filter topics that are sent to the remote broker.

Edit - Formatted text. Moderator - BT