Hi Dario
You can start with this, but Goole is a good guide.You can start using the RASPBIAN STRETCH WITH DESKTOP distribution that has Node-Red already installed.
Then install the dashboard (npm i node-red-dashboardoard), install mosquitto and mosquitto-clients.
Activate the python library of Michi as he indicated and run:
python3 /home/pi/pysouliss/examples/example_mqtt.py -g <soulissgateway ip address> -m 127.0.0.1
Now you see:
pi@orangepipc2:~$ python3 /home/pi/pysouliss/examples/example_mqtt.py -g 192.168.1.199 -m 127.0.0.1
INFO: Trying to connect to gateway
INFO: 13 nodes found
INFO: Connected to mqtt broker at 127.0.0.1
INFO: Node 0. Added typical 0x14: T14: Pulse Digital Output
INFO: Node 0. Added typical 0x14: T14: Pulse Digital Output
INFO: Node 1. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 2. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 3. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 3. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 3. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 5. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 6. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 8. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 8. Added typical 0x11: T11: ON/OFF Digital Output with Timer Option
INFO: Node 10. Added typical 0x1a: T1A: Digital Input Pass Through
INFO: Node 11. Added typical 0x1a: T1A: Digital Input Pass Through
INFO: Node 0: Typical 0 - T14: Pulse Digital Output updated to off
INFO: Node 0: Typical 1 - T14: Pulse Digital Output updated to off
INFO: Node 5: Typical 0 - T11: ON/OFF Digital Output with Timer Option updated to off
And width mosquitto_sub -v -t '#' you can see the mqtt messages when activate a Souliss node (T11 for example On and then OFF)
pysouliss/8/0 on
pysouliss/8/0/cmd
pysouliss/8/0 off
pysouliss/8/0/cmd
Now there is the connection between Souliss and MQTT using the Python Library.
----Node-Red configuration
On up right select 'Import/Clipboard' and past this configuration
[{"id":"84525d6f.8d602","type":"mqtt in","z":"e76184db.5c2948","name":"in nodo souliss 8","topic":"pysouliss/8/0","qos":"2","broker":"171cf9c2.d98756","x":160,"y":260,"wires":[["5c52bdd.1a5f544"]]},{"id":"5c52bdd.1a5f544","type":"ui_switch","z":"e76184db.5c2948","name":"","label":"switch","group":"dde0c113.6a5f4","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":330,"y":260,"wires":[["b8684b5f.64f728"]]},{"id":"b8684b5f.64f728","type":"function","z":"e76184db.5c2948","name":"comandi","func":"if (msg.payload === \"on\") \nmsg.payload = new Buffer(\"\\x02\");\nif (msg.payload === \"off\") \nmsg.payload = new Buffer(\"\\x04\");\nreturn msg;","outputs":1,"noerr":0,"x":480,"y":260,"wires":[["6fdb1382.7a683c"]]},{"id":"6fdb1382.7a683c","type":"mqtt out","z":"e76184db.5c2948","name":"","topic":"pysouliss/8/0/cmd","qos":"2","retain":"","broker":"171cf9c2.d98756","x":670,"y":260,"wires":[]},{"id":"171cf9c2.d98756","type":"mqtt-broker","z":"","broker":"192.168.1.62","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"dde0c113.6a5f4","type":"ui_group","z":"","name":"test","tab":"b5806ef4.dfdc4","order":1,"disp":true,"width":"6"},{"id":"b5806ef4.dfdc4","type":"ui_tab","z":"","name":"soggiorno","icon":"dashboard","order":1}]
than Click import and deploy. Now you see the object for a test
With double-click in each block you see the configuration that change for you site
In the firs and last object you can change the address and the topic for MQTT
The first object is the receiver of MQTT from pysouliss
The second is the switch for ON/OFF of T11 souliss. The payload is tranfered to the third block (function)
that convert the on/off payload in \x02 and \x04 fot pysouliss ( and souliss )
The last block send the comand to MQTT and then to pysouliss ( and souliss )
Open http:// ip_raspberry:1880/ui and see the switch that you can move on and off.
Now you can add more block and function from the left menu, configure and deploy.
Can export the configuration and save in a text file as my example, and other.
I'm trying Node-Red for a week, I do not know it, but Google helps.
At moment no other info.
Giuseppe