Skip to content

Ozafy/rocrail-mqtt-lego-powered-up

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rocrail MQTT Client for Lego Powered-up trains

An MQTT client for lego poweredup trains. Uses node-poweredup train functions. To be used with rocrail. Tested with MQTT broker mosquitto.

Rocrail Configuration

You'll need the powered up hub id and port name.

You can find these by looking at the console output when connecting the hub:

Found hub Hubname (id: 90842b0ed660)
Hubname(id: 90842b0ed660) has a trainmotor on port: A

Now set your locomotive interface oid to: 90842b0ed660 and your address to 1

Adress translation table:

Port name Rocrail Address
A 1
B 2
A & B 3

When running A & B together B will run in the reverse direction of A.

MQTT Configuration

Set the server host and port in config.json

{
    "server": {
        "host":"localhost",
        "port": 1883
    }
}

Releases

No releases published

Packages

No packages published