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. RFM69 new driver delay

RFM69 new driver delay

Scheduled Pinned Locked Moved Troubleshooting
67 Posts 10 Posters 7.9k Views 8 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.
  • scalzS Offline
    scalzS Offline
    scalz
    Hardware Contributor
    wrote on last edited by scalz
    #61

    @pepson
    just to know, when you get this issue, do you send to one shutter only? (because i see you're sending each %, each 200ms). Well we have already did a stress test in the past, one packet each 50-70ms with a dozen of nodes and it worked but that was with a local unoffcial lib, and not with rpi as gw.
    I don't remember if buffer has been implemented in regular branch, for rfm69 (but I think so). And it should work like you said it works with 2.2
    We'll be able retry some stress tests, unfortunately not on rpi as gw (not using this setup), I'm not sure but maybe only marceloaqno may be using rpi with rfm69 (not sure), and we're a very few rfm69 users. Let us check if it's a general problem or rpi as gw only.
    Sorry for disturbance ;)

    pepsonP 1 Reply Last reply
    0
    • scalzS scalz

      @pepson
      just to know, when you get this issue, do you send to one shutter only? (because i see you're sending each %, each 200ms). Well we have already did a stress test in the past, one packet each 50-70ms with a dozen of nodes and it worked but that was with a local unoffcial lib, and not with rpi as gw.
      I don't remember if buffer has been implemented in regular branch, for rfm69 (but I think so). And it should work like you said it works with 2.2
      We'll be able retry some stress tests, unfortunately not on rpi as gw (not using this setup), I'm not sure but maybe only marceloaqno may be using rpi with rfm69 (not sure), and we're a very few rfm69 users. Let us check if it's a general problem or rpi as gw only.
      Sorry for disturbance ;)

      pepsonP Offline
      pepsonP Offline
      pepson
      wrote on last edited by
      #62

      @scalz
      Hmmm
      I am not advanced user. This sketch i found on github from other user. I can change sometinh in sketch to test it ? Can you help me what change in sketch to test ?

      1 Reply Last reply
      0
      • scalzS Offline
        scalzS Offline
        scalz
        Hardware Contributor
        wrote on last edited by scalz
        #63

        @pepson
        no idea if it will help you, but what i meant is sending less msg .
        I think i recognize some parts of this sketch, not sure :)

        So, in your sketch, here you can see it sends at each %

          if (isMoving) 
          {
            unsigned long _now = millis();
            if (_now - lastLevelTime >= timeOneLevel * 1000) {
              if (directionUpDown == DIRECTION_UP) {
                currentShutterLevel += 1;
              } else {
                currentShutterLevel -= 1;
              }
              currentShutterLevel = constrain(currentShutterLevel, 0, 100);
              #ifdef MY_DEBUG
              Serial.println(String(requestedShutterLevel));
              Serial.println(String(currentShutterLevel));
              #endif
              lastLevelTime = millis();
              send(msgPercentage.set(currentShutterLevel));
        

        try to change this last line, by:

        if (currentShutterLevel % 5 == 0) send(msgPercentage.set(currentShutterLevel)); // change 5 by 10 if you want to send each 10% for example
        

        no worry about shutter level update in controller, because when it will stop it will send its level (with sendstate in shutterhalt).
        As your settings in top of sketch is 20sec for a complete roll, then it should send each second instead of 200ms previously (except if you did some calibration), and if i'm not wrong, I quickly read it!

        pepsonP 1 Reply Last reply
        0
        • scalzS scalz

          @pepson
          no idea if it will help you, but what i meant is sending less msg .
          I think i recognize some parts of this sketch, not sure :)

          So, in your sketch, here you can see it sends at each %

            if (isMoving) 
            {
              unsigned long _now = millis();
              if (_now - lastLevelTime >= timeOneLevel * 1000) {
                if (directionUpDown == DIRECTION_UP) {
                  currentShutterLevel += 1;
                } else {
                  currentShutterLevel -= 1;
                }
                currentShutterLevel = constrain(currentShutterLevel, 0, 100);
                #ifdef MY_DEBUG
                Serial.println(String(requestedShutterLevel));
                Serial.println(String(currentShutterLevel));
                #endif
                lastLevelTime = millis();
                send(msgPercentage.set(currentShutterLevel));
          

          try to change this last line, by:

          if (currentShutterLevel % 5 == 0) send(msgPercentage.set(currentShutterLevel)); // change 5 by 10 if you want to send each 10% for example
          

          no worry about shutter level update in controller, because when it will stop it will send its level (with sendstate in shutterhalt).
          As your settings in top of sketch is 20sec for a complete roll, then it should send each second instead of 200ms previously (except if you did some calibration), and if i'm not wrong, I quickly read it!

          pepsonP Offline
          pepsonP Offline
          pepson
          wrote on last edited by
          #64

          @scalz

          Sorry but i dont know what line chage with this your line

          if (currentShutterLevel % 5 == 0) send(msgPercentage.set(currentShutterLevel)); // change 5 by 10 if you want to send each 10% for example```
          1 Reply Last reply
          0
          • scalzS Offline
            scalzS Offline
            scalz
            Hardware Contributor
            wrote on last edited by scalz
            #65

            @pepson
            I extracted a part of your sketch above. change the last line of the extract

            pepsonP 1 Reply Last reply
            0
            • scalzS scalz

              @pepson
              I extracted a part of your sketch above. change the last line of the extract

              pepsonP Offline
              pepsonP Offline
              pepson
              wrote on last edited by pepson
              #66

              @scalz

              Should looks like this ?

              if (isMoving) 
                {
                  unsigned long _now = millis();
                  if (_now - lastLevelTime >= timeOneLevel * 1000) {
                    if (directionUpDown == DIRECTION_UP) {
                      currentShutterLevel += 1;
                    } else {
                      currentShutterLevel -= 1;
                    }
                    currentShutterLevel = constrain(currentShutterLevel, 0, 100);
                    #ifdef MY_DEBUG
                    Serial.println(String(requestedShutterLevel));
                    Serial.println(String(currentShutterLevel));
                    #endif
                    lastLevelTime = millis();
                    if (currentShutterLevel % 5 == 0) send(msgPercentage.set(currentShutterLevel)); // change 5 by 10 if you want to send each 10% for example```
              pepsonP 1 Reply Last reply
              0
              • pepsonP pepson

                @scalz

                Should looks like this ?

                if (isMoving) 
                  {
                    unsigned long _now = millis();
                    if (_now - lastLevelTime >= timeOneLevel * 1000) {
                      if (directionUpDown == DIRECTION_UP) {
                        currentShutterLevel += 1;
                      } else {
                        currentShutterLevel -= 1;
                      }
                      currentShutterLevel = constrain(currentShutterLevel, 0, 100);
                      #ifdef MY_DEBUG
                      Serial.println(String(requestedShutterLevel));
                      Serial.println(String(currentShutterLevel));
                      #endif
                      lastLevelTime = millis();
                      if (currentShutterLevel % 5 == 0) send(msgPercentage.set(currentShutterLevel)); // change 5 by 10 if you want to send each 10% for example```
                pepsonP Offline
                pepsonP Offline
                pepson
                wrote on last edited by
                #67

                Ok tested as show in previus post. And the same problem. Maybe a little better. But maybe no...
                On 2.2.0 is a very very better.

                1 Reply Last reply
                0
                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.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