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 Raspberry Pi Gateway

💬 Building a Raspberry Pi Gateway

Scheduled Pinned Locked Moved Announcements
1.1k Posts 173 Posters 428.4k Views 131 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.
  • gohanG Offline
    gohanG Offline
    gohan
    Mod
    wrote on last edited by
    #763

    @alowhum said in 💬 Building a Raspberry Pi Gateway:

    PiGPIO

    what are you using that for?

    1 Reply Last reply
    0
    • alowhumA alowhum

      @MasMat Yes I was able to build it on a Pi Zero. I did a fresh install on Dietpi. It worked fine when I didn't give any configuration options.

      Now, however, I am still trying to run something on the PGIO pins in paralel to MySensors again, and this is not working. As I speak the Pi reboots every 5 minutes.. Not sure what to blame yet. Domoticz, PiGPIO, or MySensors.

      Latest DietPi Stretch, latest Domoticz beta, latest MySensors beta.

      MasMatM Offline
      MasMatM Offline
      MasMat
      wrote on last edited by
      #764

      @alowhum I'm not using the GPIO for anything else.
      I had everything working (mysgw-MQTT, Mosquitto, Node-Red and OH2) for almost 6h. Then I moved the set-up and everything went south: cant get mosquitto to start, cant get mysgw to connect to that or another Mosquitto broker, OH2 seems to ignore everything...
      Spent the last 24h trying to resurrect Mosquitto but it's beyond me what's wrong.

      I remember reading that mysgw renders rest of the gpio unusable. Maybe that's giving you problems.

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

        I am running 2 gateway instances, one nrf24 and one rfm69 so I guess you can run other things

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

          @gohan: but you had to do a lot of black magic to get there right?

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

            not at all, I just followed the guide in the forum

            1 Reply Last reply
            0
            • MasMatM MasMat

              @alowhum I'm not using the GPIO for anything else.
              I had everything working (mysgw-MQTT, Mosquitto, Node-Red and OH2) for almost 6h. Then I moved the set-up and everything went south: cant get mosquitto to start, cant get mysgw to connect to that or another Mosquitto broker, OH2 seems to ignore everything...
              Spent the last 24h trying to resurrect Mosquitto but it's beyond me what's wrong.

              I remember reading that mysgw renders rest of the gpio unusable. Maybe that's giving you problems.

              alowhumA Offline
              alowhumA Offline
              alowhum
              Plugin Developer
              wrote on last edited by
              #768

              @masmat I got the Pi Zero W working fine with other things using the GPIO.

              • A fresh install helped
              • It could be that I now use the PiGPIO library for the project.
              • It could be the switch to another powersupply. I was using the official pi powersupply, but I suspect something was wrong with it. A cheap 3A chinese adapter is working fine.

              Either way: it all works now.

              I have a few n00bish questions about enabling encryption (without signing, so save space and ram):

              • Is putting an AES key in MyConfig.h really all I have to do? Don't I also have to put that in all the sensor nodes? And is that proces complicated, using a signing sketch and whatnot?
              • Can I have an 'opportunistic' network, where I have some encrypted nodes, and some unencrypted ones? If I could mix them this would make switching to encryption less stressful. I can't easily change two of my nodes.
              • If I change the network, I'd like to move the NRF to channel 100 (juist outside of the normal WiFi frequencies). Do I also have to set that in all nodes, or is setting it in the gateway enough?
              gohanG 1 Reply Last reply
              0
              • AnticimexA Offline
                AnticimexA Offline
                Anticimex
                Contest Winner
                wrote on last edited by
                #769

                @alowhum encryption is all or nothing. You can't leave one node without encryption if your gateway encrypts the messages it send.
                And you will need to personalize your nodes to get the AES key into them. The documentation on security describes that process.

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

                1 Reply Last reply
                0
                • alowhumA alowhum

                  @masmat I got the Pi Zero W working fine with other things using the GPIO.

                  • A fresh install helped
                  • It could be that I now use the PiGPIO library for the project.
                  • It could be the switch to another powersupply. I was using the official pi powersupply, but I suspect something was wrong with it. A cheap 3A chinese adapter is working fine.

                  Either way: it all works now.

                  I have a few n00bish questions about enabling encryption (without signing, so save space and ram):

                  • Is putting an AES key in MyConfig.h really all I have to do? Don't I also have to put that in all the sensor nodes? And is that proces complicated, using a signing sketch and whatnot?
                  • Can I have an 'opportunistic' network, where I have some encrypted nodes, and some unencrypted ones? If I could mix them this would make switching to encryption less stressful. I can't easily change two of my nodes.
                  • If I change the network, I'd like to move the NRF to channel 100 (juist outside of the normal WiFi frequencies). Do I also have to set that in all nodes, or is setting it in the gateway enough?
                  gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #770

                  @alowhum if you put it in myconfig.h also on the arduino library you can just recompile the nodes and you are good.

                  AnticimexA 1 Reply Last reply
                  0
                  • gohanG gohan

                    @alowhum if you put it in myconfig.h also on the arduino library you can just recompile the nodes and you are good.

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

                    @gohan not anymore. Only for pre 2.2.0 releases.

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

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

                      It is still working on mine 😅

                      AnticimexA 1 Reply Last reply
                      0
                      • gohanG gohan

                        It is still working on mine 😅

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

                        @gohan in other words, you use an old release ;)

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

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

                          I can assure you I am using 2.2 from development as I am also running new driver. So unless you changed something in the last 3 weeks on the development branch it still works, unless the nodes are keeping the key saved.

                          AnticimexA 2 Replies Last reply
                          0
                          • gohanG gohan

                            I can assure you I am using 2.2 from development as I am also running new driver. So unless you changed something in the last 3 weeks on the development branch it still works, unless the nodes are keeping the key saved.

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

                            @gohan have you verified your communications are actually encrypted?

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

                            gohanG 1 Reply Last reply
                            0
                            • gohanG gohan

                              I can assure you I am using 2.2 from development as I am also running new driver. So unless you changed something in the last 3 weeks on the development branch it still works, unless the nodes are keeping the key saved.

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

                              @gohan If you see here, you will find that unless you use the simple password option, AES key is fetched from EEPROM: https://github.com/mysensors/MySensors/blob/28c4f3f19e7026f56fd9bbc61d566f770fd7a9d2/hal/transport/MyTransportRF24.cpp#L68
                              So either you are using the simple flag, nothing at all, or not using the key you think you use.

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

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

                                I ll have to check, but I put the key in the gateway myconfig.h

                                AnticimexA 1 Reply Last reply
                                0
                                • gohanG gohan

                                  I ll have to check, but I put the key in the gateway myconfig.h

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

                                  @gohan Perhaps on a rpi GW where there is no EEPROM, but I am talking about the nodes.

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

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

                                    Well, if I have communication working it means the node should be encrypting data. I'll have to try with clear eeprom and try flashing sketch again

                                    AnticimexA 1 Reply Last reply
                                    0
                                    • gohanG gohan

                                      Well, if I have communication working it means the node should be encrypting data. I'll have to try with clear eeprom and try flashing sketch again

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

                                      @gohan not if there is no encryption at all. You could try to use simple password option on a node with various passwords and see if it is detected by your gw at all.

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

                                      1 Reply Last reply
                                      0
                                      • AnticimexA Anticimex

                                        @gohan have you verified your communications are actually encrypted?

                                        gohanG Offline
                                        gohanG Offline
                                        gohan
                                        Mod
                                        wrote on last edited by
                                        #781

                                        @anticimex I guess you were right... the gw and node aren't using the AES key. So where am I supposed to add it in the gateway?

                                        AnticimexA 1 Reply Last reply
                                        0
                                        • gohanG gohan

                                          @anticimex I guess you were right... the gw and node aren't using the AES key. So where am I supposed to add it in the gateway?

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

                                          @gohan you set that with the configure arguments I suspect, but I can't see it in the documentation. @marceloaqno perhaps knows how the rPi port handles this. I'm on a phone so I can't check the code easily. But you should be able to find it in the transport driver for rPi. On the rPi it can probably be defined in the code as it does not have a personalizer.

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

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


                                          24

                                          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