Changes between Version 7 and Version 8 of nodered


Ignore:
Timestamp:
12/17/2021 11:57:39 PM (3 years ago)
Author:
Ryan Erbstoesser
Comment:

update output

Legend:

Unmodified
Added
Removed
Modified
  • nodered

    v7 v8  
    6363 * This demo takes an incoming MQTT message from a client and just prints it out in the debug screen.
    6464 * Use the MQTT input module connected to a debug module ti replicate what is shown in the picture below.
    65 [[Image(nodered.png,600px)]]
     65[[Image(nodered2.png,600px)]]
    6666
    6767= Create a Client on Gateworks SBC
     
    8080The below is a sample python script to pass MQTT messages from the Gateworks SBC to the Node-Red server (broker). The script will pass the Gateworks SBC temperature as the payload and send it specific to the device's serial number.
    8181
     82Running the script on the client:
     83{{{
     84root@focal-venice:~# python gateworks.py
     85852420
     86Connected with result code {'session present': 0}
     87in loop
     88done publishing
     89('message received ', '50.4')
     90('message topic=', u'gateways/id/852420')
     91('message qos=', 0)
     92('message retain flag=', 0)
     93in loop
     94done publishing
     95('message received ', '50.5')
     96('message topic=', u'gateways/id/852420')
     97('message qos=', 0)
     98('message retain flag=', 0)
     99
     100}}}
     101
     102Script source code:
    82103{{{
    83104# Compatible with python 2.* version
     
    106127 client.on_connect = on_connect
    107128 client.on_message = on_message
    108  broker = "172.24.33.93"
     129 broker = "122.24.33.93"
    109130 client.connect(broker)
    110131 client.loop_start()