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. Announcements
  3. 💬 Building a Serial Gateway

💬 Building a Serial Gateway

Scheduled Pinned Locked Moved Announcements
52 Posts 21 Posters 9.3k Views 20 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.
  • alowhumA alowhum

    Is it possible to get a list of all attached nodes? I'd like to attach a TFT screen to the gateway that shows all the connected devices.

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

    @alowhum there is no such thing as an attachment in a MySensors network.

    Nodes send messages whenever they like. The nodes may go to sleep at any time, which would make them unavailable.

    The gateway does not store information about when a node last communicated, nor about which child sensors have been presented.

    1 Reply Last reply
    0
    • alowhumA Offline
      alowhumA Offline
      alowhum
      Plugin Developer
      wrote on last edited by
      #38

      @mfalkvidd Thanks. Would it be possible to generate that list somehow? Perhaps by listening to what nodes connect to it?

      It doesn't matter if they are offline or not, it doesn't have to be perfect.

      mfalkviddM 1 Reply Last reply
      0
      • alowhumA alowhum

        @mfalkvidd Thanks. Would it be possible to generate that list somehow? Perhaps by listening to what nodes connect to it?

        It doesn't matter if they are offline or not, it doesn't have to be perfect.

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

        @alowhum yes. That's how a controller learns about the nodes :)

        1 Reply Last reply
        0
        • alowhumA Offline
          alowhumA Offline
          alowhum
          Plugin Developer
          wrote on last edited by
          #40

          But could the gateway itself do it too? If so, do you have any suggestions on where I should start? How can I "hook into" the gateway to find out what devices are communicating with it? Is there example code of this?

          mfalkviddM 1 Reply Last reply
          0
          • alowhumA alowhum

            But could the gateway itself do it too? If so, do you have any suggestions on where I should start? How can I "hook into" the gateway to find out what devices are communicating with it? Is there example code of this?

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

            @alowhum yes you could build a controller into the gateway.

            The receive function will be called for each incoming message. You can react to the messages inside receive().

            1 Reply Last reply
            0
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by
              #42

              These threads might be useful
              https://forum.mysensors.org/topic/1973/esp8266-as-wifi-gateway-controller-node
              https://forum.mysensors.org/topic/4528/esp8266-as-a-gateway-and-controller

              1 Reply Last reply
              0
              • alowhumA Offline
                alowhumA Offline
                alowhum
                Plugin Developer
                wrote on last edited by
                #43

                Thanks!!

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  rodaman
                  wrote on last edited by
                  #44

                  After 3 years of using RADIO_RF24 i replaced my all sensors with espeasy. It was just big battle with lost transmissions, disconnections, every day problems. Now for many days silence...Everything works.I still use mysensors in diferrent setup but NRF Radio is asking for trouble.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    maaaaaaaaaartin
                    wrote on last edited by maaaaaaaaaartin
                    #45

                    I tried building a serial gateway using an Arduino Nano, but it never worked (both gateway and node start, but node keeps saying NO REPLY). I used the same NRF24 module directly on the Raspberry Pi, and built a Raspberry Pi gateway, it worked perfectly. Any idea on what might be going on? Thanks!

                    mfalkviddM 1 Reply Last reply
                    0
                    • M maaaaaaaaaartin

                      I tried building a serial gateway using an Arduino Nano, but it never worked (both gateway and node start, but node keeps saying NO REPLY). I used the same NRF24 module directly on the Raspberry Pi, and built a Raspberry Pi gateway, it worked perfectly. Any idea on what might be going on? Thanks!

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

                      @maaaaaaaaaartin most common problem is that the power source is not stable enough for the nrf24.

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        APL2017
                        wrote on last edited by
                        #47

                        Can serial gateway be build on Atmel 168 chip instead of 328 in terms of memory? It compiles fine, but leaves little extra memory for variables.

                        mfalkviddM 1 Reply Last reply
                        0
                        • A APL2017

                          Can serial gateway be build on Atmel 168 chip instead of 328 in terms of memory? It compiles fine, but leaves little extra memory for variables.

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

                          @APL2017 how much is left?

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            APL2017
                            wrote on last edited by APL2017
                            #49

                            Sketch uses 13634 bytes (95%) of program storage space. Maximum is 14336 bytes. Global variables use 731 bytes (71%) of dynamic memory, leaving 293 bytes for local variables. Maximum is 1024 bytes.

                            I noticed parsing error in my controller log and switched to 328P. I bought 168P by mistake and wondering how I can use it. Does simple mySensors node require less ROM/RAM than gateway?

                            mfalkviddM 1 Reply Last reply
                            0
                            • A APL2017

                              Sketch uses 13634 bytes (95%) of program storage space. Maximum is 14336 bytes. Global variables use 731 bytes (71%) of dynamic memory, leaving 293 bytes for local variables. Maximum is 1024 bytes.

                              I noticed parsing error in my controller log and switched to 328P. I bought 168P by mistake and wondering how I can use it. Does simple mySensors node require less ROM/RAM than gateway?

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

                              @APL2017 a very simple node, yes. But a node using a sensor library can often need more flash and ram than a gateway. I have tried to fit things into the atmega168 (I also bought wrong devices) but gave up. Unless you think it is a fun and interesting challenge, it will not be worth the time.

                              A 1 Reply Last reply
                              1
                              • mfalkviddM mfalkvidd

                                @APL2017 a very simple node, yes. But a node using a sensor library can often need more flash and ram than a gateway. I have tried to fit things into the atmega168 (I also bought wrong devices) but gave up. Unless you think it is a fun and interesting challenge, it will not be worth the time.

                                A Offline
                                A Offline
                                APL2017
                                wrote on last edited by
                                #51

                                @mfalkvidd Thank you, I will donate 168P to some other Arduino enthusiast.

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  mariusl
                                  wrote on last edited by
                                  #52

                                  Why would the gateway send a NACK to any node? The node only received one OK and then just NACK
                                  17764 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=1,st=OK:
                                  22773 !TSM:FPAR:NO REPLY
                                  22775 TSM:FPAR
                                  29779 ?TSF:MSG:SEND,1-1-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=NACK:
                                  34789 !TSM:FPAR:NO REPLY
                                  34791 TSM:FPAR

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


                                  13

                                  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