Closed ludodoucet closed 6 years ago
The state
value is serialized, it is not meant to be used that way. Just call .getCurrentLevel()
and you'll have the level, what's wrong with this?
I look where I can put it in my code and I come back to you. Thanks.
it's work, thank you.
void shuttersWriteStateHandler1(Shutters* shutters, const char* state, byte length) {
for (byte i = 0; i < length; i++) {
EEPROM.write(eepromOffset1 + i, state[i]);
}
byte level = shutters->getCurrentLevel();
if (debug == true) {Serial.print("shutters1 at ");
Serial.print(level);
Serial.println("% write");}
if (level != 255) { MQTTout(1, level);}
}
You're welcome!
Hello,
I want to get the state in percent when the shutter is halted.
where: shutters1 at 00007421703598089056% write when shutter is at 10% shutters1 at 00007421703598081376% write when shutter is at 15%
with:
the state in percent change at every step, I want to have it only when is halted, can you help me 'stp'?