Hi Ben,
I just implemented your recent code changes, I confirm that granule control of rooms and channels is working for my requirements so a big “Thank you!” for this. However I have noticed that when I control the light switch from the physical wall plate, light states do not get updated on Home Assistant it seems it is still a one-way communication from Home Assistant to RakoBridge.
Please see below container log output for your information, I would appreciate if you can advise if this is how it was intended to work or 2-way communication is possible ?
Many Thanks
2020-05-27 22:37:33 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:38:33 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:38:33 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:38:33 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:38:33 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:39:33 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:39:33 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:39:33 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:39:33 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:40:02 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), ‘rako/room/9/channel/1/set’, … (15 bytes),
2020-05-27 22:40:02 DEBUG (MainThread) [commander] [rakomqtt.RakoBridge] payload {‘room’: 9, ‘ch’: 1, ‘lev’: 255},
2020-05-27 22:40:02 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 7, 0, 9, 1, 52, 1, 255, 194],
2020-05-27 22:40:02 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m1), ‘b’rako/room/9/channel/1’’, … (34 bytes),
2020-05-27 22:40:02 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9/channel/1: {“state”: “ON”, “brightness”: 255}. response: (0, 1),
2020-05-27 22:40:07 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), ‘rako/room/9/channel/1/set’, … (16 bytes),
2020-05-27 22:40:07 DEBUG (MainThread) [commander] [rakomqtt.RakoBridge] payload {‘room’: 9, ‘ch’: 1, ‘lev’: 0},
2020-05-27 22:40:07 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 7, 0, 9, 1, 52, 1, 0, 193],
2020-05-27 22:40:07 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m2), ‘b’rako/room/9/channel/1’’, … (33 bytes),
2020-05-27 22:40:07 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9/channel/1: {“state”: “OFF”, “brightness”: 0}. response: (0, 2),
2020-05-27 22:40:33 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:40:33 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:40:34 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:40:34 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:41:30 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), ‘rako/room/9/channel/4/set’, … (16 bytes),
2020-05-27 22:41:30 DEBUG (MainThread) [commander] [rakomqtt.RakoBridge] payload {‘room’: 9, ‘ch’: 4, ‘lev’: 0},
2020-05-27 22:41:31 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 7, 0, 9, 4, 52, 1, 0, 190],
2020-05-27 22:41:31 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m3), ‘b’rako/room/9/channel/4’’, … (33 bytes),
2020-05-27 22:41:31 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9/channel/4: {“state”: “OFF”, “brightness”: 0}. response: (0, 3),
2020-05-27 22:41:32 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), ‘rako/room/17/channel/2/set’, … (16 bytes),
2020-05-27 22:41:32 DEBUG (MainThread) [commander] [rakomqtt.RakoBridge] payload {‘room’: 17, ‘ch’: 2, ‘lev’: 0},
2020-05-27 22:41:32 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 7, 0, 17, 2, 52, 1, 0, 184],
2020-05-27 22:41:32 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m4), ‘b’rako/room/17/channel/2’’, … (33 bytes),
2020-05-27 22:41:32 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/17/channel/2: {“state”: “OFF”, “brightness”: 0}. response: (0, 4),
2020-05-27 22:41:34 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:41:34 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:41:36 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:41:36 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), ‘rako/room/9/channel/2/set’, … (16 bytes),
2020-05-27 22:41:36 DEBUG (MainThread) [commander] [rakomqtt.RakoBridge] payload {‘room’: 9, ‘ch’: 2, ‘lev’: 0},
2020-05-27 22:41:36 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 7, 0, 9, 2, 52, 1, 0, 192],
2020-05-27 22:41:36 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m5), ‘b’rako/room/9/channel/2’’, … (33 bytes),
2020-05-27 22:41:36 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9/channel/2: {“state”: “OFF”, “brightness”: 0}. response: (0, 5),
2020-05-27 22:41:36 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), ‘rako/room/17/channel/1/set’, … (16 bytes),
2020-05-27 22:41:36 DEBUG (MainThread) [commander] [rakomqtt.RakoBridge] payload {‘room’: 17, ‘ch’: 1, ‘lev’: 0},
2020-05-27 22:41:36 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 7, 0, 17, 1, 52, 1, 0, 185],
2020-05-27 22:41:36 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m6), ‘b’rako/room/17/channel/1’’, … (33 bytes),
2020-05-27 22:41:36 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/17/channel/1: {“state”: “OFF”, “brightness”: 0}. response: (0, 6),
2020-05-27 22:41:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), ‘rako/room/9/channel/3/set’, … (16 bytes),
2020-05-27 22:41:37 DEBUG (MainThread) [commander] [rakomqtt.RakoBridge] payload {‘room’: 9, ‘ch’: 3, ‘lev’: 0},
2020-05-27 22:41:37 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 7, 0, 9, 3, 52, 1, 0, 191],
2020-05-27 22:41:37 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m7), ‘b’rako/room/9/channel/3’’, … (33 bytes),
2020-05-27 22:41:37 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9/channel/3: {“state”: “OFF”, “brightness”: 0}. response: (0, 7),
2020-05-27 22:41:39 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:42:34 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:42:34 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:42:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:42:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:43:34 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:43:34 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:43:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:43:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:43:39 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 10, 0, 9, 0, 49, 1, 3, 0, 0, 0, 194],
2020-05-27 22:43:39 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m8), ‘b’rako/room/9’’, … (34 bytes),
2020-05-27 22:43:39 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9: {“state”: “ON”, “brightness”: 128}. response: (0, 8),
2020-05-27 22:44:35 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:44:35 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:44:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:44:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:45:09 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 10, 0, 9, 0, 49, 1, 4, 0, 0, 0, 193],
2020-05-27 22:45:09 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m9), ‘b’rako/room/9’’, … (33 bytes),
2020-05-27 22:45:09 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9: {“state”: “ON”, “brightness”: 64}. response: (0, 9),
2020-05-27 22:45:11 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 10, 0, 9, 0, 50, 128, 0, 0, 1, 0, 68],
2020-05-27 22:45:11 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] unhandled bytestring: 50 is not a valid RakoCommandType,
2020-05-27 22:45:12 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 5, 0, 9, 0, 15, 232],
2020-05-27 22:45:12 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] unhandled bytestring: 15 is not a valid RakoCommandType,
2020-05-27 22:45:12 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 10, 0, 9, 0, 50, 128, 0, 0, 1, 0, 68],
2020-05-27 22:45:12 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] unhandled bytestring: 50 is not a valid RakoCommandType,
2020-05-27 22:45:12 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 5, 0, 9, 0, 15, 232],
2020-05-27 22:45:12 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] unhandled bytestring: 15 is not a valid RakoCommandType,
2020-05-27 22:45:13 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 10, 0, 9, 0, 50, 128, 0, 0, 1, 0, 68],
2020-05-27 22:45:13 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] unhandled bytestring: 50 is not a valid RakoCommandType,
2020-05-27 22:45:13 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 5, 0, 9, 0, 15, 232],
2020-05-27 22:45:13 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] unhandled bytestring: 15 is not a valid RakoCommandType,
2020-05-27 22:45:35 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:45:35 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:45:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:45:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:46:35 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:46:35 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:46:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:46:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:47:24 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 10, 0, 9, 0, 49, 1, 4, 0, 0, 0, 193],
2020-05-27 22:47:24 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m10), ‘b’rako/room/9’’, … (33 bytes),
2020-05-27 22:47:24 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9: {“state”: “ON”, “brightness”: 64}. response: (0, 10),
2020-05-27 22:47:26 DEBUG (MainThread) [watcher] [rakomqtt.RakoBridge] received byte_list: [83, 10, 0, 9, 0, 49, 1, 3, 0, 0, 0, 194],
2020-05-27 22:47:26 DEBUG (MainThread) [watcher] [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m11), ‘b’rako/room/9’’, … (34 bytes),
2020-05-27 22:47:26 DEBUG (MainThread) [watcher] [rakomqtt.MQTTClient] published to rako/room/9: {“state”: “ON”, “brightness”: 128}. response: (0, 11),
2020-05-27 22:47:36 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:47:36 DEBUG (Thread-1) [watcher] [paho.mqtt.client] Received PINGRESP,
2020-05-27 22:47:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Sending PINGREQ,
2020-05-27 22:47:37 DEBUG (MainThread) [commander] [paho.mqtt.client] Received PINGRESP,’