Jump to content

JMRI, DCC++ & MQTT integration

Recommended Posts


JMRI installed and running, currently connected to a virtual DCC++ base station - can see the traffic back and forth in the monitor. so far so good, have had this working on an actual layout which is not currently in service to experiment with (hence the simulator).


have also got an MQTT broker up and running, and JMRI is quite happy to talk to it. Can talk to sensors, turnouts etc nicely.


However a few issues which may be 'features' or may be me having something wrong.


What I'm wanting to do is to connect a throttle over MQTT and have it drive trains with DCC++ controlling the track (currently a wired connection, will be a wifi one eventually). aware of WiThrottle and have had that working but trying to stick with a unified solution if possible.


now I can open a DCC++ throttle, fiddle with it and see the DCC++ commands, but this does not generate MQTT messages.


I can also open a MQTT throttle, fiddle with it and watch the MQTT messages, but this does not generate DCC++ output. 


the documentation appears to suggest if I set up MQTT as a default, I can then open a DCC++ throttle specifically and it should generate messages when empirically it does not


curiously a DCC++ throttle allows clicking on the power button, which does generate MQTT messages, but not DCC++ ones to actually do anything.


this appears set up so it requires a base station to also be using MQTT and not the direct connection.


has anyone gotten this sort of set up to work?


Specifically using MQTT throttles to drive trains on a "normal" base station and get that link to feed back train state via MQTT?



Link to post
Share on other sites

having done a bit more digging it seems the only way to do this is write some python to stitch the two sub systems together manually.


yeah.. no.


will use MQTT to drive points, sensors etc and use WiThrottle to drive the trains as that essentially "just works", maybe not quite as versatile but can always have the controlling "box" echo loco messages out.


guessing this is all early days stuff within JMRI

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...