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. Troubleshooting
  3. [SOLVED] OH2 - Mosquito - Raspi Mysensors Gateway

[SOLVED] OH2 - Mosquito - Raspi Mysensors Gateway

Scheduled Pinned Locked Moved Troubleshooting
22 Posts 4 Posters 4.5k 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.
  • narfN Offline
    narfN Offline
    narf
    wrote on last edited by
    #2

    anybody? :(

    1 Reply Last reply
    0
    • narfN narf

      Hello!
      While i'm waiting for my hardware (ordered a couple Sensebender Micro) i tried to set up Controller and Gateway.
      I followed the instructions from here here and configured with

      ./configure --my-gateway=mqtt --my-controller-ip-address=192.168.178.160 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1
      

      But the Gateway doesn't connect to the controller:

      pi@raspgateway:~/MySensors $ sudo mysgw -d
      mysgw: Starting gateway...
      mysgw: Protocol version - 2.1.1
      mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
      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
      ...
      

      Then nothing more follows...

      On openhabian (Raspberry) i installed the MQTT Binding (via OH2 paperUI) and Mosquitto (via openhabian config tool).
      What am i missing? :/

      Thanks in advance!
      Narf!

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #3

      @narf said in OH2 - Mosquito - Raspi Mysensors Gateway:

      mysgw: Listening for connections on 0.0.0.0:5003

      That doesn't seem to be right...
      It seems it switches to listening (server) mode, while you are trying to configure an mqtt client connection. Myabe @marceloaqno has a clue?

      http://yveaux.blogspot.nl

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

        Did you try to recompile the gateway?

        1 Reply Last reply
        0
        • narfN Offline
          narfN Offline
          narf
          wrote on last edited by
          #5

          no - but i can try!
          i'll just have to run

          make
          

          and

          sudo make install
          

          again, right?

          1 Reply Last reply
          0
          • narfN Offline
            narfN Offline
            narf
            wrote on last edited by
            #6

            recompiling did the trick:

            pi@raspgateway:~/MySensors $ sudo ./bin/mysgw -d
            mysgw: Starting gateway...
            mysgw: Protocol version - 2.1.1
            mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
            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: MCO:BGN:STP
            mysgw: MCO:BGN:INIT OK,TSP=1
            mysgw: Attempting MQTT connection...
            mysgw: connected to 192.168.178.160
            mysgw: MQTT connected
            mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
            
            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #7

              You probably compiled it before setting some parameters and with last build they were used. I'm glad you solved it.

              1 Reply Last reply
              0
              • narfN Offline
                narfN Offline
                narf
                wrote on last edited by
                #8

                i'm a simple man, i do what the tutorials says =)
                Thank you very much!

                1 Reply Last reply
                0
                • narfN Offline
                  narfN Offline
                  narf
                  wrote on last edited by
                  #9

                  alright! today (finally!) i got my sensebender micro. they should send something right away, right?
                  so i plugged one in and got this on the gateway:

                  pi@raspgateway:~/MySensors $ sudo ./bin/mysgw -d                                                                                  mysgw: Starting gateway...
                  mysgw: Protocol version - 2.1.1
                  mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
                  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: MCO:BGN:STP
                  mysgw: MCO:BGN:INIT OK,TSP=1
                  mysgw: Attempting MQTT connection...
                  mysgw: connected to 192.168.178.183
                  mysgw: MQTT connected
                  mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
                  mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
                  mysgw: !TSF:MSG:LEN,7!=32
                  mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                  mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                  mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                  mysgw: !TSF:MSG:LEN,0!=7
                  mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
                  mysgw: !TSF:MSG:LEN,7!=32
                  

                  does this mean anything? i don't get it at all...

                  1 Reply Last reply
                  0
                  • hekH Offline
                    hekH Offline
                    hek
                    Admin
                    wrote on last edited by
                    #10

                    Something is not quite right... See parsed log.

                    Message length seems to be a bit off and command type=7 ?? Doesn't make any sense.

                    1 Reply Last reply
                    0
                    • narfN Offline
                      narfN Offline
                      narf
                      wrote on last edited by
                      #11

                      what's next? i tried to upload the sensebender micro sketch (couldn't find it in the lib) but had several errors. couldn't find a beginner-beginner tutorial on how to upload a first sketch.
                      Generally this output points to an error with gateway or with sensor?

                      1 Reply Last reply
                      0
                      • hekH Offline
                        hekH Offline
                        hek
                        Admin
                        wrote on last edited by
                        #12

                        You must add the micro to your board manager first. Instructions here:
                        https://github.com/mysensors/ArduinoBoards

                        The Sensebender Micro sketch is available here:
                        https://github.com/mysensors/SensebenderMicro/tree/master/Arduino/SensebenderMicro

                        Did you decoupling capacitor on gateway? Do you have more radios to test with in the case one is broken?

                        1 Reply Last reply
                        0
                        • narfN Offline
                          narfN Offline
                          narf
                          wrote on last edited by narf
                          #13

                          i found the board but i don't get how to load the sketch ON the board :/
                          first thought was to c&p the code from https://github.com/mysensors/SensebenderMicro/tree/master/Arduino/SensebenderMicro

                          fatal error: SI7021.h: No such file or directory
                          

                          second thought was to look for an example sketch. no luck.

                          i have other radios. but i'd really love to upload the (right) sketch first... just... how?

                          @hek said in [SOLVED] OH2 - Mosquito - Raspi Mysensors Gateway:

                          Did you decoupling capacitor on gateway? Do you have more radios to test with in the case one is broken?

                          did i what exactly?
                          all i can say that i wired the gateway with one of the specified NRF24L01+ Radios.
                          Same radio on sensebender.

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

                            you need to install library for SI7021

                            narfN 1 Reply Last reply
                            0
                            • gohanG gohan

                              you need to install library for SI7021

                              narfN Offline
                              narfN Offline
                              narf
                              wrote on last edited by narf
                              #15

                              @gohan said in [SOLVED] OH2 - Mosquito - Raspi Mysensors Gateway:

                              you need to install library for SI7021

                              took libraries from here: https://github.com/mysensors/MySensorsArduinoExamples
                              will investigate further.

                              i think i got the sensor up and running and it can't find a gateway?

                              debug

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

                                In Arduino ide open library manager and search for that library or manually download it and choose to install new library as zip file.
                                For debug you posted it looks the node it is missing the node ID

                                1 Reply Last reply
                                0
                                • narfN Offline
                                  narfN Offline
                                  narf
                                  wrote on last edited by narf
                                  #17

                                  ok, thought this would be auto assigned: "Define a static node address, remove if you want auto address assignment"
                                  new debug: everything ok with this sensor?
                                  debug

                                  Next Stop Gateway? Should i just try another radio?

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

                                    Auto assign works if everything else is working and you have a controller that is able to assign node id.
                                    Now it seems there is no communication with gateway: do you also have a log for the gateway? Did you put capacitors on the vcc/gnd on both gateway and node? Keep in mind that RPI is not very suited to power the nrf24 radio.

                                    1 Reply Last reply
                                    0
                                    • narfN Offline
                                      narfN Offline
                                      narf
                                      wrote on last edited by narf
                                      #19

                                      the gateway "log" is some posts above.

                                      pi@raspgateway:~/MySensors $ sudo ./bin/mysgw -d                                                                                  mysgw: Starting gateway...
                                      mysgw: Protocol version - 2.1.1
                                      mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
                                      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: MCO:BGN:STP
                                      mysgw: MCO:BGN:INIT OK,TSP=1
                                      mysgw: Attempting MQTT connection...
                                      mysgw: connected to 192.168.178.183
                                      mysgw: MQTT connected
                                      mysgw: Sending message on topic: mysensors-out/0/255/0/0/18
                                      mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
                                      mysgw: !TSF:MSG:LEN,7!=32
                                      mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                                      mysgw: Sending message on topic: mysensors-out/255/255/3/0/3
                                      mysgw: TSF:MSG:READ,255-255-0,s=255,c=3,t=3,pt=0,l=0,sg=0:
                                      mysgw: !TSF:MSG:LEN,0!=7
                                      mysgw: TSF:MSG:READ,255-255-255,s=255,c=7,t=255,pt=7,l=25,sg=1: 0
                                      

                                      should i provide another log?

                                      i didn't use any capacitors, neither gateway, nor node.
                                      here isn't anything regarding capacitors.
                                      and [here](lhttps://www.mysensors.org/build/raspberry under section "NRF24L01+ Radio" it only says "If you are using the nrf24 PA/LNA version you need to use a 5V->3.3V regulator.", but i'm using these so i thought it's ok without using regulators.
                                      or is a regulator something different than a capacitor?

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

                                        Voltage regulator is OK but you need a capacitor 4.7uF or bigger on vcc/gnd of radio module. Those modules are probably the same as I bought 4 months ago and they are cheap clones and don't have good range but they work with the proper capacitor.

                                        1 Reply Last reply
                                        0
                                        • narfN Offline
                                          narfN Offline
                                          narf
                                          wrote on last edited by
                                          #21

                                          okay :(
                                          i'll take a look around, hopefully i can get a few somewhere.
                                          does the log indicate that there's a problem with radio? (length?)

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


                                          12

                                          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