Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Serial Gateway Issue with Node-Red

Serial Gateway Issue with Node-Red

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bpair
    wrote on last edited by
    #1

    I am using a serial gateway connected to node-red. I am trying to parse the serial output but having problems. It appears that the node-red messages may not be "splitting" correctly (or mysensors is not outputting them correctly). At first you see a bunch of what I think are node ID requests. This seems strange to me because I am setting the node and child IDs in my sketch (Using version 1.5 of mysensors). I have two nodes:

    • node=50 (arduino UNO)
      -- child=0(DS18B20)
      -- child=20 (DHT22 Humidity)
      -- child=21 (DHT22 Temperature)
    • node=30 (sensebender)
      -- child=1 (Temperature)
      -- child=2 (Humidity)
      -- child=130 (Voltage)

    Looking at the serial output in node-red

    --first message

    "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:45\n50;30;1;0;23;45\n"
    

    --next message

     "0;0;3;0;9;read: 50-50-255 s=255,c=3,t=7,pt=0,l=0,sg=0:\n"
    

    --next message

    "0;0;3;0;9;send: 0-0-50-50 s=255,c=3,t=8,pt=1,l=1,sg=0,st=fail:0\n"
    

    --next message

    "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:34\n50;30;1;0;23;34\n"
    

    --next message

    "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:36\n50;30;1;0;23;36\n"
    

    --next message

    "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:43\n50;30;1;0;23;43\n"
    

    --next message

    "0;0;3;0;9;read: 30-30-0 s=1,c=1,t=0,pt=7,l=5,sg=0:24.4\n30;1;1;0;0;24.4\n0;0;3;0;9;read: 30-30-0 s=2,c=1,"
    

    --next message

    t=1,pt=2,l=2,sg=0:69\n30;2;1;0;1;69\n"
    

    --next message

    You can see that the last couple ,messages did not appear to split correctly. Is this a problem with something I am doing or node-red or mysensors?

    Has anybody had this trouble?

    B 1 Reply Last reply
    0
    • B bpair

      I am using a serial gateway connected to node-red. I am trying to parse the serial output but having problems. It appears that the node-red messages may not be "splitting" correctly (or mysensors is not outputting them correctly). At first you see a bunch of what I think are node ID requests. This seems strange to me because I am setting the node and child IDs in my sketch (Using version 1.5 of mysensors). I have two nodes:

      • node=50 (arduino UNO)
        -- child=0(DS18B20)
        -- child=20 (DHT22 Humidity)
        -- child=21 (DHT22 Temperature)
      • node=30 (sensebender)
        -- child=1 (Temperature)
        -- child=2 (Humidity)
        -- child=130 (Voltage)

      Looking at the serial output in node-red

      --first message

      "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:45\n50;30;1;0;23;45\n"
      

      --next message

       "0;0;3;0;9;read: 50-50-255 s=255,c=3,t=7,pt=0,l=0,sg=0:\n"
      

      --next message

      "0;0;3;0;9;send: 0-0-50-50 s=255,c=3,t=8,pt=1,l=1,sg=0,st=fail:0\n"
      

      --next message

      "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:34\n50;30;1;0;23;34\n"
      

      --next message

      "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:36\n50;30;1;0;23;36\n"
      

      --next message

      "0;0;3;0;9;read: 50-50-0 s=30,c=1,t=23,pt=3,l=2,sg=0:43\n50;30;1;0;23;43\n"
      

      --next message

      "0;0;3;0;9;read: 30-30-0 s=1,c=1,t=0,pt=7,l=5,sg=0:24.4\n30;1;1;0;0;24.4\n0;0;3;0;9;read: 30-30-0 s=2,c=1,"
      

      --next message

      t=1,pt=2,l=2,sg=0:69\n30;2;1;0;1;69\n"
      

      --next message

      You can see that the last couple ,messages did not appear to split correctly. Is this a problem with something I am doing or node-red or mysensors?

      Has anybody had this trouble?

      B Offline
      B Offline
      bpair
      wrote on last edited by
      #2

      @bpair
      I think I found the issue with my serial port configuration:
      baud rate: 115200
      data bits: 8
      parity: none
      stop bits: 1
      split input: after a timeout of 10ms

      I have since changed the "split input" to split on "\n" chracter

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tbowmo
        Admin
        wrote on last edited by
        #3

        @bpair
        Yes, split by \n, I also tried the timeout option as a start, but changed to \n..

        I've made a couple of plugins for Node-Red, that could be used to parse / generate messages to mysensors serial gw.

        (Links other places in the forum)

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        26

        Online

        12.0k

        Users

        11.2k

        Topics

        113.4k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular