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 425.0k 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.
  • E Offline
    E Offline
    ewgor
    wrote on last edited by
    #164

    Hi there,
    I'm trying to make a gateway on my pi and since the begining i'm stuck!
    Using this: git clone https://github.com/mysensors/MySensors.git
    i get: fatal: unable to access 'https://github.com/mysensors/MySensors.git/': Could not resolve host: github.com
    I tried with sudo too! am i the only one getting this?

    mfalkviddM 1 Reply Last reply
    0
    • E ewgor

      Hi there,
      I'm trying to make a gateway on my pi and since the begining i'm stuck!
      Using this: git clone https://github.com/mysensors/MySensors.git
      i get: fatal: unable to access 'https://github.com/mysensors/MySensors.git/': Could not resolve host: github.com
      I tried with sudo too! am i the only one getting this?

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

      @ewgor "Could not resolve host" means dns is not working on your raspberry pi. Is the network working properly (can you access other web sites from the pi?) http://www.suntimebox.com/raspberry-pi-tutorial-course/week-3/day-5/ seems to have a guide if you need help configuring network settings.

      Velo17V 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @ewgor "Could not resolve host" means dns is not working on your raspberry pi. Is the network working properly (can you access other web sites from the pi?) http://www.suntimebox.com/raspberry-pi-tutorial-course/week-3/day-5/ seems to have a guide if you need help configuring network settings.

        Velo17V Offline
        Velo17V Offline
        Velo17
        wrote on last edited by Velo17
        #166

        (sorry, I hit reply on mfalkvidd's post)
        I have a strange problem:

        I tried to be smart (haha) and updated my Raspberry2 with

        sudo apt-get update
        sudo apt-get dist-upgrade
        

        This took quite a while and looked successful to me.

        Unfortunately the MySensors Gateway and/or controller setup is not working correctly anymore. For troubleshooting I disabled my controller (MyController running on the Pi and for sniffing also MYSController available on my Windows machine). I stopped the gateway service and manually ran the gateway with -d debug information and get this:

        mysGateway: Starting gateway...
        mysGateway: Protocol version - 2.0.1-beta
        mysGateway: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
        mysGateway: TSF:LRT:OK
        mysGateway: TSM:INIT
        mysGateway: TSM:INIT:TSP OK
        mysGateway: TSM:INIT:GW MODE
        mysGateway: TSM:READY
        mysGateway: Listening for connections on 0.0.0.0:5003
        mysGateway: MCO:REG:NOT NEEDED
        mysGateway: MCO:BGN:STP
        mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
        mysGateway: TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
        mysGateway: TSF:MSG:BC
        mysGateway: TSF:MSG:FPAR REQ,ID=7
        mysGateway: TSF:PNG:SEND,TO=0
        mysGateway: TSF:CKU:OK
        mysGateway: TSF:MSG:GWL OK
        mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
        mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
        mysGateway: TSF:MSG:PINGED,ID=7,HP=1
        mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
        mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
        mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
        mysGateway: TSF:MSG:READ,7-7-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.0.0
        mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
        mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=11,pt=0,l=17,sg=0:Ernie Giess-O-Mat
        mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=12,pt=0,l=4,sg=0:0.17
        mysGateway: TSF:MSG:READ,7-7-0,s=2,c=0,t=6,pt=0,l=0,sg=0:
        mysGateway: TSF:MSG:READ,7-7-0,s=0,c=0,t=7,pt=0,l=0,sg=0:
        mysGateway: TSF:MSG:READ,7-7-0,s=3,c=0,t=30,pt=0,l=0,sg=0:
        mysGateway: TSF:MSG:READ,7-7-0,s=4,c=0,t=21,pt=0,l=0,sg=0:
        mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
        mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
        mysGateway: TSF:MSG:READ,7-7-0,s=0,c=1,t=1,pt=7,l=5,sg=0:8219.0
        mysGateway: TSF:MSG:READ,7-7-0,s=2,c=1,t=0,pt=7,l=5,sg=0:29.66
        mysGateway: TSF:MSG:READ,7-7-0,s=3,c=1,t=38,pt=7,l=5,sg=0:9.0
        mysGateway: TSF:MSG:READ,7-7-0,s=4,c=1,t=34,pt=1,l=1,sg=0:0
        mysGateway: TSF:MSG:READ,17-17-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
        mysGateway: TSF:MSG:BC
        mysGateway: TSF:MSG:FPAR REQ,ID=17
        mysGateway: TSF:PNG:SEND,TO=0
        mysGateway: TSF:CKU:OK
        mysGateway: TSF:MSG:GWL OK
        mysGateway: TSF:MSG:SEND,0-0-17-17,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
        mysGateway: TSF:MSG:READ,17-17-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
        mysGateway: TSF:MSG:PINGED,ID=17,HP=1
        mysGateway: TSF:MSG:SEND,0-0-17-17,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
        mysGateway: TSF:MSG:READ,7-7-0,s=0,c=1,t=1,pt=7,l=5,sg=0:10834.0
        mysGateway: TSF:MSG:READ,7-7-0,s=2,c=1,t=0,pt=7,l=5,sg=0:3.96
        mysGateway: TSF:MSG:READ,7-7-0,s=3,c=1,t=38,pt=7,l=5,sg=0:9.0
        mysGateway: TSF:MSG:READ,7-7-0,s=4,c=1,t=34,pt=1,l=1,sg=0:0
        mysGateway: TSF:MSG:READ,17-17-0,s=255,c=3,t=0,pt=1,l=1,sg=0:67
        mysGateway: TSF:MSG:READ,17-17-0,s=1,c=1,t=0,pt=7,l=5,sg=0:18.8
        mysGateway: TSM:READY:NWD REQ
        mysGateway: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
        mysGateway: TSF:SRT:OK
        

        Which looks okay to me (2 sensor nodes are sending data here). But after this NWD REQ...STR:OK block nothing more happens, only more of these 3 lines blocks repeat over and over with about 15 minutes or so inbetween.

        "of course" I also re-compiled the gateway source with re-setting the configuration, which is

        sudo ./configure --my-rf24-channel=124 --my-rf24-irq-pin=11  --my-debug=enable
        sudo make install
        

        any ideas what I can try to make it work again? :-(

        In any case, happy weekend to everyone,
        greetings from Germany!

        M 1 Reply Last reply
        0
        • Velo17V Velo17

          (sorry, I hit reply on mfalkvidd's post)
          I have a strange problem:

          I tried to be smart (haha) and updated my Raspberry2 with

          sudo apt-get update
          sudo apt-get dist-upgrade
          

          This took quite a while and looked successful to me.

          Unfortunately the MySensors Gateway and/or controller setup is not working correctly anymore. For troubleshooting I disabled my controller (MyController running on the Pi and for sniffing also MYSController available on my Windows machine). I stopped the gateway service and manually ran the gateway with -d debug information and get this:

          mysGateway: Starting gateway...
          mysGateway: Protocol version - 2.0.1-beta
          mysGateway: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.0.1-beta
          mysGateway: TSF:LRT:OK
          mysGateway: TSM:INIT
          mysGateway: TSM:INIT:TSP OK
          mysGateway: TSM:INIT:GW MODE
          mysGateway: TSM:READY
          mysGateway: Listening for connections on 0.0.0.0:5003
          mysGateway: MCO:REG:NOT NEEDED
          mysGateway: MCO:BGN:STP
          mysGateway: MCO:BGN:INIT OK,ID=0,PAR=0,DIS=0,REG=1
          mysGateway: TSF:MSG:READ,7-7-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
          mysGateway: TSF:MSG:BC
          mysGateway: TSF:MSG:FPAR REQ,ID=7
          mysGateway: TSF:PNG:SEND,TO=0
          mysGateway: TSF:CKU:OK
          mysGateway: TSF:MSG:GWL OK
          mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
          mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
          mysGateway: TSF:MSG:PINGED,ID=7,HP=1
          mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
          mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
          mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
          mysGateway: TSF:MSG:READ,7-7-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.0.0
          mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
          mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=11,pt=0,l=17,sg=0:Ernie Giess-O-Mat
          mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=12,pt=0,l=4,sg=0:0.17
          mysGateway: TSF:MSG:READ,7-7-0,s=2,c=0,t=6,pt=0,l=0,sg=0:
          mysGateway: TSF:MSG:READ,7-7-0,s=0,c=0,t=7,pt=0,l=0,sg=0:
          mysGateway: TSF:MSG:READ,7-7-0,s=3,c=0,t=30,pt=0,l=0,sg=0:
          mysGateway: TSF:MSG:READ,7-7-0,s=4,c=0,t=21,pt=0,l=0,sg=0:
          mysGateway: TSF:MSG:READ,7-7-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
          mysGateway: TSF:MSG:SEND,0-0-7-7,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
          mysGateway: TSF:MSG:READ,7-7-0,s=0,c=1,t=1,pt=7,l=5,sg=0:8219.0
          mysGateway: TSF:MSG:READ,7-7-0,s=2,c=1,t=0,pt=7,l=5,sg=0:29.66
          mysGateway: TSF:MSG:READ,7-7-0,s=3,c=1,t=38,pt=7,l=5,sg=0:9.0
          mysGateway: TSF:MSG:READ,7-7-0,s=4,c=1,t=34,pt=1,l=1,sg=0:0
          mysGateway: TSF:MSG:READ,17-17-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
          mysGateway: TSF:MSG:BC
          mysGateway: TSF:MSG:FPAR REQ,ID=17
          mysGateway: TSF:PNG:SEND,TO=0
          mysGateway: TSF:CKU:OK
          mysGateway: TSF:MSG:GWL OK
          mysGateway: TSF:MSG:SEND,0-0-17-17,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
          mysGateway: TSF:MSG:READ,17-17-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
          mysGateway: TSF:MSG:PINGED,ID=17,HP=1
          mysGateway: TSF:MSG:SEND,0-0-17-17,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
          mysGateway: TSF:MSG:READ,7-7-0,s=0,c=1,t=1,pt=7,l=5,sg=0:10834.0
          mysGateway: TSF:MSG:READ,7-7-0,s=2,c=1,t=0,pt=7,l=5,sg=0:3.96
          mysGateway: TSF:MSG:READ,7-7-0,s=3,c=1,t=38,pt=7,l=5,sg=0:9.0
          mysGateway: TSF:MSG:READ,7-7-0,s=4,c=1,t=34,pt=1,l=1,sg=0:0
          mysGateway: TSF:MSG:READ,17-17-0,s=255,c=3,t=0,pt=1,l=1,sg=0:67
          mysGateway: TSF:MSG:READ,17-17-0,s=1,c=1,t=0,pt=7,l=5,sg=0:18.8
          mysGateway: TSM:READY:NWD REQ
          mysGateway: TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
          mysGateway: TSF:SRT:OK
          

          Which looks okay to me (2 sensor nodes are sending data here). But after this NWD REQ...STR:OK block nothing more happens, only more of these 3 lines blocks repeat over and over with about 15 minutes or so inbetween.

          "of course" I also re-compiled the gateway source with re-setting the configuration, which is

          sudo ./configure --my-rf24-channel=124 --my-rf24-irq-pin=11  --my-debug=enable
          sudo make install
          

          any ideas what I can try to make it work again? :-(

          In any case, happy weekend to everyone,
          greetings from Germany!

          M Offline
          M Offline
          marceloaqno
          Code Contributor
          wrote on last edited by marceloaqno
          #167

          @Velo17 It might be related to the nrf24 irq pin. Could you try to build the gateway without the my-rf24-irq-pin option and check if the gateway still behaves this way?

          Velo17V 1 Reply Last reply
          1
          • M marceloaqno

            @Velo17 It might be related to the nrf24 irq pin. Could you try to build the gateway without the my-rf24-irq-pin option and check if the gateway still behaves this way?

            Velo17V Offline
            Velo17V Offline
            Velo17
            wrote on last edited by
            #168

            @marceloaqno Thanks for the hint! This actually solves the lock up. But shouldnt the interrupt offer a superior connectivity and thus be desireable? Until yesterday (before I did the RPi upgrading) this worked - or at least it appeared to work (I dont know if the interrupt was actually used)

            M 1 Reply Last reply
            0
            • Velo17V Velo17

              @marceloaqno Thanks for the hint! This actually solves the lock up. But shouldnt the interrupt offer a superior connectivity and thus be desireable? Until yesterday (before I did the RPi upgrading) this worked - or at least it appeared to work (I dont know if the interrupt was actually used)

              M Offline
              M Offline
              marceloaqno
              Code Contributor
              wrote on last edited by
              #169

              @Velo17 I had the same problem in the past but I thought it was because of my nrf24 module wasn't properly shielded or my cables was too long, causing some kind of interference to the irq pin.
              I end up disabling the interrupt options until I replace my nrf24 module or rearrange the cables, which I haven't done yet.

              Could you give more details on what kind of nrf module you are using and how it is connected to rpi?

              1 Reply Last reply
              0
              • P Offline
                P Offline
                pettib
                wrote on last edited by
                #170

                Hi everyone.
                I´m trying to build a new homeController with the following parts / software.

                Raspberry Pi 3
                Home Assistant
                MySensors
                Tellstick
                Mosquitto MQTT Broker

                I got everything working beside the MySensors. I´m trying to connect the NRF 24L01+ chip directly to the RPI with help from https://www.mysensors.org/build/raspberry.

                I want to use MQTT between MySensors and HomeAssistant
                The MQTT broker is working when i´m testing it.
                The Mosquitto is configurated with username and Password in the config of Mosquitto.

                The config i´m using when Make Mysensors is the following:
                ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-transport=nrf24 --my-rf24-irq-pin=15

                I also changed in the file /examples_linux/mysgw.cpp
                #define MY_MQTT_USER "My User"
                #define MY_MQTT_PASSWORD "My Password"

                When i´m running the command: sudo systemctl status mysgw I got following result.

                ● mysgw.service - MySensors Gateway daemon
                Loaded: loaded (/etc/systemd/system/mysgw.service; enabled)
                Active: active (running) since tis 2016-12-27 18:52:34 CET; 25min ago
                Main PID: 1405 (mysgw)
                CGroup: /system.slice/mysgw.service
                └─1405 /usr/local/bin/mysgw

                dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files

                When trying to run command sudo mysgw -d it shows following info in a endless loop:
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1
                mysgw: Attempting MQTT connection...
                mysgw: connected to 127.0.0.1

                Please help figure this out.

                //PeTi

                M 1 Reply Last reply
                0
                • Flor SandersF Offline
                  Flor SandersF Offline
                  Flor Sanders
                  wrote on last edited by Flor Sanders
                  #171

                  Hello
                  The past two days I've been trying to setup the gateway on my RPi 2 with domoticz.
                  Here's what I did.
                  I installed domoticz onto my raspi, then I tried the install the gateway.

                  git clone https://github.com/mysensors/MySensors.git
                  cd MySensors
                  

                  Afterwards I did the following

                  ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
                  
                  make
                  
                  sudo ./bin/mysgw -d
                  

                  Then it seems to start normally onto the point where it refuses to connect to anything.
                  Does anyone have a clue what's going wrong?
                  I can't seem to figure it out. I've tried it several times over, and always go similar results.
                  I was using GertSanders's connector for the RPi Hub and I've tried it with normal wiring too.
                  As far as I can see it shouldn't be a wiring problem...

                  0_1482936624899_upload-edfa86af-fd0c-4e63-be7b-5393e20f27eb

                  EDIT:
                  !UPDATE!
                  I think I just fixed it. I reconfigured it to include the IRQ Pin and now it's just listening for throughput

                  pi@raspberrypi:~/MySensors $  sudo ./bin/mysgw -d
                  mysgw: Starting gateway...
                  mysgw: Protocol version - 2.1.0-beta
                  mysgw: MCO:BGN:INIT GW,CP=RNNG--Q,VER=2.1.0-beta
                  mysgw: TSF:LRT:OK
                  mysgw: TSM:INIT
                  mysgw: TSF:WUR:MS=0
                  mysgw: TSM:INIT:TSP OK
                  mysgw: TSM:INIT:GW MODE
                  mysgw: TSM:READY:ID=0,PAR=0,DIS=0
                  mysgw: MCO:REG:NOT NEEDED
                  mysgw: Listening for connections on 0.0.0.0:5003
                  mysgw: MCO:BGN:STP
                  mysgw: MCO:BGN:INIT OK,TSP=1
                  
                  1 Reply Last reply
                  0
                  • Flor SandersF Offline
                    Flor SandersF Offline
                    Flor Sanders
                    wrote on last edited by
                    #172

                    I got the previous problem out of the way for now...
                    Now onto the next one.

                    I started a node and now I can clearly see data being sent and received on my serial log and ssh. (See picture)
                    0_1482941358792_upload-08fe5f75-3536-4fb5-a0f4-2ee7d0edbc6a

                    So I tried adding the gateway to domoticz using following settings:
                    0_1482941417649_upload-ce92a80a-a5aa-4713-bfe8-227c71b8ce72

                    Yet if I check hardware setup I can see no nodes being presented.
                    0_1482941455435_upload-e36e2fbf-ac80-4381-895d-293e6e638ead

                    Are there settings or steps I missed?
                    Greetings
                    Flor

                    TigroenotT 1 Reply Last reply
                    0
                    • Flor SandersF Flor Sanders

                      I got the previous problem out of the way for now...
                      Now onto the next one.

                      I started a node and now I can clearly see data being sent and received on my serial log and ssh. (See picture)
                      0_1482941358792_upload-08fe5f75-3536-4fb5-a0f4-2ee7d0edbc6a

                      So I tried adding the gateway to domoticz using following settings:
                      0_1482941417649_upload-ce92a80a-a5aa-4713-bfe8-227c71b8ce72

                      Yet if I check hardware setup I can see no nodes being presented.
                      0_1482941455435_upload-e36e2fbf-ac80-4381-895d-293e6e638ead

                      Are there settings or steps I missed?
                      Greetings
                      Flor

                      TigroenotT Offline
                      TigroenotT Offline
                      Tigroenot
                      wrote on last edited by
                      #173

                      @Flor-Sanders I think you maybe should choose not USB but Ethernet gateway in domoticz.

                      1 Reply Last reply
                      1
                      • Flor SandersF Offline
                        Flor SandersF Offline
                        Flor Sanders
                        wrote on last edited by
                        #174

                        @Tigroenot
                        That fixed it indeed XD
                        Thanks for helping me out

                        1 Reply Last reply
                        1
                        • P pettib

                          Hi everyone.
                          I´m trying to build a new homeController with the following parts / software.

                          Raspberry Pi 3
                          Home Assistant
                          MySensors
                          Tellstick
                          Mosquitto MQTT Broker

                          I got everything working beside the MySensors. I´m trying to connect the NRF 24L01+ chip directly to the RPI with help from https://www.mysensors.org/build/raspberry.

                          I want to use MQTT between MySensors and HomeAssistant
                          The MQTT broker is working when i´m testing it.
                          The Mosquitto is configurated with username and Password in the config of Mosquitto.

                          The config i´m using when Make Mysensors is the following:
                          ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 --my-transport=nrf24 --my-rf24-irq-pin=15

                          I also changed in the file /examples_linux/mysgw.cpp
                          #define MY_MQTT_USER "My User"
                          #define MY_MQTT_PASSWORD "My Password"

                          When i´m running the command: sudo systemctl status mysgw I got following result.

                          ● mysgw.service - MySensors Gateway daemon
                          Loaded: loaded (/etc/systemd/system/mysgw.service; enabled)
                          Active: active (running) since tis 2016-12-27 18:52:34 CET; 25min ago
                          Main PID: 1405 (mysgw)
                          CGroup: /system.slice/mysgw.service
                          └─1405 /usr/local/bin/mysgw

                          dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: failed to connect
                          dec 27 19:18:10 HomeAssistant mysgw[1405]: socket: Too many open files

                          When trying to run command sudo mysgw -d it shows following info in a endless loop:
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1
                          mysgw: Attempting MQTT connection...
                          mysgw: connected to 127.0.0.1

                          Please help figure this out.

                          //PeTi

                          M Offline
                          M Offline
                          marceloaqno
                          Code Contributor
                          wrote on last edited by
                          #175

                          @pettib Could it be that you are using an old version of Mosquitto?

                          mosquitto -h
                          
                          Flor SandersF 1 Reply Last reply
                          0
                          • M marceloaqno

                            @pettib Could it be that you are using an old version of Mosquitto?

                            mosquitto -h
                            
                            Flor SandersF Offline
                            Flor SandersF Offline
                            Flor Sanders
                            wrote on last edited by
                            #176

                            @marceloaqno
                            How so?
                            I've tried running the command you've supplied, but it doesn't work... Do I have to install mosquitto?
                            I didn't see it anywhere in the guide.
                            Everything is working at the moment, you think it can pose a problem later?

                            1 Reply Last reply
                            0
                            • Robinek70R Offline
                              Robinek70R Offline
                              Robinek70
                              wrote on last edited by
                              #177

                              Hello everyone,
                              I've been working gateway on RPi, but I don't know how to configure MY_SIGNING_SOFT .
                              File mysgw.cpp contains MY_SIGNING_SOFT definition and I can uncomment it, but I don't know where and how I should define: SOFT_HMAC_KEY, SOFT_SERIAL and AES_KEY ?
                              Could you give more details how to configure soft signing on RPi?
                              thanks
                              //Robert

                              M 1 Reply Last reply
                              0
                              • aandA Offline
                                aandA Offline
                                aand
                                wrote on last edited by
                                #178

                                Has anyone successfully built on an Orange Pi One running armbian? RPi running raspbinan is supported, but on my Orange Pi One running armbian I get
                                ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform

                                I already have TMRh20's RF24 code running on this system, so I know it's capable.

                                T 1 Reply Last reply
                                0
                                • aandA aand

                                  Has anyone successfully built on an Orange Pi One running armbian? RPi running raspbinan is supported, but on my Orange Pi One running armbian I get
                                  ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform

                                  I already have TMRh20's RF24 code running on this system, so I know it's capable.

                                  T Offline
                                  T Offline
                                  Tag
                                  wrote on last edited by Tag
                                  #179

                                  @aand

                                  working on the same setup, unfortunately was not able to compile the mysensors gateway...
                                  this is the error i get:

                                  root@orangepizero:~/MySensors# make
                                  g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DMY_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
                                  In file included from examples_linux/mysgw.cpp:74:0:
                                  ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
                                  #error No support for nRF24 radio on this platform
                                  ^
                                  In file included from ./drivers/RF24/RF24.cpp:23:0,
                                  from ./MySensors.h:294,
                                  from examples_linux/mysgw.cpp:74:
                                  ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
                                  #include <SPI.h>
                                  ^
                                  compilation terminated.
                                  Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
                                  make: *** [build/examples_linux/mysgw.o] Error 1
                                  root@orangepizero:~/MySensors#

                                  seems spi is missing...

                                  however it seems to be available in the system:

                                  root@orangepizero:~/MySensors# ll /dev/spidev0.0
                                  crw------- 1 root root 153, 0 Dec 30 16:26 /dev/spidev0.0

                                  root@orangepizero:~/MySensors# dmesg | grep -i spi
                                  [ 0.814155] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
                                  [ 0.814185] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
                                  [ 0.815261] spi spi0: master is unqueued, this is deprecated

                                  setup:
                                  Orangepi zero
                                  Armbian

                                  hope that we get native OPI support soon, any way all help is appreciated!!

                                  kind regards,

                                  Tag

                                  jirmJ 1 Reply Last reply
                                  0
                                  • T Tag

                                    @aand

                                    working on the same setup, unfortunately was not able to compile the mysensors gateway...
                                    this is the error i get:

                                    root@orangepizero:~/MySensors# make
                                    g++ -MT build/examples_linux/mysgw.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RADIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -DMY_IS_SERIAL_PTY -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c examples_linux/mysgw.cpp -o build/examples_linux/mysgw.o
                                    In file included from examples_linux/mysgw.cpp:74:0:
                                    ./MySensors.h:258:2: error: #error No support for nRF24 radio on this platform
                                    #error No support for nRF24 radio on this platform
                                    ^
                                    In file included from ./drivers/RF24/RF24.cpp:23:0,
                                    from ./MySensors.h:294,
                                    from examples_linux/mysgw.cpp:74:
                                    ./drivers/RF24/RF24.h:52:17: fatal error: SPI.h: No such file or directory
                                    #include <SPI.h>
                                    ^
                                    compilation terminated.
                                    Makefile:98: recipe for target 'build/examples_linux/mysgw.o' failed
                                    make: *** [build/examples_linux/mysgw.o] Error 1
                                    root@orangepizero:~/MySensors#

                                    seems spi is missing...

                                    however it seems to be available in the system:

                                    root@orangepizero:~/MySensors# ll /dev/spidev0.0
                                    crw------- 1 root root 153, 0 Dec 30 16:26 /dev/spidev0.0

                                    root@orangepizero:~/MySensors# dmesg | grep -i spi
                                    [ 0.814155] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
                                    [ 0.814185] sunxi_spi_chan_cfg()1376 - [spi-1] has no spi_regulator.
                                    [ 0.815261] spi spi0: master is unqueued, this is deprecated

                                    setup:
                                    Orangepi zero
                                    Armbian

                                    hope that we get native OPI support soon, any way all help is appreciated!!

                                    kind regards,

                                    Tag

                                    jirmJ Offline
                                    jirmJ Offline
                                    jirm
                                    wrote on last edited by
                                    #180

                                    @aand said:

                                    Orange Pi One

                                    @aand

                                    I think, maybe the hardware nrf24 radio its not properly detected or ready on OPI?
                                    Seems ready state of the nrf24 board is needed in the moment to build/make the compilation of that module for the myGateway.

                                    We have any chance to run any Raspbian version (not armbian) on OPI ?
                                    Sure have so much differences about raspbian and armbian to aply same softw installation methods on both without adaptat in each case.

                                    Im so interesed too for use OPI One like my HA Controller and MQTT Gateway, so will be really good if you can post here any evolution and impressions about using OPI for that.

                                    Cheers

                                    1 Reply Last reply
                                    0
                                    • aandA Offline
                                      aandA Offline
                                      aand
                                      wrote on last edited by
                                      #181

                                      jirm daid "I think, maybe the hardware nrf24 radio its not properly detected or ready on OPI?"

                                      nrf24l01 radios WORK FINE on the Orange Pi One running armbian.

                                      I downloaded TMRh20's RF24 GitHub files and successfully tested the Linux example code "gettingstarted" in which an Orange Pi One (tx) sent data to another Orange Pi One (rx).

                                      jirmJ 1 Reply Last reply
                                      0
                                      • aandA aand

                                        jirm daid "I think, maybe the hardware nrf24 radio its not properly detected or ready on OPI?"

                                        nrf24l01 radios WORK FINE on the Orange Pi One running armbian.

                                        I downloaded TMRh20's RF24 GitHub files and successfully tested the Linux example code "gettingstarted" in which an Orange Pi One (tx) sent data to another Orange Pi One (rx).

                                        jirmJ Offline
                                        jirmJ Offline
                                        jirm
                                        wrote on last edited by jirm
                                        #182

                                        @aand.
                                        No dubt that NRF24 is detected and working on Armbian, but seems not properly detected on the build module process for the gateway installation process made for Raspbian. Sure because OS diferences from Raspbian and Armbian, raise this issue.
                                        Why not directly use Raspbian on OPI to avoid that and sure other issues that will by found because all software are mainly build for Raspberry (Raspbian OS) and that is the only well tested?

                                        I see Raspbian is available and updated for OPI trough his manufacturer.

                                        http://www.orangepi.org/downloadresources/orangepipc/oragepipc_e930546e866b23585721e5d2a6.html

                                        Regards

                                        1 Reply Last reply
                                        1
                                        • aandA Offline
                                          aandA Offline
                                          aand
                                          wrote on last edited by
                                          #183

                                          @jirm Thanks for the suggestion. I've downloaded the raspian image. To duplicate the path I used with armbian, I downloaded TMRh20's RF24 code so I can test the radio with code I've already had up and running on the hardware.. However, this version of raspbian is really bad. So far nothing compiles. Regular raspbian, and armbian on the orange pi one do not have this kind of problem out of the box; they compile a wide range of packages. I'll spend some more time on it to be diligent, but this distro looks like it needs to be put on the abandon pile.

                                          I tried compiling mysensors gateway too but no luck with that yet either. This is what I get:

                                          ./configure
                                          [SECTION] Detecting target machine.
                                          [OK] machine detected: SoC=H3, Type=unknown, CPU=armv7l.
                                          [OK] init system detected: sysvinit
                                          [SECTION] Saving configuration.
                                          [SECTION] Cleaning previous builds.
                                          [OK] Finished.

                                          make
                                          gcc -MT build/drivers/Linux/log.o -MMD -MP -march=armv8-a -mtune=cortex-a53 -mfpu=neon-vfpv4 -mfloat-abi=hard -DMY_RA
                                          DIO_NRF24 -DMY_GATEWAY_LINUX -DMY_DEBUG -Ofast -g -Wall -Wextra -I. -I./core -I./drivers/Linux -c drivers/Linux/log
                                          .c -o build/drivers/Linux/log.o
                                          cc1: error: bad value (armv8-a) for -march switch
                                          cc1: error: bad value (cortex-a53) for -mtune switch
                                          Makefile:102: recipe for target 'build/drivers/Linux/log.o' failed
                                          make: *** [build/drivers/Linux/log.o] Error 1

                                          jirmJ 3 Replies Last reply
                                          1
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          27

                                          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