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. New Gateway - Can't get it to work

New Gateway - Can't get it to work

Scheduled Pinned Locked Moved Troubleshooting
14 Posts 5 Posters 2.3k 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.
  • Norm DresslerN Offline
    Norm DresslerN Offline
    Norm Dressler
    wrote on last edited by
    #5

    Good suggestion but yes, I have. Pings stop after pulling out the cable.
    I have grabbed one of my sensor nodes (temp/humidity) and put it on the mySensors sketch from the example. Question on that though, how does it know what radio to use? No where is it defined in those sample sketches.

    I will post my sketch and the changes I've made to other files so you guys can get a complete picture.

    1 Reply Last reply
    0
    • Norm DresslerN Offline
      Norm DresslerN Offline
      Norm Dressler
      wrote on last edited by
      #6

      My gateway sketch:
      0_1466189155349_MyEthernetGateway.ino

      I also make changes to the following files:

      MyConfig.h:
      #define DEBUG

      /**********************************

      • RFM69 Driver Defaults
        ***********************************/
        // Default network id. Use the same for all nodes that will talk to each other
        #define RFM69_NETWORKID 100

      // Default frequency to use. This must match the hardware version of the RFM69 radio (uncomment one):
      // #define RFM69_FREQUENCY RF69_433MHZ
      //#define RFM69_FREQUENCY RF69_868MHZ
      #define RFM69_FREQUENCY RF69_915MHZ

      // Enable this for encryption of packets
      //#define RFM69_ENABLE_ENCRYPTION
      #define RFM69_ENCRYPTKEY "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!

      The line for the 915Mhz only called it FREQUENCY so changed it to match the entries above it, assuming it is correct.

      MyTransportRFM69.h:
      class MyTransportRFM69 : public MyTransport
      {
      public:
      MyTransportRFM69(uint8_t freqBand=RFM69_FREQUENCY, uint8_t networkId=RFM69_NETWORKID, uint8_t slaveSelectPin=RF69_SPI_CS, uint8_t interruptPin=RF69_IRQ_PIN, bool isRFM69HW=true, uint8_t interruptNum=RF69_IRQ_NUM);

      This change was to identify my radio as an RFM69HW.

      1 Reply Last reply
      0
      • Norm DresslerN Offline
        Norm DresslerN Offline
        Norm Dressler
        wrote on last edited by
        #7

        I have partial success getting my RFM69 radios working. I had to make the following changes:
        MySensor.h

        Change: #include "MyTransportNRF24.h" to #include "MyTransportRFM69.h"
        Change line 158 from
        MySensor(MyTransport &radio =*new MyTransportNRF24(), MyHw &hw=*new MyHwDriver()
        to
        MySensor(MyTransport &radio =*new MyTransportRFM69(), MyHw &hw=*new MyHwDriver()

        Sensor side I get:
        sensor started, id=255, parent=0, distance=1
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        T: 28.00
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        H: 33.00
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        T: 29.00
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        T: 28.00
        req id
        send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=fail:
        H: 32.00

        While Gateway side I get:
        0;0;3;0;9;gateway started, id=0, parent=0, distance=0
        0;0;3;0;9;read and forward: 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:

        0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,st=bc:0
        0;0;3;0;5;1
        0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
        255;255;3;0;3;

        I'm not sure what the st=fail means in the sensor debug?

        Also I still do not have the gateway listening on port 5003. Still trying to decipher that. I wanted to try and isolate the fault and make sure the radio part was working.

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

          st=fail means the radio message was not received by the receiver.

          See https://forum.mysensors.org/topic/666/debug-faq-and-how-ask-for-help for details on how to read the debug log

          1 Reply Last reply
          0
          • Norm DresslerN Offline
            Norm DresslerN Offline
            Norm Dressler
            wrote on last edited by
            #9

            Ok, figured it out and got the gateway working. The issue is with the RFM69 and the Wiznet Ethernet shield you cannot use pin 10 for the cs on the RFM69. I used pin 7 since I don't use the LED's.
            Add the following to your MyConfig.h
            #define RF69_SPI_CS 7

            and everything should work. Onwards to building the sensors now!

            1 Reply Last reply
            1
            • Norm DresslerN Offline
              Norm DresslerN Offline
              Norm Dressler
              wrote on last edited by
              #10

              Well... almost. Things are talking but not quite. The gateway never seems to send a ID to the sensor node?

              On the sensor node:
              ensor started, id=255, parent=0, distance=1
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id
              send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
              req id

              On the Gateway Node:
              0;0;3;0;5;1
              0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
              255;255;3;0;3;
              0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
              255;255;3;0;3;
              0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
              255;255;3;0;3;
              0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
              255;255;3;0;3;
              0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
              255;255;3;0;3;
              0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
              255;255;3;0;3;

              So it looks to be sending a request, but the gateway isn't returning an id. The sensor node is a humidity node, exactly as provided in the example, other then adding: MyTransportRFM69 transport;

              martinhjelmareM 1 Reply Last reply
              0
              • Norm DresslerN Norm Dressler

                Well... almost. Things are talking but not quite. The gateway never seems to send a ID to the sensor node?

                On the sensor node:
                ensor started, id=255, parent=0, distance=1
                req id
                send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
                req id
                send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
                req id
                send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
                req id
                send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
                req id

                On the Gateway Node:
                0;0;3;0;5;1
                0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
                255;255;3;0;3;
                0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
                255;255;3;0;3;
                0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
                255;255;3;0;3;
                0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
                255;255;3;0;3;
                0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
                255;255;3;0;3;
                0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
                255;255;3;0;3;

                So it looks to be sending a request, but the gateway isn't returning an id. The sensor node is a humidity node, exactly as provided in the example, other then adding: MyTransportRFM69 transport;

                martinhjelmareM Offline
                martinhjelmareM Offline
                martinhjelmare
                Plugin Developer
                wrote on last edited by
                #11

                @Norm-Dressler

                You need a controller that can provide ids connected to the gateway.

                afenoA 1 Reply Last reply
                1
                • Norm DresslerN Offline
                  Norm DresslerN Offline
                  Norm Dressler
                  wrote on last edited by
                  #12

                  Ok, my newbie is showing. I have home assistant configured just didn't know I had to have it connected before it would work. Will try that.

                  1 Reply Last reply
                  0
                  • Norm DresslerN Offline
                    Norm DresslerN Offline
                    Norm Dressler
                    wrote on last edited by
                    #13

                    The Ethernet gateway was just too unstable for me and I couldn't get any inclusions. I switched it for a serial gateway and its all working great now. I have a single sensor that is sending data to my House Assistant install.

                    1 Reply Last reply
                    1
                    • martinhjelmareM martinhjelmare

                      @Norm-Dressler

                      You need a controller that can provide ids connected to the gateway.

                      afenoA Offline
                      afenoA Offline
                      afeno
                      wrote on last edited by
                      #14

                      @martinhjelmare

                      Thank you!!!! I was getting crazy working only with the Serial monitor on both sides. I didn't know that the Controller is playing a key role on assigning the nodeID.

                      It is working now after connecting the gateway to HomeAssistant.

                      Thanks.
                      Regards.
                      Alfredo.

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


                      16

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.0k

                      Posts


                      Copyright 2019 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