Allow sending up, down, and stop packets from the hub address
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user