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. My Project
  3. Multiple buildings - two gateways or repeaters?

Multiple buildings - two gateways or repeaters?

Scheduled Pinned Locked Moved My Project
6 Posts 2 Posters 2.8k 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.
  • N Offline
    N Offline
    namomitk
    wrote on last edited by
    #1

    I have two buildings on my property. In building A, I have setup an RPi3 with HomeAssistant as a controller and using NRF24 configured as an MQTT Gateway. I have configured a few sensors and successfully report them in Hass.

    I would like to expand to building B. Wifi and LAN reach building B.

    I have:
    Arduino UNO R3 / W5100 Shield

    Can I use the MQTT Gateway sketch? Will this be a problem if the Arduino picks up on one of the sensors from Building A?
    OR
    Should I use the Repeater node sketch? Is this as flexible? Can I still attach sensors or actuators to the repeater node?

    Any tips?

    I've searched and searched and can't seem to figure out the best way or a functional way of setting this up.

    Thanks in advance.

    mfalkviddM 1 Reply Last reply
    0
    • N namomitk

      I have two buildings on my property. In building A, I have setup an RPi3 with HomeAssistant as a controller and using NRF24 configured as an MQTT Gateway. I have configured a few sensors and successfully report them in Hass.

      I would like to expand to building B. Wifi and LAN reach building B.

      I have:
      Arduino UNO R3 / W5100 Shield

      Can I use the MQTT Gateway sketch? Will this be a problem if the Arduino picks up on one of the sensors from Building A?
      OR
      Should I use the Repeater node sketch? Is this as flexible? Can I still attach sensors or actuators to the repeater node?

      Any tips?

      I've searched and searched and can't seem to figure out the best way or a functional way of setting this up.

      Thanks in advance.

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

      A MySensors network can only have one gateway. Therefore, you should probably have a separate network for building b. The networks are separated by using different radio channels (#define MY_RF24_CHANNEL , see https://github.com/mysensors/MySensors/blob/dd9dff77ed1948db2b348bbdb82d0d3daa9e8e3a/MyConfig.h#L544 For details)

      Sensors and actuators can be attached to repeater nodes, but adding a repeater node will only help if the repeater node is able to forward the messages so they reach a gateway.

      N 1 Reply Last reply
      1
      • N Offline
        N Offline
        namomitk
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          A MySensors network can only have one gateway. Therefore, you should probably have a separate network for building b. The networks are separated by using different radio channels (#define MY_RF24_CHANNEL , see https://github.com/mysensors/MySensors/blob/dd9dff77ed1948db2b348bbdb82d0d3daa9e8e3a/MyConfig.h#L544 For details)

          Sensors and actuators can be attached to repeater nodes, but adding a repeater node will only help if the repeater node is able to forward the messages so they reach a gateway.

          N Offline
          N Offline
          namomitk
          wrote on last edited by
          #4

          @mfalkvidd

          That makes sense. I think I can run with that.

          So Building A would run on CH76 by default. Building B I would select a different channel for the gateway out there and configure the sensors/actuators to communicate on that channel, say 124.

          When I setup the MQTT gateway for building B, can I publish/subscribe to the same topic prefix as building A's gateway or do they need to be different? If both "networks" had a relay node 1, would telling one of them to "turn off" cause them both to turn off. I imagine the payloads would be the same?

          mfalkviddM 1 Reply Last reply
          0
          • N namomitk

            @mfalkvidd

            That makes sense. I think I can run with that.

            So Building A would run on CH76 by default. Building B I would select a different channel for the gateway out there and configure the sensors/actuators to communicate on that channel, say 124.

            When I setup the MQTT gateway for building B, can I publish/subscribe to the same topic prefix as building A's gateway or do they need to be different? If both "networks" had a relay node 1, would telling one of them to "turn off" cause them both to turn off. I imagine the payloads would be the same?

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

            @namomitk I think you would need different topics. As you said, there would be trouble differentiating the nodes otherwise.

            N 1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              @namomitk I think you would need different topics. As you said, there would be trouble differentiating the nodes otherwise.

              N Offline
              N Offline
              namomitk
              wrote on last edited by namomitk
              #6

              Edit: Found this in the forums. Is it still relevant or did 1.6.15/16 solve the issue? https://forum.mysensors.org/topic/4680/mysensors-2-0-ethernet-gateway-atmega-w5100-restart-all-time/3

              I've setup the UNO with the default sketch and made the changes to make it a separate gateway.

              I'm seeing the following on repeat. I've tried a few changes here or there to no success.

              Serial output shows:

              IP: 192.168.4.35
              0;255;3;0;9;Attempting MQTT connection...
              0;255;3;0;9;MQTT connected
              0;255;3;0;9;Sending message on topic: mysensors-outb/0/255/0/0/18
              0;255;3;0;9;Message arrived on topic: mysensors-inb/3/255/3/0/6
              0;255;3;0;9;!TSF:MSG:SEND,0-0-3-3,s=255,c=3,t=6,pt=0,l=1,sg=0,ft=0,st=NACK:I
              0;255;3;0;9;MCO:BGN:INIT GW,CP=RNNGA--,VER=2.1.0
              0;255;3;0;9;TSM:INIT
              0;255;3;0;9;TSF:WUR:MS=0
              0;255;3;0;9;TSM:INIT:TSP OK
              0;255;3;0;9;TSM:INIT:GW MODE
              0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
              0;255;3;0;9;MCO:REG:NOT NEEDED

              Mosquitto log shows:

              1483156702: New connection from 192.168.4.35 on port 1883.
              1483156702: New client connected from 192.168.4.35 as mygateway2 (c1, k15, u'pi').
              1483156717: Socket error on client mygateway2, disconnecting.

              Any ideas?

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


              20

              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