AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.47k stars 348 forks source link

Each button of device “xiaomi.switch.pro3” is reported as “button_1_single”. #1365

Closed TioaChan closed 6 months ago

TioaChan commented 6 months ago

Device Definition: https://home.miot-spec.com/spec/xiaomi.switch.pro3

2024-05-20 22:56:19.893 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.124.52] {'topic': 'miio/report', 'data': b'{"id":695770722,"method":"event_occured","params":{"did":"1081544299","siid":5,"eiid":1,"tid":125,"ts":1716216979,"arguments":[]},"type":16}'}
2024-05-20 22:56:19.893 DEBUG (MainThread) [custom_components.xiaomi_gateway3.gate.192.168.124.52] {'uid': 'd4f0eaa98edb', 'did': '1081544299', 'msg': 'on_report', 'data': {'action': 'button_1_single'}}
2024-05-20 22:56:19.897 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.124.52] {'topic': 'central/report', 'data': b'{"id":175814574,"_to":128,"type":16,"method":"event_occured","params":{"did":"1081544299","siid":5,"eiid":1,"tid":125,"ts":1716216979,"arguments":[]}}'}
2024-05-20 22:56:20.610 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.124.52] {'topic': 'miio/report', 'data': b'{"id":524763723,"method":"event_occured","params":{"did":"1081544299","siid":6,"eiid":1,"tid":126,"ts":1716216979,"arguments":[]},"type":16}'}
2024-05-20 22:56:20.610 DEBUG (MainThread) [custom_components.xiaomi_gateway3.gate.192.168.124.52] {'uid': 'd4f0eaa98edb', 'did': '1081544299', 'msg': 'on_report', 'data': {'action': 'button_1_single'}}
2024-05-20 22:56:20.614 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.124.52] {'topic': 'central/report', 'data': b'{"id":1594955576,"_to":128,"type":16,"method":"event_occured","params":{"did":"1081544299","siid":6,"eiid":1,"tid":126,"ts":1716216979,"arguments":[]}}'}
2024-05-20 22:56:21.309 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.124.52] {'topic': 'central/report', 'data': b'{"id":1481788579,"_to":128,"type":16,"method":"event_occured","params":{"did":"1081544299","siid":7,"eiid":1,"tid":127,"ts":1716216980,"arguments":[]}}'}
2024-05-20 22:56:21.309 DEBUG (MainThread) [custom_components.xiaomi_gateway3.gate.192.168.124.52] {'uid': 'd4f0eaa98edb', 'did': '1081544299', 'msg': 'on_report', 'data': {'action': 'button_1_single'}}
2024-05-20 22:56:21.348 DEBUG (MainThread) [custom_components.xiaomi_gateway3.mqtt.192.168.124.52] {'topic': 'miio/report', 'data': b'{"id":2117384725,"method":"event_occured","params":{"did":"1081544299","siid":7,"eiid":1,"tid":127,"ts":1716216980,"arguments":[]},"type":16}'}

When I press the buttons of the switch in turn, each action is reported as "button_1_single".I'm sure this is an issue from the version upgrade, I'll roll back the version before the upgrade and collect logs from the old version.

TioaChan commented 6 months ago

from 'v4.0.5' roll back to 'v3.3.6'

2024-05-20 23:39:22.751 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] miio/report b'{"id":708313355,"method":"event_occured","params":{"did":"1081544299","siid":5,"eiid":1,"tid":154,"ts":1716219562,"arguments":[]},"type":16}'
2024-05-20 23:39:22.755 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] central/report b'{"id":1460299037,"_to":128,"type":16,"method":"event_occured","params":{"did":"1081544299","siid":5,"eiid":1,"tid":154,"ts":1716219562,"arguments":[]}}'
2024-05-20 23:39:22.794 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] miio/report_ack b'{"id":708313355,"result":"ok"}'
2024-05-20 23:39:23.690 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] miio/report b'{"id":115784356,"method":"event_occured","params":{"did":"1081544299","siid":6,"eiid":1,"tid":155,"ts":1716219563,"arguments":[]},"type":16}'
2024-05-20 23:39:23.693 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] central/report b'{"id":2000763039,"_to":128,"type":16,"method":"event_occured","params":{"did":"1081544299","siid":6,"eiid":1,"tid":155,"ts":1716219563,"arguments":[]}}'
2024-05-20 23:39:23.734 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] miio/report_ack b'{"id":115784356,"result":"ok"}'
2024-05-20 23:39:24.968 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] central/report b'{"id":1579340041,"_to":128,"type":16,"method":"properties_changed","params":[{"did":"1081544299","siid":8,"piid":2,"tid":156,"value":54}]}'
2024-05-20 23:39:24.968 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] miio/report b'{"id":1382384357,"method":"properties_changed","params":[{"did":"1081544299","siid":8,"piid":2,"tid":156,"value":54}],"type":16}'
2024-05-20 23:39:24.968 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] miio/report_ack b'{"id":1382384357,"result":"ok"}'
2024-05-20 23:39:24.968 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] central/report b'{"id":1099821042,"_to":128,"type":16,"method":"properties_changed","params":[{"did":"1081544299","siid":8,"piid":2,"tid":157,"value":86}]}'
2024-05-20 23:39:25.117 DEBUG (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.124.52 [MQTT] miio/report b'{"id":1998356358,"method":"event_occured","params":{"did":"1081544299","siid":7,"eiid":1,"tid":158,"ts":1716219564,"arguments":[]},"type":16}'

image

AlexxIT commented 2 months ago

https://github.com/AlexxIT/XiaomiGateway3/releases/tag/v4.0.6