I am using a local hosted emoncms on a Pi. Version Powered by OpenEnergyMonitor.org | low-write 9.8.31 | 2018.06.21. The mqtt is on a different Pi but I think that is irrelevant.
I suddenly noticed that some of the inputs supposedly being published to mqtt are not actually being published.
What is really strange is that some inputs are being published to mqtt. I set up an mqtt viewer to confirm this.
Is there a Log file showing what emoncms publishes to mqtt?
I then went to the inputs not being published to edit the the mqtt name as a test and edit does not work.
I then went to another input to add a test mqtt publish and publish to mqtt has disappeared from the process list!
I keep regularly updating with git pull but have realised you sometimes have to go to sub directories to keep every thing up to date. I may be missing an update relating to mqtt publish but have not figured out the location of the PHP file that controls the mqtt publish. Could it be I have missed an update?
Hello Ian, Im not sure what’s causing the issue but the publish_to_mqtt method can be found in this file: emoncms/process_processlist.php at master · emoncms/emoncms · GitHub
This feature was updated to use the mosquito mqtt client, same client used by the phpmqtt_input.php script about 23 days ago Feature/issue 840 migrate to mosquitto by emrysr · Pull Request #853 · emoncms/emoncms · GitHub
Does restarting the Pi make any difference, or the mqtt_input process? e.g:
sudo service mqtt_input restart
Already tried rebooting both Pi. One with emoncms and the other with mosquitto.
A git pull on process shows up to date.
The strangest thing is the loss of publish to mqtt in the input process list setup.
Aha that was an issue that was fixed recently, but the fix is still in the master branch and not in the stable branch. Your welcome to switch to the master branch in the meantime:
git checkout master
OK this must be the problem @Paul mentioned in this thread:-
MQTT log entries
I temporarily deleted a few publish to mqtt processes and the important one that I was missing this morning has reappeared and the node red function it was controlling is operating again.
I must say that I have not had a problem up to now but I guess that I have been lucky.
Clearly something amiss with the way emoncms handles mqtt.
I have the same issue with pi3 B+ using emonSD-13Jun18(Beta)
After switching to master branch still the same. Publish to MQTT dosen’t show up in the process list.
I have an issue where EmonCMS stopped publishing an existing feed (after a “git pull” update) sometime last month, but the “Publish to MQTT” option IS still there in the Add Process list.
New MQTT publisher processes I create do not publish to MQTT.
I am open to suggestions!
This may be the problem I mentioned 2 posts up.
See this MQTT log entries
Try temporarily deleting some existing mqtt published processes and see if the new ones appear.
I had to delete all bar one to get the really important one I needed. I think it is clear publish to MQTT needs some work