My Favorite Processing

* My button long presses detected from remotes for setting the my button.
* Allow setting of rolling code.
* Tuning for position setter and reading of hw sync bytes for repeats.
This commit is contained in:
Robert Strouse 2023-02-18 13:14:18 -08:00
parent d8038aebce
commit 765e8f3fd0
11 changed files with 605 additions and 87 deletions

View file

@ -86,6 +86,10 @@ void MQTTClass::receive(const char *topic, byte*payload, uint32_t length) {
else
shade->sendCommand(somfy_commands::My);
}
else if(strncmp(command, "mypos", sizeof(command)) == 0) {
if(val >= 0 && val <= 100)
shade->setMyPosition(val);
}
}
}
bool MQTTClass::connect() {
@ -106,6 +110,7 @@ bool MQTTClass::connect() {
somfy.publish();
this->subscribe("shades/+/target/set");
this->subscribe("shades/+/direction/set");
this->subscribe("shades/+/mypos/set");
mqttClient.setCallback(MQTTClass::receive);
return true;
}