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. Repeater drops nodes

Repeater drops nodes

Scheduled Pinned Locked Moved Troubleshooting
34 Posts 5 Posters 3.1k Views 7 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.
  • NortonN Offline
    NortonN Offline
    Norton
    wrote on last edited by
    #13

    Hello,
    I have a similar problem. I wanted to start a new thread, but after reading this posts I put it here. My problem is similar even though I do not have a repeater. I used the mysensors version 2.3.0 alpha, after updating to 2.3.0 stable a few days ago one of my nodes started not to send humidity data. Here is the log:

    16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
    25 TSM:INIT
    26 TSF:WUR:MS=0
    33 TSM:INIT:TSP OK
    35 TSM:INIT:STATID=101
    37 TSF:SID:OK,ID=101
    39 TSM:FPAR
    40 TSM:FPAR:STATP=0
    43 TSM:ID
    44 TSM:ID:OK
    45 TSM:UPL
    81 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2092 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=OK:1
    2099 TSF:MSG:READ,0-0-101,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2104 TSF:MSG:PONG RECV,HP=1
    2107 TSM:UPL:OK
    2108 TSM:READY:ID=101,PAR=0,DIS=1
    2132 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    2143 TSF:MSG:READ,0-0-101,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    2183 TSF:MSG:SEND,101-101-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.0
    2191 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    2732 TSF:MSG:READ,0-0-101,s=255,c=3,t=6,pt=0,l=1,sg=0:M
    2769 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=OK:Senzor 101-DualDHT
    2780 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.1
    2790 TSF:MSG:SEND,101-101-0-0,s=0,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2798 TSF:MSG:SEND,101-101-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
    2805 TSF:MSG:SEND,101-101-0-0,s=2,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
    2813 TSF:MSG:SEND,101-101-0-0,s=3,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2820 MCO:REG:REQ
    2824 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    2832 TSF:MSG:READ,0-0-101,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    2837 MCO:PIM:NODE REG=1
    2840 MCO:BGN:INIT OK,TSP=1
    2848 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
    2853 TSF:TDI:TSL
    2855 MCO:SLP:WUP=-1
    2856 TSF:TRI:TSB
    2868 TSF:MSG:SEND,101-101-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:31.8
    DHT1TEMP: 31.80
    2875 MCO:SLP:MS=2500,SMS=0,I1=255,M1=255,I2=255,M2=255
    2880 TSF:TDI:TSL
    2882 MCO:SLP:WUP=-1
    2884 TSF:TRI:TSB
    4485 !TSF:MSG:SEND,101-101-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=NACK:35.2
    DHT1HUM: 35.20
    4497 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
    4501 TSF:TDI:TSL
    4503 MCO:SLP:WUP=-1
    4505 TSF:TRI:TSB
    4513 TSF:MSG:SEND,101-101-0-0,s=2,c=1,t=0,pt=7,l=5,sg=0,ft=1,st=OK:24.0
    DHT2TEMP: 24.00
    4520 MCO:SLP:MS=2500,SMS=0,I1=255,M1=255,I2=255,M2=255
    4527 TSF:TDI:TSL
    4529 MCO:SLP:WUP=-1
    4530 TSF:TRI:TSB
    6130 !TSF:MSG:SEND,101-101-0-0,s=3,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=NACK:56.8
    DHT2HUM: 56.80
    

    As you can see the temperature is sent correctly, and then the humidity value is not. When I returned the 2.3.0 alpha version to the node, everything started going OK. Otherwise, on other nodes where i also updated to version 2.3.0 stable this problem is not. I also updated the gateway to version 2.3.0 stable. I just had to make a downgrade on this one node only.

    sundberg84S 1 Reply Last reply
    0
    • NortonN Norton

      Hello,
      I have a similar problem. I wanted to start a new thread, but after reading this posts I put it here. My problem is similar even though I do not have a repeater. I used the mysensors version 2.3.0 alpha, after updating to 2.3.0 stable a few days ago one of my nodes started not to send humidity data. Here is the log:

      16 MCO:BGN:INIT NODE,CP=RNNNA---,VER=2.3.0
      25 TSM:INIT
      26 TSF:WUR:MS=0
      33 TSM:INIT:TSP OK
      35 TSM:INIT:STATID=101
      37 TSF:SID:OK,ID=101
      39 TSM:FPAR
      40 TSM:FPAR:STATP=0
      43 TSM:ID
      44 TSM:ID:OK
      45 TSM:UPL
      81 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
      2092 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=1,st=OK:1
      2099 TSF:MSG:READ,0-0-101,s=255,c=3,t=25,pt=1,l=1,sg=0:1
      2104 TSF:MSG:PONG RECV,HP=1
      2107 TSM:UPL:OK
      2108 TSM:READY:ID=101,PAR=0,DIS=1
      2132 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
      2143 TSF:MSG:READ,0-0-101,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
      2183 TSF:MSG:SEND,101-101-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.0
      2191 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
      2732 TSF:MSG:READ,0-0-101,s=255,c=3,t=6,pt=0,l=1,sg=0:M
      2769 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=OK:Senzor 101-DualDHT
      2780 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.1
      2790 TSF:MSG:SEND,101-101-0-0,s=0,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2798 TSF:MSG:SEND,101-101-0-0,s=1,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
      2805 TSF:MSG:SEND,101-101-0-0,s=2,c=0,t=6,pt=0,l=0,sg=0,ft=0,st=OK:
      2813 TSF:MSG:SEND,101-101-0-0,s=3,c=0,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
      2820 MCO:REG:REQ
      2824 TSF:MSG:SEND,101-101-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
      2832 TSF:MSG:READ,0-0-101,s=255,c=3,t=27,pt=1,l=1,sg=0:1
      2837 MCO:PIM:NODE REG=1
      2840 MCO:BGN:INIT OK,TSP=1
      2848 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
      2853 TSF:TDI:TSL
      2855 MCO:SLP:WUP=-1
      2856 TSF:TRI:TSB
      2868 TSF:MSG:SEND,101-101-0-0,s=1,c=1,t=0,pt=7,l=5,sg=0,ft=0,st=OK:31.8
      DHT1TEMP: 31.80
      2875 MCO:SLP:MS=2500,SMS=0,I1=255,M1=255,I2=255,M2=255
      2880 TSF:TDI:TSL
      2882 MCO:SLP:WUP=-1
      2884 TSF:TRI:TSB
      4485 !TSF:MSG:SEND,101-101-0-0,s=0,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=NACK:35.2
      DHT1HUM: 35.20
      4497 MCO:SLP:MS=2000,SMS=0,I1=255,M1=255,I2=255,M2=255
      4501 TSF:TDI:TSL
      4503 MCO:SLP:WUP=-1
      4505 TSF:TRI:TSB
      4513 TSF:MSG:SEND,101-101-0-0,s=2,c=1,t=0,pt=7,l=5,sg=0,ft=1,st=OK:24.0
      DHT2TEMP: 24.00
      4520 MCO:SLP:MS=2500,SMS=0,I1=255,M1=255,I2=255,M2=255
      4527 TSF:TDI:TSL
      4529 MCO:SLP:WUP=-1
      4530 TSF:TRI:TSB
      6130 !TSF:MSG:SEND,101-101-0-0,s=3,c=1,t=1,pt=7,l=5,sg=0,ft=0,st=NACK:56.8
      DHT2HUM: 56.80
      

      As you can see the temperature is sent correctly, and then the humidity value is not. When I returned the 2.3.0 alpha version to the node, everything started going OK. Otherwise, on other nodes where i also updated to version 2.3.0 stable this problem is not. I also updated the gateway to version 2.3.0 stable. I just had to make a downgrade on this one node only.

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by
      #14

      @norton just out of curiosity, you can add a wait(100); after sending the temp value. This way the radio has some time to recover if needed. I understand your point since it works in alpha but could be a good clue if it works with a wait().

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      1 Reply Last reply
      0
      • sundberg84S sundberg84

        @itbeyond logs would be great it can be improved. As i wrote above, I had some issues as well but they went away when I upgraded all (and made some other changes as well).

        I Offline
        I Offline
        itbeyond
        wrote on last edited by itbeyond
        #15

        @sundberg84 I understand about the logs but after spending several days trying to make 2.3.0 work on these nodes and just going to NACK NACK NACK for every send either repeater or gateway I reverted. I can enable it again if you like but all you will see is good data for a period then without any warning or reason constant NACK for every send. I did add wait(50)s on my nodes and these seem to be better but no go on Gateways and Repeaters cannot inject a wait of course. I can report that on Gateways trying 2.3.0 I used Vera/Ethernet - openHab/MQTT and openHab/Ethernet and all did the exact same thing and now on 2.2.0 I have zero problems.

        Coupled with this testing the openHab network was and is still new so had limited nodes installed and everything was 2.3.0 when the troubles occurred so I did have a full 2.3.0 network using channel 82.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          titvs
          wrote on last edited by
          #16

          @itbeyond im running 2.3 on gateway, nodes and repeater… Im glad someone showed up with the same issue. The behaviour is similar: everything is ok and, in my case, it starts to "NACK" after around 16 min… Seems to be a software problem then and not the "popular" NRF24 reception issues. What radios are you using? NRF24's?

          tekkaT 1 Reply Last reply
          0
          • T titvs

            @itbeyond im running 2.3 on gateway, nodes and repeater… Im glad someone showed up with the same issue. The behaviour is similar: everything is ok and, in my case, it starts to "NACK" after around 16 min… Seems to be a software problem then and not the "popular" NRF24 reception issues. What radios are you using? NRF24's?

            tekkaT Offline
            tekkaT Offline
            tekka
            Admin
            wrote on last edited by
            #17

            @titvs see here https://forum.mysensors.org/topic/9642/nrf24-transmission-of-data-works-fine-but-constant-nack-s-produced/12

            Please test https://github.com/tekka007/MySensors/tree/RF24Test

            1 Reply Last reply
            0
            • T Offline
              T Offline
              titvs
              wrote on last edited by
              #18

              @tekka ok, will test your version tomorrow and collect the node log. Do i need to upload your version to the node, repeater and gateway?

              tekkaT 1 Reply Last reply
              0
              • T titvs

                @tekka ok, will test your version tomorrow and collect the node log. Do i need to upload your version to the node, repeater and gateway?

                tekkaT Offline
                tekkaT Offline
                tekka
                Admin
                wrote on last edited by
                #19

                @titvs are you using nrf24L01+ PA+LNA modules?

                T 1 Reply Last reply
                0
                • tekkaT tekka

                  @titvs are you using nrf24L01+ PA+LNA modules?

                  T Offline
                  T Offline
                  titvs
                  wrote on last edited by
                  #20

                  @tekka using normal NRF24's on the nodes and a nrf24L01+ PA+LNA on the gateway.

                  tekkaT I 2 Replies Last reply
                  0
                  • T titvs

                    @tekka using normal NRF24's on the nodes and a nrf24L01+ PA+LNA on the gateway.

                    tekkaT Offline
                    tekkaT Offline
                    tekka
                    Admin
                    wrote on last edited by
                    #21

                    @titvs ok - I'd recommend to update all devices and re-run the test.

                    T 1 Reply Last reply
                    1
                    • T titvs

                      @tekka using normal NRF24's on the nodes and a nrf24L01+ PA+LNA on the gateway.

                      I Offline
                      I Offline
                      itbeyond
                      wrote on last edited by
                      #22

                      @titvs my testing seems to show that this updated version from @tekka does resolve the problem. I have added some questions about the release details etc in the post https://forum.mysensors.org/topic/9642/nrf24-transmission-of-data-works-fine-but-constant-nack-s-produced/12

                      T 1 Reply Last reply
                      0
                      • I itbeyond

                        @titvs my testing seems to show that this updated version from @tekka does resolve the problem. I have added some questions about the release details etc in the post https://forum.mysensors.org/topic/9642/nrf24-transmission-of-data-works-fine-but-constant-nack-s-produced/12

                        T Offline
                        T Offline
                        titvs
                        wrote on last edited by
                        #23

                        @itbeyond Nice! Will test it today and post my results.

                        1 Reply Last reply
                        0
                        • tekkaT tekka

                          @titvs ok - I'd recommend to update all devices and re-run the test.

                          T Offline
                          T Offline
                          titvs
                          wrote on last edited by titvs
                          #24

                          @tekka well, unfortunately i had the same problem. The far away node connected to the Repeater but after aprox 1h working ok, it stopped being updated at Domoticz with transportCheckUplink() false.
                          You changed a timing setting, right? With the normal version the node stopped being updated at about 15-16 min and now it changed to about 1 hour…
                          I have a node connected directly to the gateway with the nrf24L01+ PA+LNA working without problems, so it seems to be some kind of problem with the Repeater code and timings...

                          tekkaT I 2 Replies Last reply
                          0
                          • T titvs

                            @tekka well, unfortunately i had the same problem. The far away node connected to the Repeater but after aprox 1h working ok, it stopped being updated at Domoticz with transportCheckUplink() false.
                            You changed a timing setting, right? With the normal version the node stopped being updated at about 15-16 min and now it changed to about 1 hour…
                            I have a node connected directly to the gateway with the nrf24L01+ PA+LNA working without problems, so it seems to be some kind of problem with the Repeater code and timings...

                            tekkaT Offline
                            tekkaT Offline
                            tekka
                            Admin
                            wrote on last edited by
                            #25

                            @titvs It would be helpful if you could post the debug log showing what you describe + the sketch you are using.

                            T 1 Reply Last reply
                            0
                            • tekkaT tekka

                              @titvs It would be helpful if you could post the debug log showing what you describe + the sketch you are using.

                              T Offline
                              T Offline
                              titvs
                              wrote on last edited by
                              #26

                              @tekka the debug log (MY_DEBUG)/sketch from the node that gets disconnected or the repeater?

                              tekkaT 1 Reply Last reply
                              0
                              • T titvs

                                @tekka well, unfortunately i had the same problem. The far away node connected to the Repeater but after aprox 1h working ok, it stopped being updated at Domoticz with transportCheckUplink() false.
                                You changed a timing setting, right? With the normal version the node stopped being updated at about 15-16 min and now it changed to about 1 hour…
                                I have a node connected directly to the gateway with the nrf24L01+ PA+LNA working without problems, so it seems to be some kind of problem with the Repeater code and timings...

                                I Offline
                                I Offline
                                itbeyond
                                wrote on last edited by
                                #27

                                @titvs I have tested a repeater and it is still working ok after 48 hours using the CE timing modified code.

                                T 1 Reply Last reply
                                0
                                • I itbeyond

                                  @titvs I have tested a repeater and it is still working ok after 48 hours using the CE timing modified code.

                                  T Offline
                                  T Offline
                                  titvs
                                  wrote on last edited by
                                  #28

                                  @itbeyond can you please post the initial code defines for your repeater and a node that connects to it? To see if I’m doing something wrong...
                                  In the meantime I’m going to get the debug log and sketch code for my node.

                                  1 Reply Last reply
                                  0
                                  • T titvs

                                    @tekka the debug log (MY_DEBUG)/sketch from the node that gets disconnected or the repeater?

                                    tekkaT Offline
                                    tekkaT Offline
                                    tekka
                                    Admin
                                    wrote on last edited by
                                    #29

                                    @titvs ideally both + sketch

                                    T 1 Reply Last reply
                                    0
                                    • tekkaT tekka

                                      @titvs ideally both + sketch

                                      T Offline
                                      T Offline
                                      titvs
                                      wrote on last edited by titvs
                                      #30

                                      @tekka Well, im running your beta code and like @itbeyond it seems to be working for 24h now. Uploaded the new compiles with the lib from the RF24Fix branch to all the nodes, gateway and repeater and it seems the drops stopped.
                                      Built a couple of Relay nodes, one of which is connected to the repeater and they also seem to be working correctly.

                                      Im linking the ZIP to the node log file with the RF24 verbose debug (its a tad big), if you want to take a look:

                                      LOG

                                      And this is my TEMP+HUM node sketch:

                                      // Enable debug prints
                                      //#define MY_DEBUG
                                      //#define MY_DEBUG_VERBOSE_RF24
                                      
                                      // Enable and select radio type attached 
                                      #define MY_RADIO_NRF24
                                      //#define MY_RADIO_RFM69
                                      //#define MY_RS485
                                      
                                      #define MY_RF24_CHANNEL 1   //////////////
                                      #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                                      
                                      // ONLY IF USING FIXED ID REPEATER
                                      //#define MY_PARENT_NODE_ID 0            // REPEATER NODE ID
                                      //#define MY_PARENT_NODE_IS_STATIC        // this will force your node to use only the repeater
                                      
                                      // #define MY_REPEATER_FEATURE
                                      
                                      #include <SPI.h>
                                      #include <MySensors.h>  
                                      #include <DHT.h>
                                      
                                      #include <U8g2lib.h>  //////////////////////
                                      #include <Wire.h>    /////////////////////////
                                      
                                      U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, A5, A4);   // U8G2 Constructor (A5 - Clock SCL ; A4 - Data SDA)
                                      
                                      #define DHT_DATA_PIN 3
                                      
                                      #define SENSOR_TEMP_OFFSET 0
                                      
                                      static const uint64_t UPDATE_INTERVAL = 60000;
                                      
                                      static const uint8_t FORCE_UPDATE_N_READS = 10;
                                      
                                      #define CHILD_ID_HUM 0
                                      #define CHILD_ID_TEMP 1
                                      
                                      float lastTemp;
                                      float lastHum;
                                      uint8_t nNoUpdatesTemp;
                                      uint8_t nNoUpdatesHum;
                                      bool metric = true;
                                      
                                      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
                                      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
                                      DHT dht;
                                      
                                      void before(){
                                      
                                         u8g2.begin();
                                      
                                         u8g2.firstPage();
                                         do {
                                           u8g2.setFont(u8g2_font_helvR14_tf);
                                           u8g2.drawStr(38,15,"OLED");
                                           u8g2.drawStr(15,35,"Temp+Hum");
                                           u8g2.drawStr(46,60,"v1.2");
                                         } while ( u8g2.nextPage() );
                                        
                                        delay(3000);
                                      
                                        u8g2.clear();
                                       
                                         u8g2.firstPage();
                                          do {
                                           u8g2.drawStr(3, 32, "Connecting...");
                                         } while ( u8g2.nextPage() );
                                      }
                                      
                                      void presentation()  
                                      { 
                                      
                                        // Send the sketch version information to the gateway
                                        sendSketchInfo("TEMPHUM_OLED", "1.2");
                                      
                                        // Register all sensors to gw (they will be created as child devices)
                                        present(CHILD_ID_HUM, S_HUM);
                                        present(CHILD_ID_TEMP, S_TEMP);
                                      
                                        metric = getControllerConfig().isMetric;
                                      }
                                      
                                      void setup()
                                      {
                                        
                                        u8g2.clear();
                                        
                                        dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
                                        if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
                                      
                                          u8g2.firstPage();
                                          do {
                                              u8g2.setFont(u8g2_font_haxrcorp4089_tr); // 7 PIXEL HIGHT
                                              u8g2.drawStr(1,12,"WARNING: UPDATE_INTERVAL");
                                             u8g2.drawStr(1,24,"is smaller than supported by");
                                              u8g2.drawStr(1,36,"the sensor!");
                                             } while ( u8g2.nextPage() );
                                          delay(4000);
                                      
                                        }
                                      
                                        sleep(dht.getMinimumSamplingPeriod());
                                      }
                                      
                                      void loop()      
                                      {  
                                      
                                       while (transportCheckUplink() == false){
                                      
                                        u8g2.firstPage();
                                        do {
                                          u8g2.setFont(u8g2_font_helvR14_tf); // 14 px height
                                          u8g2.drawStr(3, 32, "Disconnected!");
                                          } while ( u8g2.nextPage() );
                                       }
                                      
                                        dht.readSensor(true);
                                      
                                        float temperature = dht.getTemperature();
                                        if (isnan(temperature)) {
                                          Serial.println("Failed reading temperature from DHT!");
                                      
                                        } else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
                                          // Only send temperature if it changed since the last measurement or if we didn't send an update for n times
                                          lastTemp = temperature;
                                      
                                          // apply the offset before converting to something different than Celsius degrees
                                          temperature += SENSOR_TEMP_OFFSET;
                                      
                                          if (!metric) {
                                            temperature = dht.toFahrenheit(temperature);
                                          }
                                          // Reset no updates counter
                                          nNoUpdatesTemp = 0;
                                          send(msgTemp.set(temperature, 1));
                                      
                                          #ifdef MY_DEBUG
                                          Serial.print("T: ");
                                          Serial.println(temperature);
                                          #endif
                                        } else {
                                          // Increase no update counter if the temperature stayed the same
                                          nNoUpdatesTemp++;
                                        }
                                      
                                        // Get humidity from DHT library
                                        float humidity = dht.getHumidity();
                                        if (isnan(humidity)) {
                                          Serial.println("Failed reading humidity from DHT");
                                        } else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
                                          // Only send humidity if it changed since the last measurement or if we didn't send an update for n times
                                          lastHum = humidity;
                                          // Reset no updates counter
                                          nNoUpdatesHum = 0;
                                          send(msgHum.set(humidity, 1));
                                      
                                          #ifdef MY_DEBUG
                                          Serial.print("H: ");
                                          Serial.println(humidity);
                                          #endif
                                        } else {
                                          // Increase no update counter if the humidity stayed the same
                                          nNoUpdatesHum++;
                                        }
                                      
                                        u8g2.firstPage();
                                        do {
                                        
                                        u8g2.setFont(u8g2_font_fub30_tn);
                                        u8g2.setCursor(2, 35);
                                        u8g2.print(temperature, 1);
                                        u8g2.setFont(u8g2_font_inb16_mf);
                                        u8g2.drawGlyph(88, 35, 0x00b0); // degree
                                        u8g2.drawStr(100, 35, "C");
                                        u8g2.setCursor(70, 60);
                                        u8g2.print(humidity, 0);
                                        u8g2.drawStr(100, 60, "%");
                                        u8g2.setFont(u8g2_font_open_iconic_thing_2x_t); // 16 pix height
                                        u8g2.drawGlyph(45, 60, 0x0048); // drop
                                        
                                        } while ( u8g2.nextPage() );
                                        
                                        // Sleep for a while to save energy
                                        //sleep(UPDATE_INTERVAL); 
                                        
                                        delay(UPDATE_INTERVAL);  // POWERED NODE
                                      }
                                      
                                      
                                      
                                      tekkaT 1 Reply Last reply
                                      0
                                      • T titvs

                                        @tekka Well, im running your beta code and like @itbeyond it seems to be working for 24h now. Uploaded the new compiles with the lib from the RF24Fix branch to all the nodes, gateway and repeater and it seems the drops stopped.
                                        Built a couple of Relay nodes, one of which is connected to the repeater and they also seem to be working correctly.

                                        Im linking the ZIP to the node log file with the RF24 verbose debug (its a tad big), if you want to take a look:

                                        LOG

                                        And this is my TEMP+HUM node sketch:

                                        // Enable debug prints
                                        //#define MY_DEBUG
                                        //#define MY_DEBUG_VERBOSE_RF24
                                        
                                        // Enable and select radio type attached 
                                        #define MY_RADIO_NRF24
                                        //#define MY_RADIO_RFM69
                                        //#define MY_RS485
                                        
                                        #define MY_RF24_CHANNEL 1   //////////////
                                        #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                                        
                                        // ONLY IF USING FIXED ID REPEATER
                                        //#define MY_PARENT_NODE_ID 0            // REPEATER NODE ID
                                        //#define MY_PARENT_NODE_IS_STATIC        // this will force your node to use only the repeater
                                        
                                        // #define MY_REPEATER_FEATURE
                                        
                                        #include <SPI.h>
                                        #include <MySensors.h>  
                                        #include <DHT.h>
                                        
                                        #include <U8g2lib.h>  //////////////////////
                                        #include <Wire.h>    /////////////////////////
                                        
                                        U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, A5, A4);   // U8G2 Constructor (A5 - Clock SCL ; A4 - Data SDA)
                                        
                                        #define DHT_DATA_PIN 3
                                        
                                        #define SENSOR_TEMP_OFFSET 0
                                        
                                        static const uint64_t UPDATE_INTERVAL = 60000;
                                        
                                        static const uint8_t FORCE_UPDATE_N_READS = 10;
                                        
                                        #define CHILD_ID_HUM 0
                                        #define CHILD_ID_TEMP 1
                                        
                                        float lastTemp;
                                        float lastHum;
                                        uint8_t nNoUpdatesTemp;
                                        uint8_t nNoUpdatesHum;
                                        bool metric = true;
                                        
                                        MyMessage msgHum(CHILD_ID_HUM, V_HUM);
                                        MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
                                        DHT dht;
                                        
                                        void before(){
                                        
                                           u8g2.begin();
                                        
                                           u8g2.firstPage();
                                           do {
                                             u8g2.setFont(u8g2_font_helvR14_tf);
                                             u8g2.drawStr(38,15,"OLED");
                                             u8g2.drawStr(15,35,"Temp+Hum");
                                             u8g2.drawStr(46,60,"v1.2");
                                           } while ( u8g2.nextPage() );
                                          
                                          delay(3000);
                                        
                                          u8g2.clear();
                                         
                                           u8g2.firstPage();
                                            do {
                                             u8g2.drawStr(3, 32, "Connecting...");
                                           } while ( u8g2.nextPage() );
                                        }
                                        
                                        void presentation()  
                                        { 
                                        
                                          // Send the sketch version information to the gateway
                                          sendSketchInfo("TEMPHUM_OLED", "1.2");
                                        
                                          // Register all sensors to gw (they will be created as child devices)
                                          present(CHILD_ID_HUM, S_HUM);
                                          present(CHILD_ID_TEMP, S_TEMP);
                                        
                                          metric = getControllerConfig().isMetric;
                                        }
                                        
                                        void setup()
                                        {
                                          
                                          u8g2.clear();
                                          
                                          dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
                                          if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
                                        
                                            u8g2.firstPage();
                                            do {
                                                u8g2.setFont(u8g2_font_haxrcorp4089_tr); // 7 PIXEL HIGHT
                                                u8g2.drawStr(1,12,"WARNING: UPDATE_INTERVAL");
                                               u8g2.drawStr(1,24,"is smaller than supported by");
                                                u8g2.drawStr(1,36,"the sensor!");
                                               } while ( u8g2.nextPage() );
                                            delay(4000);
                                        
                                          }
                                        
                                          sleep(dht.getMinimumSamplingPeriod());
                                        }
                                        
                                        void loop()      
                                        {  
                                        
                                         while (transportCheckUplink() == false){
                                        
                                          u8g2.firstPage();
                                          do {
                                            u8g2.setFont(u8g2_font_helvR14_tf); // 14 px height
                                            u8g2.drawStr(3, 32, "Disconnected!");
                                            } while ( u8g2.nextPage() );
                                         }
                                        
                                          dht.readSensor(true);
                                        
                                          float temperature = dht.getTemperature();
                                          if (isnan(temperature)) {
                                            Serial.println("Failed reading temperature from DHT!");
                                        
                                          } else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
                                            // Only send temperature if it changed since the last measurement or if we didn't send an update for n times
                                            lastTemp = temperature;
                                        
                                            // apply the offset before converting to something different than Celsius degrees
                                            temperature += SENSOR_TEMP_OFFSET;
                                        
                                            if (!metric) {
                                              temperature = dht.toFahrenheit(temperature);
                                            }
                                            // Reset no updates counter
                                            nNoUpdatesTemp = 0;
                                            send(msgTemp.set(temperature, 1));
                                        
                                            #ifdef MY_DEBUG
                                            Serial.print("T: ");
                                            Serial.println(temperature);
                                            #endif
                                          } else {
                                            // Increase no update counter if the temperature stayed the same
                                            nNoUpdatesTemp++;
                                          }
                                        
                                          // Get humidity from DHT library
                                          float humidity = dht.getHumidity();
                                          if (isnan(humidity)) {
                                            Serial.println("Failed reading humidity from DHT");
                                          } else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
                                            // Only send humidity if it changed since the last measurement or if we didn't send an update for n times
                                            lastHum = humidity;
                                            // Reset no updates counter
                                            nNoUpdatesHum = 0;
                                            send(msgHum.set(humidity, 1));
                                        
                                            #ifdef MY_DEBUG
                                            Serial.print("H: ");
                                            Serial.println(humidity);
                                            #endif
                                          } else {
                                            // Increase no update counter if the humidity stayed the same
                                            nNoUpdatesHum++;
                                          }
                                        
                                          u8g2.firstPage();
                                          do {
                                          
                                          u8g2.setFont(u8g2_font_fub30_tn);
                                          u8g2.setCursor(2, 35);
                                          u8g2.print(temperature, 1);
                                          u8g2.setFont(u8g2_font_inb16_mf);
                                          u8g2.drawGlyph(88, 35, 0x00b0); // degree
                                          u8g2.drawStr(100, 35, "C");
                                          u8g2.setCursor(70, 60);
                                          u8g2.print(humidity, 0);
                                          u8g2.drawStr(100, 60, "%");
                                          u8g2.setFont(u8g2_font_open_iconic_thing_2x_t); // 16 pix height
                                          u8g2.drawGlyph(45, 60, 0x0048); // drop
                                          
                                          } while ( u8g2.nextPage() );
                                          
                                          // Sleep for a while to save energy
                                          //sleep(UPDATE_INTERVAL); 
                                          
                                          delay(UPDATE_INTERVAL);  // POWERED NODE
                                        }
                                        
                                        
                                        
                                        tekkaT Offline
                                        tekkaT Offline
                                        tekka
                                        Admin
                                        wrote on last edited by
                                        #31

                                        @titvs ok, do you also have the repeater log + sketch? btw, for powered nodes I'd recommend using wait() instead of delay() - this ensures a proper functionality of the communcation stack.

                                        T 1 Reply Last reply
                                        0
                                        • tekkaT tekka

                                          @titvs ok, do you also have the repeater log + sketch? btw, for powered nodes I'd recommend using wait() instead of delay() - this ensures a proper functionality of the communcation stack.

                                          T Offline
                                          T Offline
                                          titvs
                                          wrote on last edited by
                                          #32

                                          @tekka i didnt save the log from the Repeater but if it helps i'm going to collect it. As for the Repeater sketch, its the default:

                                          // Enable debug prints to serial monitor
                                          //#define MY_DEBUG
                                          
                                          // Enable and select radio type attached
                                          #define MY_RADIO_NRF24
                                          //#define MY_RADIO_NRF5_ESB
                                          //#define MY_RADIO_RFM69
                                          //#define MY_RADIO_RFM95
                                          
                                          #define MY_NODE_ID 51    // FIXED NODE ID
                                          #define MY_PARENT_NODE_ID 0
                                          #define MY_PARENT_NODE_IS_STATIC
                                          
                                          #define MY_RF24_CHANNEL 1
                                          #define MY_RF24_PA_LEVEL RF24_PA_HIGH
                                          
                                          // Enabled repeater feature for this node
                                          #define MY_REPEATER_FEATURE
                                          
                                          #include <MySensors.h>
                                          
                                          void setup()
                                          {
                                          }
                                          
                                          void presentation()
                                          {
                                            //Send the sensor node sketch version information to the gateway
                                            sendSketchInfo("Repeater Node", "1.0");
                                          }
                                          
                                          void loop()
                                          {
                                          }```
                                          tekkaT 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          25

                                          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