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. Development
  3. RS485 Gateway on Raspberry Pi

RS485 Gateway on Raspberry Pi

Scheduled Pinned Locked Moved Development
5 Posts 4 Posters 11.0k Views 5 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.
  • Luc3asL Offline
    Luc3asL Offline
    Luc3as
    wrote on last edited by Luc3as
    #1

    Re: RS485/RS232/Serial transport class for mysensors.org

    Hello gentlemans,
    I am strugling with crazy combination of RS485 adapter connected to Raspberry Pi, which is running Node-RED, and I would like to connect arduino sensors through RS485 to this gateway.
    For start, I hope this configuration is possible. So I connected the MAX RS485 adapter to the pi like this 0_1495647613483_raspberry rs485_bb.png
    I installed the MySensors gateway , and I am able to run it without problem, I can even see gateway started successfully, but I think it doesn't know anything about status of RS485 in real.

    On the other side I burnt example of RS485 motion sensor to arduino pro mini, and watched serial console, It cannot Find parent so there has to be some communication issue.

    I wanted to exclude Raspberry pi as gateway from this so I came with another setup, 2 arduinos with adapters together, one acting as Gateway, second one still with motion sensor example.
    0_1495647860667_pro mini nano RS485_bb.png
    However the results are still the same, Gateway starts without problem, and node is looking for gateway, no presentation, nor sending any data.

    So I was searching through forums and sites day and night, I found some examples of test sketches from altasoft library. With this setup I flashed both and I got working communication, it was sender repeater node so when I wrote something to console it looped me back from another end. Actually I had DE pins connected to D10 as I found it in description.

    When I tried to flash mysensors GW and Node again, can't get any data flowing. I tried to switch DE pins on both D10 and D2 pins as in sketch, I tried to change baudrate, switch roles with GW and Node, twist RX and TX pins, all combinations, nothing.

    Do you guys have any clue what am I doing wrong with vanilla setup like this ?

    Thanks

    EDIT:
    God, why is it , every time I am going to ask about some problem, moments later find solution.
    Wish I found this tread earlier https://forum.mysensors.org/topic/5495/rs485-on-nano/12
    So for future references, With use of RS485 wired network, there must be static node ID set for every node and for gateway too.
    P.S. We should update the documentation, and maybe add wiring picture to the https://www.mysensors.org/build/rs485

    1 Reply Last reply
    1
    • gohanG Offline
      gohanG Offline
      gohan
      Mod
      wrote on last edited by
      #2

      NODE ID is mandatory for all nodes in mysensors anyway, probably it was not added in the example code to avoid creating conflicts with existing nodes

      mfalkviddM 1 Reply Last reply
      0
      • gohanG gohan

        NODE ID is mandatory for all nodes in mysensors anyway, probably it was not added in the example code to avoid creating conflicts with existing nodes

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @gohan said in RS485 Gateway on Raspberry Pi:

        NODE ID is mandatory for all nodes in mysensors anyway

        That's actually incorrect. Many people, including me, use the default AUTO, where a node ID is assigned by the controller. This is documented in the getting started guide.

        But yes, if you don't have a controller there is no-one to assign auto IDs. Maybe the error message should mention something like "Is your controller up and running?"? A long explanatory message would increase the library's flash space requirements though.

        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          I didn't expressed it correctly: what I meant that the actual NODE ID is mandatory not the #DEFINE

          1 Reply Last reply
          0
          • kduinoK Offline
            kduinoK Offline
            kduino
            wrote on last edited by
            #5

            Hi,
            @admins
            an advice about the MY_NODE_ID in the how to for the rs485 section would be helpful. I think, there are at least the double of the people trying for hours until they give up. Only some of them take the efforts to register and login here to get useful information...
            By kduino

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            17

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            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