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. MySensors MQTT gateway and serial rs485 sensor node communication

MySensors MQTT gateway and serial rs485 sensor node communication

Scheduled Pinned Locked Moved Development
arduinors485serialopenhab2mqttgatewaynodes
3 Posts 2 Posters 3.9k Views 3 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.
  • ehomeE Offline
    ehomeE Offline
    ehome
    wrote on last edited by
    #1

    Hi all,

    I would like to setup an sensor network with an ethernet gatway and wired connected sensor nodes. (RS485)

    Gateway: Arduino Uno R3 with W5100 ethernet shield.
    Sensor Nodes: Nodes are connected with gateway via wired rs485 connection (cable).

    Connection Flow 1 # Get sensor values:
    Arduino Sensor Node (RS485) --> Gateway --> MQTT --> OpenHab2

    Connection Flow 2 # Issue commands to sensor node: (e.g. activate relay)
    OpenHab2 --> MQTT --> Gateway --> Arduino Sensor Node (RS485)

    Is that possible with the MySensors library?
    Because the RS485 gateway example I found on this page doesnt seem to use MQTT communication to OpenHab?

    Regards,
    Simon

    mfalkviddM 1 Reply Last reply
    0
    • ehomeE ehome

      Hi all,

      I would like to setup an sensor network with an ethernet gatway and wired connected sensor nodes. (RS485)

      Gateway: Arduino Uno R3 with W5100 ethernet shield.
      Sensor Nodes: Nodes are connected with gateway via wired rs485 connection (cable).

      Connection Flow 1 # Get sensor values:
      Arduino Sensor Node (RS485) --> Gateway --> MQTT --> OpenHab2

      Connection Flow 2 # Issue commands to sensor node: (e.g. activate relay)
      OpenHab2 --> MQTT --> Gateway --> Arduino Sensor Node (RS485)

      Is that possible with the MySensors library?
      Because the RS485 gateway example I found on this page doesnt seem to use MQTT communication to OpenHab?

      Regards,
      Simon

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

      @ehome welcome to the MySensors community!

      It should be as easy as changing

      #define MY_GATEWAY_SERIAL
      

      to

      #define MY_GATEWAY_MQTT_CLIENT
      

      and add the configuration parameters listed on the mqtt gateway page.

      1 Reply Last reply
      0
      • ehomeE Offline
        ehomeE Offline
        ehome
        wrote on last edited by
        #3

        Thanks for your fast reply.

        That sounds easy.
        And you think that the communication between sensor nodes and Gateway are still possible via wired RS485?

        I tried to find an example on this site for sending Information from Gateway to sensor nodes. (via SendMessage ?)
        For example I like to Switch on/off an light that is connected to an relay board at my sensor node.

        Communcation Flow:
        OpenHab2 --> MQTT --> Gateway --> RS485 --> Sensor Node --> Relay Board

        Currently I have an working RS485 Connection between my Arduino Uno's with the use from SoftwareSerial library.
        During my testings I realized, that the message that I triy to send "Hello" will be sent to the other arduino char by char. Is that true?

        Because I tried to raise up an pin on HIGH with "if(msg == "Hello")..." But it doesn't worked.

        Will the sendMsg method from the MySensor library handle this out of the box?

        Regards,
        Simon

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


        18

        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