Here is the flow/code from NodeRed.
[
{
"id": "f77c465a8c64faee",
"type": "ui_slider",
"z": "cf08cb9713ba9cda",
"name": "",
"label": "brightness",
"tooltip": "",
"group": "65963440961b63cc",
"order": 6,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "topic",
"topicType": "msg",
"min": 0,
"max": "255",
"step": 1,
"className": "",
"x": 230,
"y": 80,
"wires": [
[
"902ba5af9d02cea1"
]
]
},
{
"id": "902ba5af9d02cea1",
"type": "mqtt out",
"z": "cf08cb9713ba9cda",
"name": "",
"topic": "/hangingLamp/stream",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "1a947cf4658331dc",
"x": 520,
"y": 80,
"wires": []
},
{
"id": "65963440961b63cc",
"type": "ui_group",
"name": "HANGING LAMP",
"tab": "f3a8a67ff0904e39",
"order": 3,
"disp": true,
"width": "6",
"collapse": true,
"className": ""
},
{
"id": "1a947cf4658331dc",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.1.217",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
},
{
"id": "f3a8a67ff0904e39",
"type": "ui_tab",
"name": "HOME",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]