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. General Discussion
  3. How does mysensors relate to MQTT?

How does mysensors relate to MQTT?

Scheduled Pinned Locked Moved General Discussion
18 Posts 4 Posters 4.0k Views 4 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.
  • TheoLT TheoL

    @NeverDie Regardless of trying to argue on your idea of having multiple MQTT gateways. There's a single reason that might raise some problems.

    At the moment MySensors has no network ID (like Wifi has). So having multiple MQTT gateways in different locations of your house, might cause multiple MQTT gateways to pick up the same message from one particular Node. This means that the data of that sensors can be received by multiple MQTT gateways. Also, if you use ACK it would mean that each gateway will ACK to that Node causing errors on the gateways that didn't send an ACK as first.

    I'm interested in your solution.

    Another thing that I would not like to experience is having to reset all the SID settings in each node when the router you get from your ISP is being replaced with a new one. Happened to me once and I had to update a lot of devices. That's why I like MySensors and prefer not to use WiFi for my sensors and nodes.

    NeverDieN Offline
    NeverDieN Offline
    NeverDie
    Hero Member
    wrote on last edited by NeverDie
    #8

    @TheoL said:

    @NeverDie Regardless of trying to argue on your idea of having multiple MQTT gateways. There's a single reason that might raise some problems.

    At the moment MySensors has no network ID (like Wifi has). So having multiple MQTT gateways in different locations of your house, might cause multiple MQTT gateways to pick up the same message from one particular Node. This means that the data of that sensors can be received by multiple MQTT gateways. Also, if you use ACK it would mean that each gateway will ACK to that Node causing errors on the gateways that didn't send an ACK as first.

    I'm interested in your solution.

    That could be handled in different ways, but the simplest is to have each MQTT gateway use a different channel, and each node communicates with just one gateway (but each gateway has the potential to talk with however many nodes are assigned to it). Each RFM69 can have about 50 non-overlapping channels. So, you could have up to 50 gateways on different channels. I don't think there's a house big enough that would need more than 50 gateways. For most, one or two or three would be enough.

    Regarding the SID settings, I'm not sure I understand what the issue is. I just assign each esp8266 a static IP address of of the form 192.168.x.y using the router setup. Actually, on mine, it happens automatically during the initial node setup, but that may be particular to my router.

    TheoLT 1 Reply Last reply
    0
    • NeverDieN NeverDie

      @TheoL said:

      @NeverDie Regardless of trying to argue on your idea of having multiple MQTT gateways. There's a single reason that might raise some problems.

      At the moment MySensors has no network ID (like Wifi has). So having multiple MQTT gateways in different locations of your house, might cause multiple MQTT gateways to pick up the same message from one particular Node. This means that the data of that sensors can be received by multiple MQTT gateways. Also, if you use ACK it would mean that each gateway will ACK to that Node causing errors on the gateways that didn't send an ACK as first.

      I'm interested in your solution.

      That could be handled in different ways, but the simplest is to have each MQTT gateway use a different channel, and each node communicates with just one gateway (but each gateway has the potential to talk with however many nodes are assigned to it). Each RFM69 can have about 50 non-overlapping channels. So, you could have up to 50 gateways on different channels. I don't think there's a house big enough that would need more than 50 gateways. For most, one or two or three would be enough.

      Regarding the SID settings, I'm not sure I understand what the issue is. I just assign each esp8266 a static IP address of of the form 192.168.x.y using the router setup. Actually, on mine, it happens automatically during the initial node setup, but that may be particular to my router.

      TheoLT Offline
      TheoLT Offline
      TheoL
      Contest Winner
      wrote on last edited by
      #9

      @NeverDie it might be me. But I haven't found a way of letting a node communicate to a dedicated Gateway. Really interested if you find a way of doing that.

      NeverDieN 1 Reply Last reply
      0
      • TheoLT TheoL

        @NeverDie it might be me. But I haven't found a way of letting a node communicate to a dedicated Gateway. Really interested if you find a way of doing that.

        NeverDieN Offline
        NeverDieN Offline
        NeverDie
        Hero Member
        wrote on last edited by NeverDie
        #10

        @TheoL said:

        @NeverDie it might be me. But I haven't found a way of letting a node communicate to a dedicated Gateway. Really interested if you find a way of doing that.

        You can program an esp8266 just like an arduino now, even using the same Arduino IDE. Except it's faster and has more memory. So, instead of an atmega328p controlling an rfm69 or nrf24, you just have the esp8266 do it. You can even use the same sketch as before. That's the basis for your gateway. Your battery powered nodes still work the old way (i.e. controlled by an atmega328p, because it's more power efficient).

        TheoLT 1 Reply Last reply
        1
        • NeverDieN NeverDie

          @TheoL said:

          @NeverDie it might be me. But I haven't found a way of letting a node communicate to a dedicated Gateway. Really interested if you find a way of doing that.

          You can program an esp8266 just like an arduino now, even using the same Arduino IDE. Except it's faster and has more memory. So, instead of an atmega328p controlling an rfm69 or nrf24, you just have the esp8266 do it. You can even use the same sketch as before. That's the basis for your gateway. Your battery powered nodes still work the old way (i.e. controlled by an atmega328p, because it's more power efficient).

          TheoLT Offline
          TheoLT Offline
          TheoL
          Contest Winner
          wrote on last edited by
          #11

          @NeverDie I understand what you mean. Interesting idea. But I'll stick to the normal radio's. Not that fund of Wifi as my WiFi signal is weak because of neighbors with more powerful routers.

          I haven't really looked into the ESP. But you might know the answer. Can you install a TLS certificate on it?

          NeverDieN 1 Reply Last reply
          0
          • TheoLT TheoL

            @NeverDie I understand what you mean. Interesting idea. But I'll stick to the normal radio's. Not that fund of Wifi as my WiFi signal is weak because of neighbors with more powerful routers.

            I haven't really looked into the ESP. But you might know the answer. Can you install a TLS certificate on it?

            NeverDieN Offline
            NeverDieN Offline
            NeverDie
            Hero Member
            wrote on last edited by NeverDie
            #12

            @TheoL said:

            @NeverDie I understand what you mean. Interesting idea. But I'll stick to the normal radio's. Not that fund of Wifi as my WiFi signal is weak because of neighbors with more powerful routers.

            I haven't really looked into the ESP. But you might know the answer. Can you install a TLS certificate on it?

            You just need a better wifi router. :-) Get a multi-band one with 4x4 MIMO.

            I haven't looked into TLS.

            NeverDieN 1 Reply Last reply
            0
            • NeverDieN NeverDie

              @TheoL said:

              @NeverDie I understand what you mean. Interesting idea. But I'll stick to the normal radio's. Not that fund of Wifi as my WiFi signal is weak because of neighbors with more powerful routers.

              I haven't really looked into the ESP. But you might know the answer. Can you install a TLS certificate on it?

              You just need a better wifi router. :-) Get a multi-band one with 4x4 MIMO.

              I haven't looked into TLS.

              NeverDieN Offline
              NeverDieN Offline
              NeverDie
              Hero Member
              wrote on last edited by
              #13

              Here's an example of an esp8266 that's controlling an RFM69 with a dipole antenna. The footprint is barely larger than a US$ 25 cent piece.

              alt text

              1 Reply Last reply
              0
              • AnticimexA Offline
                AnticimexA Offline
                Anticimex
                Contest Winner
                wrote on last edited by
                #14

                Exposing all of your sensors and actuators to WiFi is a bad idea from a security point of view. But all is relative.

                Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                1 Reply Last reply
                3
                • NeverDieN Offline
                  NeverDieN Offline
                  NeverDie
                  Hero Member
                  wrote on last edited by
                  #15

                  If security is a dominant concern, you could build everything using LoRa, which is inherently more secure.

                  Anyhow, I use wi-fi on my laptop, and I don't lose sleep over it. Should I? I mean one could always use SSH tunneling if you were extremely concerned. Wouldn't that be good enough?

                  AnticimexA 1 Reply Last reply
                  0
                  • NeverDieN NeverDie

                    If security is a dominant concern, you could build everything using LoRa, which is inherently more secure.

                    Anyhow, I use wi-fi on my laptop, and I don't lose sleep over it. Should I? I mean one could always use SSH tunneling if you were extremely concerned. Wouldn't that be good enough?

                    AnticimexA Offline
                    AnticimexA Offline
                    Anticimex
                    Contest Winner
                    wrote on last edited by
                    #16

                    @NeverDie your laptop is not moving the metal part in your door lock (in case you have remote control of your door lock). But more importantly, I would not like to have any yokel with a laptop drive by and be able to interfere with my nodes. And as I understand it, LoRa heavily throttles communication and I don't see how it is more secure.

                    Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                    1 Reply Last reply
                    1
                    • NeverDieN Offline
                      NeverDieN Offline
                      NeverDie
                      Hero Member
                      wrote on last edited by NeverDie
                      #17

                      Well,

                      1. Lora is spread spectrum, and it can operate below the noise floor, so it's harder to even detect it. LoRa can demodulate signals that are 20dB below the noise floor.
                      2. Likewise, it's more resistant to jamming.
                      3. I don't think some yokel will drive by with anything capable of messing with it, because he won't know you have it in the first place.

                      I have z-wave that I installed way back when, and that's far more hackable by a black hat than any of this stuff. Like you say, it's all relative. For all I know some foreign government could unleash a new type of stuxnet designed to criple esp8266's, no matter what the collateral damage, so I can't say the risk is zero. I just think it's vanishingly small.

                      AnticimexA 1 Reply Last reply
                      0
                      • NeverDieN NeverDie

                        Well,

                        1. Lora is spread spectrum, and it can operate below the noise floor, so it's harder to even detect it. LoRa can demodulate signals that are 20dB below the noise floor.
                        2. Likewise, it's more resistant to jamming.
                        3. I don't think some yokel will drive by with anything capable of messing with it, because he won't know you have it in the first place.

                        I have z-wave that I installed way back when, and that's far more hackable by a black hat than any of this stuff. Like you say, it's all relative. For all I know some foreign government could unleash a new type of stuxnet designed to criple esp8266's, no matter what the collateral damage, so I can't say the risk is zero. I just think it's vanishingly small.

                        AnticimexA Offline
                        AnticimexA Offline
                        Anticimex
                        Contest Winner
                        wrote on last edited by
                        #18

                        @NeverDie sounds like mysensors is not your cup of tea then.

                        Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

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


                        19

                        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