IoTT Stick configuration
Open the Node Configuration page of the IoTT Stick and select BlueHat as your hat module.
On the same page, select the command source. Use MQTT to use direct control of each individual LED via MQTT from tools such as Node-RED and others.
Use any other command source to make the BlueHat react to model railroad related input such as switch and signal commands and more.
Note: Since the BlueHat is just a display module and does not send back any input information to the command control system, it can be used with all available command sources, including DCC.
Setup using Model Railroad Interfaces
When used with a model railroad related command source, the LED Chain Setup tab will display configuration options for each LED.
Check these videos to see how it is done:
https://youtu.be/fjFC4k9QlSQ
Setup using MQTT Interface
When used with the MQTT interface, the LED Chain Setup tab provides input fields to specify your own MQTT topics. There are 3 user definable topics:
LED Command: This topic can be used to control a specific LED from outside via MQTT
LED Query: This topic is used to query the status of a specific LED from outside via MQTT
LED Reply: This topic is used by the IoTT Stick to answer an outside query request.
All topics can consist of a single term or use a subtopic structure using / to separate. Example: Stick1/LEDSET
Alltopics can include the LED Number in the topic string by activating the checkbox: Stick1/LEDSET/5
Payload syntax: The payload uses a JSON string with attributes for LED number and color settings.
Payload Examples for LED Command topic:
Requesting LED #5 to display color specified as HSV value: {"LEDNr":5,"HSV":[0,255,128]}
Requesting LED #5 to display color specified as RGB value: {"LEDNr":5,"RGB":[128,0,0]}
Requesting an array of LEDs to display color specified as HSV value: {"LEDNr":[5,7,10],"HSV":[0,255,128]}
Payload Examples for LED Query topic:
Requesting status of LED #5: {"LEDNr":5}
or just using the topic with LED Nr included: LEDASK/5 {} //empty payload
Requesting status of several LEDs: {"LEDNr":[5,7,10]}
This will result in individual reply messages for each requested LED
Payload Examples for LED Reply topic:
{"LEDNr":5, "RGB": [128, 0, 0], "HSV":[0,255,128]}