aarons22 / homebridge-bond

Homebridge plugin for Bond
MIT License
64 stars 31 forks source link

Toggle button not responding. #128

Closed StumbleNOLA closed 3 years ago

StumbleNOLA commented 3 years ago

Describe the bug The toggle state button for a fan light is not working as expected.

My office light (bond fan) is reading as off, while the light is on, and vice versus. Hitting the toggle button does nothing it just flashes the switch in the HomeKit app for a second but nothing else changes.

Information (please complete the following information): Current version Not sure about the firmware Hombridge UI

Logs [1/2/2021, 23:10:59] [Tasmota] Updating 'Kitchen lux temp humid status' to OFF [1/2/2021, 23:10:59] [Tasmota] Updating 'Kitchen lux temp humid status' Brightness to 0 [1/2/2021, 23:10:59] [Tasmota] Updating 'Kitchen lux temp humid status' Hue to 0 [1/2/2021, 23:10:59] [Tasmota] Updating 'Kitchen lux temp humid status' Saturation to 0 [1/2/2021, 23:11:04] [homebridge-magichome-dynamic-platform] Get Characteristic On -> false for device: 'Bed' [1/2/2021, 23:11:04] [homebridge-magichome-dynamic-platform] Get Characteristic Brightness -> 100 for device: 'Bed' [1/2/2021, 23:11:04] [homebridge-magichome-dynamic-platform] Get Characteristic Hue -> 0 for device: 'Bed' [1/2/2021, 23:11:08] [homebridge-magichome-dynamic-platform] Get Characteristic On -> false for device: 'Bed' [1/2/2021, 23:11:08] [homebridge-magichome-dynamic-platform] Get Characteristic Brightness -> 100 for device: 'Bed' [1/2/2021, 23:11:08] [homebridge-magichome-dynamic-platform] Get Characteristic Hue -> 0 for device: 'Bed' [1/2/2021, 23:11:12] [Bond] Request (185db1aa05460000) [put http://10.0.0.19/v2/devices/6fed2af6/actions/ToggleLight] [1/2/2021, 23:11:12] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183","t":"devices/6fed2af6/state","i":"0500005f11cd6849","f":100,"s":200,"m":0,"b":{"power":0,"speed":1,"light":0,"":"9a3bfd23"}} [1/2/2021, 23:11:12] [Bond] [Weee fan] Received new state: {"power":0,"speed":1,"light":0,"":"9a3bfd23"} [1/2/2021, 23:11:13] [Bond] Response (185db1aa05460000) [put http://10.0.0.19/v2/devices/6fed2af6/actions/ToggleLight] - "" [1/2/2021, 23:11:13] [Bond] [Weee fan] Set light power: false [1/2/2021, 23:11:26] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '10.0.0.255' for Magichome devices... [1/2/2021, 23:11:26] [homebridge-magichome-dynamic-platform] 1 - Discovered device... UniqueId: 'D8F15BA0C6D3' IpAddress '10.0.0.6' Model: 'AK001-ZJ2101' . [1/2/2021, 23:11:28] [homebridge-magichome-dynamic-platform] Discovered 1 devices.

[1/2/2021, 23:11:28] [homebridge-magichome-dynamic-platform] Device D8F15BA0C6D3 already registered. Registration update not required [1/2/2021, 23:11:28] [homebridge-magichome-dynamic-platform] Registered 0 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0

[1/2/2021, 23:11:56] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '10.0.0.255' for Magichome devices... [1/2/2021, 23:11:56] [homebridge-magichome-dynamic-platform] 1 - Discovered device... UniqueId: 'D8F15BA0C6D3' IpAddress '10.0.0.6' Model: 'AK001-ZJ2101' . [1/2/2021, 23:11:58] [homebridge-magichome-dynamic-platform] Discovered 1 devices.

[1/2/2021, 23:11:58] [homebridge-magichome-dynamic-platform] Device D8F15BA0C6D3 already registered. Registration update not required [1/2/2021, 23:11:58] [homebridge-magichome-dynamic-platform] Registered 0 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0

[1/2/2021, 23:11:58] [Bond] UDP message sent to 10.0.0.19:30007 [1/2/2021, 23:11:59] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183"} [1/2/2021, 23:12:06] [Bond] Request (185db1aa399d0000) [get http://10.0.0.19/v2/devices/6fed2af6/state] [1/2/2021, 23:12:06] [Bond] Response (185db1aa399d0000) [get http://10.0.0.19/v2/devices/6fed2af6/state] - {"power":0,"speed":1,"light":0,"":"9a3bfd23"} [1/2/2021, 23:12:06] [Bond] Request (185db1aa39ae0000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - body: {"light":1} [1/2/2021, 23:12:06] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183","t":"devices/6fed2af6/state","i":"185db1aa39ae0000","f":4,"s":204,"m":4} [1/2/2021, 23:12:06] [Bond] Response (185db1aa39ae0000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - "" [1/2/2021, 23:12:06] [Bond] [Weee fan] Light state toggled [1/2/2021, 23:12:08] [homebridge-magichome-dynamic-platform] Get Characteristic On -> false for device: 'Bed' [1/2/2021, 23:12:08] [homebridge-magichome-dynamic-platform] Get Characteristic Brightness -> 100 for device: 'Bed' [1/2/2021, 23:12:08] [homebridge-magichome-dynamic-platform] Get Characteristic Hue -> 0 for device: 'Bed' [1/2/2021, 23:12:20] [Bond] Request (185db1aa471e0000) [get http://10.0.0.19/v2/devices/6fed2af6/state] [1/2/2021, 23:12:20] [Bond] Response (185db1aa471e0000) [get http://10.0.0.19/v2/devices/6fed2af6/state] - {"power":0,"speed":1,"light":1,"":"7058a5d5"} [1/2/2021, 23:12:20] [Bond] Request (185db1aa4731c000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - body: {"light":0} [1/2/2021, 23:12:20] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183","t":"devices/6fed2af6/state","i":"185db1aa4731c000","f":4,"s":204,"m":4} [1/2/2021, 23:12:20] [Bond] Response (185db1aa4731c000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - "" [1/2/2021, 23:12:20] [Bond] [Weee fan] Light state toggled [1/2/2021, 23:12:22] [homebridge-magichome-dynamic-platform] Get Characteristic On -> false for device: 'Bed' [1/2/2021, 23:12:22] [homebridge-magichome-dynamic-platform] Get Characteristic Brightness -> 100 for device: 'Bed' [1/2/2021, 23:12:22] [homebridge-magichome-dynamic-platform] Get Characteristic Hue -> 0 for device: 'Bed' [1/2/2021, 23:12:26] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '10.0.0.255' for Magichome devices... [1/2/2021, 23:12:26] [homebridge-magichome-dynamic-platform] 1 - Discovered device... UniqueId: 'D8F15BA0C6D3' IpAddress '10.0.0.6' Model: 'AK001-ZJ2101' . [1/2/2021, 23:12:27] [Homebridge UI] [admin] Accessory layout changes saved. [1/2/2021, 23:12:28] [homebridge-magichome-dynamic-platform] Discovered 1 devices.

[1/2/2021, 23:12:28] [homebridge-magichome-dynamic-platform] Device D8F15BA0C6D3 already registered. Registration update not required [1/2/2021, 23:12:28] [homebridge-magichome-dynamic-platform] Registered 0 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0

[1/2/2021, 23:12:35] [Bond] Request (185db1aa55f54000) [get http://10.0.0.19/v2/devices/6fed2af6/state] [1/2/2021, 23:12:35] [Bond] Response (185db1aa55f54000) [get http://10.0.0.19/v2/devices/6fed2af6/state] - {"power":0,"speed":1,"light":0,"_":"192a3644"} [1/2/2021, 23:12:35] [Bond] Request (185db1aa5614c000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - body: {"light":1} [1/2/2021, 23:12:35] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183","t":"devices/6fed2af6/state","i":"185db1aa5614c000","f":4,"s":204,"m":4} [1/2/2021, 23:12:35] [Bond] Response (185db1aa5614c000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - "" [1/2/2021, 23:12:35] [Bond] [Weee fan] Light state toggled [1/2/2021, 23:12:37] [homebridge-magichome-dynamic-platform] Get Characteristic On -> false for device: 'Bed' [1/2/2021, 23:12:37] [homebridge-magichome-dynamic-platform] Get Characteristic Brightness -> 100 for device: 'Bed' [1/2/2021, 23:12:37] [homebridge-magichome-dynamic-platform] Get Characteristic Hue -> 0 for device: 'Bed'

[1/2/2021, 23:12:58] [homebridge-magichome-dynamic-platform] Discovered 1 devices.

[1/2/2021, 23:12:58] [homebridge-magichome-dynamic-platform] Device D8F15BA0C6D3 already registered. Registration update not required [1/2/2021, 23:12:58] [homebridge-magichome-dynamic-platform] Registered 0 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0

[1/2/2021, 23:12:58] [Bond] UDP message sent to 10.0.0.19:30007 [1/2/2021, 23:12:59] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183"} [1/2/2021, 23:13:26] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '10.0.0.255' for Magichome devices... [1/2/2021, 23:13:26] [homebridge-magichome-dynamic-platform] 1 - Discovered device... UniqueId: 'D8F15BA0C6D3' IpAddress '10.0.0.6' Model: 'AK001-ZJ2101' . [1/2/2021, 23:13:28] [homebridge-magichome-dynamic-platform] Discovered 1 devices.

[1/2/2021, 23:13:28] [homebridge-magichome-dynamic-platform] Device D8F15BA0C6D3 already registered. Registration update not required [1/2/2021, 23:13:28] [homebridge-magichome-dynamic-platform] Registered 0 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0

[1/2/2021, 23:13:56] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '10.0.0.255' for Magichome devices... [1/2/2021, 23:13:56] [homebridge-magichome-dynamic-platform] 1 - Discovered device... UniqueId: 'D8F15BA0C6D3' IpAddress '10.0.0.6' Model: 'AK001-ZJ2101' . [1/2/2021, 23:13:58] [homebridge-magichome-dynamic-platform] Discovered 1 devices.

[1/2/2021, 23:13:58] [homebridge-magichome-dynamic-platform] Device D8F15BA0C6D3 already registered. Registration update not required [1/2/2021, 23:13:58] [homebridge-magichome-dynamic-platform] Registered 0 Magichome device(s). New devices: 0 Cached devices that were seen this restart: 0 Cached devices that were not seen this restart: 0

[1/2/2021, 23:13:58] [Bond] UDP message sent to 10.0.0.19:30007 [1/2/2021, 23:13:59] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183"}

aarons22 commented 3 years ago

@StumbleNOLA looking at your logs, it appears the issue is your Bond is not emitting the state of the device.

Here is the transaction from your logs:

[1/2/2021, 23:12:35] [Bond] Request (185db1aa5614c000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - body: {"light":1}
[1/2/2021, 23:12:35] [Bond] UDP Message received from 10.0.0.19:30007 - {"B":"ZZDE38183","t":"devices/6fed2af6/state","i":"185db1aa5614c000","f":4,"s":204,"m":4}
[1/2/2021, 23:12:35] [Bond] Response (185db1aa5614c000) [patch http://10.0.0.19/v2/devices/6fed2af6/state] - ""
[1/2/2021, 23:12:35] [Bond] [Weee fan] Light state toggled

Here is the transaction from mine:

[3/31/2021, 9:15:02 PM] [Bond] Request (185e22bfde9d4000) [patch http://192.168.0.14/v2/devices/00000003/state] - body: {"light":1}
[3/31/2021, 9:15:02 PM] [Bond] UDP Message received from 192.168.0.14:30007 - {"B":"BD27788","t":"devices/00000003/state","i":"185e22bfde9d4000","f":4,"s":200,"m":4,"x":"http","b":{"power":0,"speed":1,"light":1,"_":"fcf9e7b7"}}
[3/31/2021, 9:15:02 PM] [Bond] [LR Fan] Received new state: {"power":0,"speed":1,"light":1,"_":"fcf9e7b7"}
[3/31/2021, 9:15:02 PM] [Bond] Response (185e22bfde9d4000) [patch http://192.168.0.14/v2/devices/00000003/state] - {"power":0,"speed":1,"light":1,"_":"fcf9e7b7"}
[3/31/2021, 9:15:02 PM] [Bond] [LR Fan] Light state toggled

If you look at the lines with UDP Message received and Response, you can see my device sends the new state value indicating the change worked, but yours does not.

This indicates to me that your Bond device is potentially out of date and needs to be updated. That's where I would start if I were you

InstigatorX commented 3 years ago

@aarons22 Toggle not working for me either and I'm getting the "new state".

[Bond] Request (185e3202526b8000) [get http://192.168.86.242/v2/devices/25b1336b/state] [Bond] Response (185e3202526b8000) [get http://192.168.86.242/v2/devices/25b1336b/state] - {"power":0,"":"aacbda2e"} [Bond] Request (185e320252710000) [patch http://192.168.86.242/v2/devices/25b1336b/state] - body: {"power":1} [Bond] UDP Message received from 192.168.86.242:30007 - {"B":"BB16627","t":"devices/25b1336b/state","i":"185e320252710000","f":4,"s":200,"m":4,"x":"http","b":{"power":1,"":"7abbc5cc"}} [Bond] [Gate] Received new state: {"power":1,"":"7abbc5cc"} [Bond] Response (185e320252710000) [patch http://192.168.86.242/v2/devices/25b1336b/state] - {"power":1,"":"7abbc5cc"} [Bond] [Gate] Gate power state toggled