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

This commit is contained in:
matt committed 2024-04-04 21:13:29 +11:00
1 parent 7dfe523c52
commit 0ec231cb0d
3 files changed
+13 -11

No files matched your search

+4 -4
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);
}
});