¿ªÔÆÌåÓý

Locked Re: MQTT Connection in JMRI


 

Just to reiterate, I¡¯m happy to (eventually, not this week; maybe when the semester is over) work on coding up something. From listening, it seems there are two issues that we need to address when specifying the MQTT handling for Turnouts, Sensors, etc.

1) The naming hierarchy that JMRI knows about

2) How to handle the message payload, i.e. mapping JMRI¡¯s state to the payload and vice versa

I don¡¯t have a lot of experience with this, don¡¯t know about community standards, but I think (1) can be handled by making JMRI agnostic to hierarchy choices through system names: Whatever your MQTT setup needs, just put that in the system name. So one person might have ¡°MT/turnouts/EastBranchWestSwindonSiding¡± while another might have ¡°MT/turnouts/2¡±. The setup _outside_ of JMRI, done however the modeler wants, will drive the names and JMRI will just accept.

But I don¡¯t know how to handle (2). What kinds of payloads are there? We can certainly append something to the end of the system name that provides (a bit of) instruction about decoding the payload, but we shouldn¡¯t turn this in to an incredible pain in the neck to configure.

Bob
--
Bob Jacobsen
rgj1927@...

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