¿ªÔÆÌåÓý

Locked Re: MQTT Connection in JMRI


 

Folks,

I'm seeking some clarification on the finer details of what topic structure we are proposing and how the system name will get defined for each MQTT device.
?
Bob mentioned "system names should include a complete, unconstrained topic path (without wildcards)."
?
System names normally commence with system letter and device type letter,? e.g. MT for turnouts.
?
The current implementation has the MQTT "channel" defined on the system connection options page (/trains/) as the top two levels of the topic (the top level technically is the text that precedes the first /, null in this case). I think everyone agrees that using the channel should continue though with a name of the user's choice.
?
So, does this mean that when an MQTT turnout gets created, MT/channelname/ will be prepended to the text entered for the hardware address to make the full topic as the system name?? MT therefore replaces the null top level of the topic so that is fine and means we don't need "turnout" as part of the topic because "MT" already defines it as a turnout and enforces consistency, even better!? That works for me.
?
Compatibility with the current arrangement is pretty much lost regardless. Perhaps it will need a setting on the connection page that says something like Use basic (i.e. the original) format topic for turnouts with this being selected by default if existing MQTT devices are found so existing use doesn't fail when the new release of JMRI gets installed and the user can migrate to the new format at their convenience. All other devices to use the new format. Don't display that option if no old format MQTT turnouts exist. NB: Just a warning that there are other systems that can use the system character 'M'.

Regards, David.
?

Join [email protected] to automatically receive all group messages.