Bridge 2 MQTT Brokers and rename topics

Yes, i’m editing settings.ini

after setting emoncms log level to 1

the emoncms log is a constant stream of mqtt messages

2023-10-05 13:10:22.052|INFO|emoncms_mqtt.php|emon/inverter_1/pv_power/state 232
2023-10-05 13:10:22.063|INFO|emoncms_mqtt.php|emon/inverter_1/battery_voltage/state 27.4
2023-10-05 13:10:22.074|INFO|emoncms_mqtt.php|emon/inverter_1/load_apparent_power/state 165
2023-10-05 13:10:22.085|INFO|emoncms_mqtt.php|emon/inverter_1/pv_current_2/state 1.4
2023-10-05 13:10:22.096|INFO|emoncms_mqtt.php|emon/inverter_1/temperature/state 33.0
2023-10-05 13:10:22.107|INFO|emoncms_mqtt.php|emon/inverter_1/load_percentage/state 4
2023-10-05 13:10:22.118|INFO|emoncms_mqtt.php|emon/inverter_1/battery_current/state 5.0
2023-10-05 13:10:22.129|INFO|emoncms_mqtt.php|emon/inverter_1/grid_power/state 0
2023-10-05 13:10:22.140|INFO|emoncms_mqtt.php|emon/inverter_1/pv_voltage_1/state 1.4
2023-10-05 13:10:22.150|INFO|emoncms_mqtt.php|emon/inverter_1/pv_voltage_2/state 166.0
2023-10-05 13:10:22.161|INFO|emoncms_mqtt.php|emon/inverter_1/pv_power_1/state 0
2023-10-05 13:10:22.172|INFO|emoncms_mqtt.php|emon/inverter_1/device_mode/state Solar/Battery
2023-10-05 13:10:22.184|INFO|emoncms_mqtt.php|emon/inverter_1/grid_voltage/state 2.0
2023-10-05 13:10:22.195|INFO|emoncms_mqtt.php|emon/inverter_1/ac_output_frequency/state 49.9
2023-10-05 13:10:22.205|INFO|emoncms_mqtt.php|emon/inverter_1/ac_output_voltage/state 229.0
2023-10-05 13:10:22.216|INFO|emoncms_mqtt.php|emon/inverter_1/load_power/state 165
2023-10-05 13:10:22.227|INFO|emoncms_mqtt.php|emon/inverter_1/pv_power_2/state 232
2023-10-05 13:10:22.238|INFO|emoncms_mqtt.php|emon/battery_1/current/state 5.0
2023-10-05 13:10:22.248|INFO|emoncms_mqtt.php|emon/battery_1/power/state 137
2023-10-05 13:10:22.259|INFO|emoncms_mqtt.php|emon/battery_1/state_of_charge/state 100
2023-10-05 13:10:22.271|INFO|emoncms_mqtt.php|emon/battery_1/voltage/state 27.4
2023-10-05 13:10:22.282|INFO|emoncms_mqtt.php|emon/total/battery_power/state 137
2023-10-05 13:10:22.293|INFO|emoncms_mqtt.php|emon/total/battery_state_of_charge/state 100
2023-10-05 13:10:24.-418|INFO|emoncms_mqtt.php|emon/inverter_1/grid_frequency/state 46.0
2023-10-05 13:10:24.-257|INFO|emoncms_mqtt.php|emon/inverter_1/pv_current_1/state 0.0
2023-10-05 13:10:24.-246|INFO|emoncms_mqtt.php|emon/inverter_1/pv_power/state 232
2023-10-05 13:10:24.-234|INFO|emoncms_mqtt.php|emon/inverter_1/battery_voltage/state 27.4
2023-10-05 13:10:24.-224|INFO|emoncms_mqtt.php|emon/inverter_1/load_apparent_power/state 167
2023-10-05 13:10:24.-213|INFO|emoncms_mqtt.php|emon/inverter_1/pv_current_2/state 1.4
2023-10-05 13:10:24.-202|INFO|emoncms_mqtt.php|emon/inverter_1/temperature/state 33.0
2023-10-05 13:10:24.-192|INFO|emoncms_mqtt.php|emon/inverter_1/load_percentage/state 4
2023-10-05 13:10:24.-181|INFO|emoncms_mqtt.php|emon/inverter_1/battery_current/state 5.0
2023-10-05 13:10:24.-170|INFO|emoncms_mqtt.php|emon/inverter_1/grid_power/state 0
2023-10-05 13:10:24.-159|INFO|emoncms_mqtt.php|emon/inverter_1/pv_voltage_1/state 1.4
2023-10-05 13:10:24.-149|INFO|emoncms_mqtt.php|emon/inverter_1/pv_voltage_2/state 166.0
2023-10-05 13:10:24.-135|INFO|emoncms_mqtt.php|emon/inverter_1/pv_power_1/state 0
2023-10-05 13:10:24.-124|INFO|emoncms_mqtt.php|emon/inverter_1/device_mode/state Solar/Battery
2023-10-05 13:10:24.-114|INFO|emoncms_mqtt.php|emon/inverter_1/grid_voltage/state 2.0
2023-10-05 13:10:24.-103|INFO|emoncms_mqtt.php|emon/inverter_1/ac_output_frequency/state 49.9
2023-10-05 13:10:24.-92|INFO|emoncms_mqtt.php|emon/inverter_1/ac_output_voltage/state 230.0
2023-10-05 13:10:24.-82|INFO|emoncms_mqtt.php|emon/inverter_1/load_power/state 167
2023-10-05 13:10:24.-71|INFO|emoncms_mqtt.php|emon/inverter_1/pv_power_2/state 232
2023-10-05 13:10:24.-60|INFO|emoncms_mqtt.php|emon/battery_1/current/state 5.0
2023-10-05 13:10:24.-49|INFO|emoncms_mqtt.php|emon/battery_1/power/state 137
2023-10-05 13:10:24.-39|INFO|emoncms_mqtt.php|emon/battery_1/state_of_charge/state 100
2023-10-05 13:10:24.-28|INFO|emoncms_mqtt.php|emon/battery_1/voltage/state 27.4
2023-10-05 13:10:24.-17|INFO|emoncms_mqtt.php|emon/total/battery_power/state 137
1 Like

OK, so are you sure these are not appearing on the inputs page?

image

nope

@TrystanLea - I am out of ideas. The script seems to be picking it up from MQTT but they are not appearing.

@Ashipa - have you checked the syslog? (journalctl -f) odd things can appear there.

$ journalctl -f
Oct 05 13:27:53 fountain systemd[1]: demandshaper.service: Failed with result 'exit-code'.
Oct 05 13:27:55 fountain systemd[1]: emonhub.service: Scheduled restart job, restart counter is at 210.
Oct 05 13:27:55 fountain systemd[1]: Stopped emonHub data multiplexer.
Oct 05 13:27:55 fountain systemd[1]: Starting emonHub data multiplexer...
Oct 05 13:27:55 fountain systemd[3486]: emonhub.service: Failed to determine user credentials: No such process
Oct 05 13:27:55 fountain systemd[3486]: emonhub.service: Failed at step USER spawning /bin/mkdir: No such process
Oct 05 13:27:55 fountain systemd[1]: emonhub.service: Control process exited, code=exited, status=217/USER
Oct 05 13:27:55 fountain systemd[1]: emonhub.service: Failed with result 'exit-code'.
Oct 05 13:27:55 fountain systemd[1]: Failed to start emonHub data multiplexer.
Oct 05 13:27:58 fountain systemd[1]: run-docker-runtime\x2drunc-moby-717ff4a53101d9d546a10baeadc1487ecc2f763763db099af88c0ad8b824870e-runc.AyNGoX.mount: Deactivated successfully.
Oct 05 13:28:00 fountain systemd[1]: emonhub.service: Scheduled restart job, restart counter is at 211.
Oct 05 13:28:00 fountain systemd[1]: Stopped emonHub data multiplexer.
Oct 05 13:28:00 fountain systemd[1]: Starting emonHub data multiplexer...
Oct 05 13:28:00 fountain systemd[3512]: emonhub.service: Failed to determine user credentials: No such process
Oct 05 13:28:00 fountain systemd[3512]: emonhub.service: Failed at step USER spawning /bin/mkdir: No such process
Oct 05 13:28:00 fountain systemd[1]: emonhub.service: Control process exited, code=exited, status=217/USER
Oct 05 13:28:00 fountain systemd[1]: emonhub.service: Failed with result 'exit-code'.
Oct 05 13:28:00 fountain systemd[1]: Failed to start emonHub data multiplexer.
Oct 05 13:28:05 fountain systemd[1]: emonhub.service: Scheduled restart job, restart counter is at 212.
Oct 05 13:28:05 fountain systemd[1]: Stopped emonHub data multiplexer.
Oct 05 13:28:05 fountain systemd[1]: Starting emonHub data multiplexer...
Oct 05 13:28:05 fountain systemd[3514]: emonhub.service: Failed to determine user credentials: No such process
Oct 05 13:28:05 fountain systemd[3514]: emonhub.service: Failed at step USER spawning /bin/mkdir: No such process
Oct 05 13:28:05 fountain systemd[1]: emonhub.service: Control process exited, code=exited, status=217/USER
Oct 05 13:28:05 fountain systemd[1]: emonhub.service: Failed with result 'exit-code'.
Oct 05 13:28:05 fountain systemd[1]: Failed to start emonHub data multiplexer.
Oct 05 13:28:10 fountain systemd[1]: emonhub.service: Scheduled restart job, restart counter is at 213.
Oct 05 13:28:10 fountain systemd[1]: Stopped emonHub data multiplexer.
Oct 05 13:28:10 fountain systemd[1]: Starting emonHub data multiplexer...
Oct 05 13:28:10 fountain systemd[3516]: emonhub.service: Failed to determine user credentials: No such process
Oct 05 13:28:10 fountain systemd[3516]: emonhub.service: Failed at step USER spawning /bin/mkdir: No such process
Oct 05 13:28:10 fountain systemd[1]: emonhub.service: Control process exited, code=exited, status=217/USER
Oct 05 13:28:10 fountain systemd[1]: emonhub.service: Failed with result 'exit-code'.
Oct 05 13:28:10 fountain systemd[1]: Failed to start emonHub data multiplexer.
Oct 05 13:28:16 fountain systemd[1]: emonhub.service: Scheduled restart job, restart counter is at 214.
Oct 05 13:28:16 fountain systemd[1]: Stopped emonHub data multiplexer.
Oct 05 13:28:16 fountain systemd[1]: Starting emonHub data multiplexer...
Oct 05 13:28:16 fountain systemd[3517]: emonhub.service: Failed to determine user credentials: No such process
Oct 05 13:28:16 fountain systemd[3517]: emonhub.service: Failed at step USER spawning /bin/mkdir: No such process
Oct 05 13:28:16 fountain systemd[1]: emonhub.service: Control process exited, code=exited, status=217/USER
Oct 05 13:28:16 fountain systemd[1]: emonhub.service: Failed with result 'exit-code'.
Oct 05 13:28:16 fountain systemd[1]: Failed to start emonHub data multiplexer.

BTW, I’d slow this down. Every 2 seconds is a bit excessive and can overload the emoncms end. Once every 10 is quick enough, I’d suggest.

Unrelated (I suspect), but you want to stop and disable these 2 services.

Yeah , was going to ask if its safe to disable them.

where do i set the time intervals for the MQTT?

I think you said Solar Assistant was running on a Pi? Can you control the rate from there (MQTT is a dumb system in this respect).

No. there’s aren’t any settings on that end other than username/password

1 Like

@borpin thank you very much for the assistance.

I really appreciate the time and patience.

I nuked the OS install and started from scratch again.

This time around I followed the script installation down to a tee.

Put in the bridge .conf

And voila, the inputs appeared.

In summary, I have no idea what was wrong initially, but it’s sorted now after doing a clean os install and fresh setup + the bridge.

Didn’t have to fudge with any settings… Yet

I don’t know which post to mark as solution.

Maybe the correct bridge…conf post.

Thanks

No bother. Glad you got it sorted.

On the first install, did you use the user Pi?

No I did not.

Even this install I used my Ubuntu username.

But I did not change the host name in the script.

It remains emonpi

1 Like