Allow sending up, down, and stop packets from the hub address

This commit is contained in:
2023-12-11 07:31:06 +11:00
parent 7dfe523c52
commit 0ec231cb0d
3 changed files with 13 additions and 11 deletions

View File

@@ -138,15 +138,15 @@ void onConnectionEstablished() {
Serial.println("Connection established");
client.subscribe("hotdog/test_mqtt_blind/set", [] (const String &payload) {
uint16_t shadeID = 0x0400;
uint16_t shadeID = 0x4EF1;
if (payload == "OPEN") {
remotePacketBuilder.buildUpPacket(buffer, shadeID);
hubPacketBuilder.buildUpPacket(buffer, shadeID);
sendCommand(buffer);
} else if (payload == "CLOSE") {
remotePacketBuilder.buildDownPacket(buffer, shadeID);
hubPacketBuilder.buildDownPacket(buffer, shadeID);
sendCommand(buffer);
} else if (payload == "STOP") {
remotePacketBuilder.buildStopPacket(buffer, shadeID);
hubPacketBuilder.buildStopPacket(buffer, shadeID);
sendCommand(buffer);
}
});