emoncms base MQTT topic

A lot of discussion took place in this thread re the topic format for MQTT, and various ideas were put forward, however currently emoncms only appears to subscribe on topic rx/# despite what it says in /scripts/phpmqtt_input.php

This appears to work Ok, however rx/# is not very descriptive when used with other connected devices in a network, and also suggests that emoncms should publish on tx/# as a similar convention - again which is not very descriptive.

If the base topic were to change, now would be probably the best time to do so, as MQTT is becoming more popular, and would create work for members if changed later who would have to change their topic structure.

My suggestion would be to use emoncms/rx/# as a topic for subscribing, which clearly indicates that the message was intended for emoncms, and that it's a message which it should receive (subscribe). It's currently possible to 'publish' to emoncms/tx/# in emoncms so only the subscribe topic - which is hard coded would need to be changed.

Any thoughts on this?

Paul

Ian Eagland's picture

Re: emoncms base MQTT topic

Hi Paul

I am using 8.4 as I still cannot get V9 to run properly (still trying to found out why when I have spare time).

I currently use emon as root topic in publish and emoncms as root topic in subscribe due to historic decisions made during mqtt learning curve. I would like to see something like emoncmsout for publish and emoncmsin for subscribe as it is easy to get confused it you have a lot of mqtt message topics in node red. Surely the best thing would be to have the root topics as parameters in settings.php for subscribe and publish so users can set them to their preferences. You nearly always edit settings.php when you first implement emoncms.

Regards

Ian

Paul Reed's picture

Re: emoncms base MQTT topic

...have the root topics as parameters in settings.php for subscribe...

Agree, that would be the best option, but if that proves difficult to implement, then a more intuitive fixed topic would be favourable to the present.

Paul

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.