RFM69 new driver delay
-
@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 ;) -
@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 ;) -
@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 exampleno 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! -
@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 exampleno 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! -
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``` -
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```