aarons22 / homebridge-bond

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

More than one "Smart by BOND" devices not detected #97

Closed Silmar-99 closed 4 years ago

Silmar-99 commented 4 years ago

When adding a second "Smart by BOND" fan+light, with a different fixed IP and Local Token, only the first one listed is recognized.

I already have a MBR Fan and I'm adding a DR Fan. Only the MBR Fan is showing up.

When putting a "dummy" token in the plugin for the MBR Fan, now it's the DR Fan which is actually under the MBR Fan. MBR Fan is not responding to any commands, and DR Fan is the one working.

Note they are perfectly recognized in the Bond iOS app.

jdlambert commented 4 years ago

Oh, probably because they have the same device ID (1). Unlike Bond Bridge devices, which have randomly-generated 32-bit hex IDs, Smart-by-Bond devices have fixed IDs.

I seem to recall this codebase expects the device ID to be unique, right? This is a case where it'll be necessary to fully qualify each device with its Bond ID too.

Silmar-99 commented 4 years ago

Oh, probably because they have the same device ID (1). Unlike Bond Bridge devices, which have randomly-generated 32-bit hex IDs, Smart-by-Bond devices have fixed IDs.

I seem to recall this codebase expects the device ID to be unique, right? This is a case where it'll be necessary to fully qualify each device with its Bond ID too.

Hey there!

Actually, they do have an unique ID and Local Token, that's why I'm surprised only one is recognized. Fan 1 ID: KNKSACG915XX Fan 2 ID:KNKSADE428XX Fan 3 ID: KNKSACG923XX

So how do you "fully qualify each device with its Bond ID too"? Even if I enter all three in the Settings of the Plugin, only the first one is recognized...

jdlambert commented 4 years ago

Actually, they do have an unique ID and Local Token, that's why I'm surprised only one is recognized. Fan 1 ID: KNKSACG915XX Fan 2 ID:KNKSADE428XX Fan 3 ID: KNKSACG923XX

Yeah, these "Bond IDs" are exactly what's needed to disambiguate here! A while back there was an issue with Bond Bridge devices with the same "device ID" not loading properly, with "device" here meaning an individually-controllable unit exposed by the Bond API. For your SBB fans, they've all got a single "device" with ID 1, but for Bond Bridges there could be dozens. (And we have some SBB products in the pipeline with 4 devices).

It's not a big deal for Bond Bridge devices because they randomly generate a 8-digit hex ID upon creation, but SBB IDs are set at the time of manufacture.

If the issue still remains, this codebase would just be referring to each of these fans by their device IDs. To distinguish between them, the "Bond ID" will have to be included somehow. We've previously used something like "KNKSACG915XX:1" and "KNKSADE428XX:1".

So how do you "fully qualify each device with its Bond ID too"? Even if I enter all three in the Settings of the Plugin, only the first one is recognized...

I mean that this will need to be handled in the plugin's code.

Silmar-99 commented 4 years ago

Thanks Jacob for taking the time to explain and troubleshoot for me. However, I'm a total illiterate when it comes to Homebridge programming and other "stuff". as I guess I get most of what you are saying above, could you please clarify the following:

aarons22 commented 4 years ago

There was a fix for this back in 2.7.0. The plugin using the convention <bond id><device id> (see here). You may need to clear cached accessories for it to work since the id is generated when accessories are added.

If you enable debugging by adding the -D flag when starting homebridge (i.e. homebridge -D), you should see a debug log Accessory id: with your unique accessory id.

Silmar-99 commented 4 years ago

Hey Aaron,

Thanks for the above, however and as mentioned before I'm a total rookie when it come to the different actions you are listing above...

Are you suggesting the fix was in 2.7.0 and it is not in the new versions of the plugin, so I do need to go and add that to your code? I wouldn't even know where to start to do so...

I will also have to look on how to clear the Bond cached accessories as I have a good number of them and I'm not looking to have to re-add and reprogram them, which took me months to finalize...

Same thing for the flag to add. I turn my iMac on and it loads Homebridge automatically. I do not know how to add anything to it...

I guess I have some research to do...

EDIT

It took me only few research to figure out how to do these things. New I can see my two fans listed into the Homebridge log with their different bond ID. However, only one appears in the cached accessories list (the first installed) and the second one is not showing up in HomeKit...

Any thoughts?

Silmar-99 commented 4 years ago

Hey Aaron and Team,

I was wondering if you have any update on my issue (I noticed the recent updates are focusing on shades, but who knows...)?

As I mentioned earlier, the plugin is not decking the two fans as different devices (see below), both different IP address and IDs:

[8/28/2020, 1:16:58 PM] [Bond] Response (185d0d925d88c000) [get http://192.168.0.146/v2/devices] - {"1":{"":"d1333752"},"":"4df5f9f2"} [8/28/2020, 1:16:58 PM] [Bond] Response (185d0d925d890000) [get http://192.168.0.146/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":259037,"make":"Chungear Industrial Co., Ltd.","model":"MR196W","branding_profile":"KOF_KNKSA","bondid":"KNKSACG91580","upgradehttp":true,"api":2,"":"b3331a8d"} [8/28/2020, 1:16:58 PM] [Bond] ** Bond Info *** bondId: KNKSACG91580 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/28/2020, 1:16:58 PM] [Bond] Response (185d0d925d890001) [get http://192.168.0.147/v2/devices] - {"1":{"":"9208b3a9"},"":"f25001fd"} [8/28/2020, 1:16:58 PM] [Bond] Response (185d0d925d890002) [get http://192.168.0.147/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":150366,"make":"Unbranded","model":"MR196W","branding_profile":"KOF_MR196W","bondid":"KNKSADE42861","upgradehttp":true,"api":2,"":"3f58e3fb"} [8/28/2020, 1:16:58 PM] [Bond] ** Bond Info *** bondId: KNKSADE42861 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/28/2020, 1:16:58 PM] [Bond] 1 cached accessories were loaded [8/28/2020, 1:16:58 PM] [Bond] Getting devices... [8/28/2020, 1:16:58 PM] [Bond] 1 devices were found on this Bond. [8/28/2020, 1:16:58 PM] [Bond] Attempting to add 0 devices that were not previously added. [8/28/2020, 1:16:58 PM] [Bond] Getting devices... [8/28/2020, 1:16:58 PM] [Bond] 1 devices were found on this Bond. [8/28/2020, 1:16:58 PM] [Bond] Attempting to add 0 devices that were not previously added.

However, only the first fan is found/added to my list of Homebridge accessories...

Any idea why?

I will gladly try to help by sharing anything about my configuration/testing it it helps troubleshooting the issue.

aarons22 commented 4 years ago

@Silmar-99 happy to help. Just to confirm, have you cleared cached accessories? If so, just need you to startup homebridge in debug mode so I can see some more granular logs. I've added some instructions on how to do that here.

aarons22 commented 4 years ago

To clarify, having debug logs specifically after cached accessories have been cleared is especially helpful in this situation because of the additional logs that occur while initially adding accessories.

Silmar-99 commented 4 years ago

Good morning Aaron,

Thanks a lot for willing to take some of your time to troubleshoot my issue.

I didn't clear my entire cached accessories because, as you will notice looking at the attached log, I have a certain number of them and deleting everything would take me hours to put back together (automations, sorting, ...), what I did, though was:

What happened after that is that my Master Bedroom Fan disappeared from Homekit to be replaced by my Dining Room Fan, as it is the second one setup in your plugin...

Which has been consistent with what I have seen in the past. If I set up only one fan in your plugin, it is recognized and created as an accessory and appears in HomeKit. But if I add a second one, it is apparently recognized by the plugin (based on the log), but not created as an accessory and does not appear subsequently in HomeKit.

And if I try to add both at the same time, only the last one will be created as an accessory.

Furthermore, if I remove the Dining Room one (second position) and just leave the Master Bedroom one, both the cache and HomeKit will still show the information of the DR one, but will now command the MDR one instead.

Let me know what you think.

Jérôme Istin, KG5GIV jerome.istin@gmail.com (Houston, TX - USA) - Motorcycle Marshal for the MS-150 (http://main.nationalmssociety.org/BP-MS-150)

On Fri, Aug 28, 2020 at 4:52 PM Aaron Sapp notifications@github.com wrote:

To clarify, having debug logs specifically after cached accessories have been cleared is especially helpful in this situation because of the additional logs that occur while initially adding accessories.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aarons22/homebridge-bond/issues/97#issuecomment-683162347, or unsubscribe https://github.com/notifications/unsubscribe-auth/APQ4NZJVKC2L4RTORMRL33DSDARK3ANCNFSM4OPNM3AA

aarons22 commented 4 years ago

@Silmar-99 Thanks for the detailed response! I understand about not wanting to clear all cached accessories. Maybe I'll add a property to the config to reset the homebridge-bond accessories 🤔

Anyways, the steps you took should be correct, although it looks like you may have hit a character limit in Github with the logs you posted. I'm only seeing a single Bond log. Would you be able to provide those debug logs again but only include lines with [Bond]? I have a hunch of what might be going on, but those debug logs will show the network requests and should confirm it.

Silmar-99 commented 4 years ago

Aaron,

Apologies, as I didn't realized we were chatting on GitHub, as I replied from my email (I was thinking we were chatting in private. Therefore I removed the entire log from my previous post).

Below a "cleaned" version of it as requested... Let me know...

[8/30/2020, 11:12:50 AM] [Bond] Request (185d100921fe4000) [get http://192.168.0.146/v2/devices] [8/30/2020, 11:12:50 AM] [Bond] Request (185d100921fe8000) [get http://192.168.0.146/v2/sys/version] [8/30/2020, 11:12:50 AM] [Bond] Request (185d100921fe8001) [get http://192.168.0.147/v2/devices] [8/30/2020, 11:12:50 AM] [Bond] Request (185d100921fe8002) [get http://192.168.0.147/v2/sys/version]

[8/30/2020, 11:12:51 AM] [Bond] Response (185d100921fe8001) [get http://192.168.0.147/v2/devices] - {"1":{"":"6c794dc0"},"":"f4d2f6f2"} [8/30/2020, 11:12:51 AM] [Bond] Response (185d100921fe4000) [get http://192.168.0.146/v2/devices] - {"1":{"":"f45fa761"},"":"9fd82454"} [8/30/2020, 11:12:51 AM] [Bond] Response (185d100921fe8002) [get http://192.168.0.147/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":142924,"make":"Unbranded","model":"MR196W","branding_profile":"KOF_MR196W","bondid":"KNKSADE42861","upgradehttp":true,"api":2,"":"f95738cd"} [8/30/2020, 11:12:51 AM] [Bond] ** Bond Info *** bondId: KNKSADE42861 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/30/2020, 11:12:51 AM] [Bond] Response (185d100921fe8000) [get http://192.168.0.146/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":142923,"make":"Chungear Industrial Co., Ltd.","model":"MR196W","branding_profile":"KOF_KNKSA","bondid":"KNKSACG91580","upgradehttp":true,"api":2,"":"b753cea0"} [8/30/2020, 11:12:51 AM] [Bond] ** Bond Info *** bondId: KNKSACG91580 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/30/2020, 11:12:51 AM] [Bond] 0 cached accessories were loaded [8/30/2020, 11:12:51 AM] [Bond] Getting devices... [8/30/2020, 11:12:51 AM] [Bond] 1 devices were found on this Bond. [8/30/2020, 11:12:51 AM] [Bond] Attempting to add 1 devices that were not previously added. [8/30/2020, 11:12:51 AM] [Bond] Request (185d100923630000) [get http://192.168.0.146/v2/devices/1] [8/30/2020, 11:12:51 AM] [Bond] Getting devices... [8/30/2020, 11:12:51 AM] [Bond] 1 devices were found on this Bond. [8/30/2020, 11:12:51 AM] [Bond] Attempting to add 1 devices that were not previously added. [8/30/2020, 11:12:51 AM] [Bond] Request (185d100923630001) [get http://192.168.0.147/v2/devices/1] [8/30/2020, 11:12:51 AM] [Bond] Response (185d100923630001) [get http://192.168.0.147/v2/devices/1] - {"name":"DR Fan","location":"Dining Room","type":"CF","actions":["TurnOn","TurnOff","TogglePower","SetSpeed","IncreaseSpeed","DecreaseSpeed","TurnLightOn","TurnLightOff","ToggleLight","SetTimer","BreezeOn","BreezeOff","SetBreeze"],"":"6c794dc0","state":{"":"6fc3b4a4"},"properties":{"":"53d48785"},"addr":{"":"4aff115f"}} [8/30/2020, 11:12:51 AM] [Bond] Request (185d100923724000) [get http://192.168.0.147/v2/devices/1/properties] [8/30/2020, 11:12:51 AM] [Bond] Response (185d100923630000) [get http://192.168.0.146/v2/devices/1] - {"name":"MBR Fan","location":"Master Bedroom","type":"CF","actions":["TurnOn","TurnOff","TogglePower","SetSpeed","IncreaseSpeed","DecreaseSpeed","SetTimer","BreezeOn","BreezeOff","SetBreeze"],"":"f45fa761","state":{"":"671d9799"},"properties":{"":"d15c8771"},"addr":{"":"9f2ff778"}} [8/30/2020, 11:12:51 AM] [Bond] Request (185d10092372c000) [get http://192.168.0.146/v2/devices/1/properties] [8/30/2020, 11:12:51 AM] [Bond] Response (185d100923724000) [get http://192.168.0.147/v2/devices/1/properties] - {"max_speed":4,"feature_light":true,"feature_brightness":false,"breeze_max_speed":3,"breeze_min_speed":1,"breezeperiod":30,"":"53d48785"} [8/30/2020, 11:12:51 AM] [Bond] [DR Fan] min step: 25, max value: 100 [8/30/2020, 11:12:51 AM] [Bond] Request (185d100923828000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 11:12:51 AM] [Bond] Request (185d100923828001) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 11:12:51 AM] [Bond] Request (185d10092382c000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 11:12:51 AM] [Bond] Adding accessory Dining Room DR Fan [8/30/2020, 11:12:51 AM] [Bond] Accessory id: KNKSACG915801 [8/30/2020, 11:12:51 AM] [Bond] Response (185d10092372c000) [get http://192.168.0.146/v2/devices/1/properties] - {"max_speed":4,"feature_light":false,"breeze_max_speed":3,"breeze_min_speed":1,"breezeperiod":30,"":"d15c8771"} [8/30/2020, 11:12:51 AM] [Bond] 1 has already been added. [8/30/2020, 11:12:51 AM] [Bond] Response (185d100923828000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"_":"671d9799"} [8/30/2020, 11:12:51 AM] [Bond] [DR Fan] speed value: 2 [8/30/2020, 11:12:51 AM] [Bond] [DR Fan] index value: 2 [8/30/2020, 11:12:51 AM] [Bond] [DR Fan] step value: 50

[8/30/2020, 11:12:51 AM] [Bond] Response (185d100923828001) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"671d9799"} [8/30/2020, 11:12:51 AM] [Bond] Response (185d10092382c000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"671d9799"} [8/30/2020, 11:13:59 AM] [Bond] Request (185d100965be8000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 11:13:59 AM] [Bond] Request (185d100965bec000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 11:13:59 AM] [Bond] Request (185d100965bec001) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 11:13:59 AM] [Bond] Response (185d100965be8000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"671d9799"} [8/30/2020, 11:13:59 AM] [Bond] got value: true [8/30/2020, 11:13:59 AM] [Bond] Response (185d100965bec000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"671d9799"} [8/30/2020, 11:13:59 AM] [Bond] [DR Fan] speed value: 2 [8/30/2020, 11:13:59 AM] [Bond] [DR Fan] index value: 2 [8/30/2020, 11:13:59 AM] [Bond] [DR Fan] step value: 50 [8/30/2020, 11:13:59 AM] [Bond] got value: 50 [8/30/2020, 11:13:59 AM] [Bond] Response (185d100965bec001) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"_":"671d9799"} [8/30/2020, 11:13:59 AM] [Bond] got value: false

aarons22 commented 4 years ago

Thanks @Silmar-99, these logs were very helpful (specifically the line [Bond] 1 has already been added). Turns out the duplicate device id was preventing the Accessory from being created, I just didn't realize I had an extra check in there from before I "fixed" this issue before.

Should be fixed in 2.8.6!

Silmar-99 commented 4 years ago

Yeah! I'm glad I could help as much as I'm glad you will be able to fix it in the next version! Thanks a lot for helping me with this one!

Silmar-99 commented 4 years ago

Hey Aaron,

Just installed the 2.8.6 version, restarted, removed the second fan, restarted, added the second fan, restarted, but the problem is still the same, the second fan is still not created as an accessory... :(

Jérôme Istin, KG5GIV jerome.istin@gmail.com (Houston, TX - USA) - Motorcycle Marshal for the MS-150 (http://main.nationalmssociety.org/BP-MS-150)

On Sun, Aug 30, 2020 at 1:39 PM Aaron Sapp notifications@github.com wrote:

Closed #97 https://github.com/aarons22/homebridge-bond/issues/97.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aarons22/homebridge-bond/issues/97#event-3707529029, or unsubscribe https://github.com/notifications/unsubscribe-auth/APQ4NZOQXVWPOTXXMALMNRLSDKMGRANCNFSM4OPNM3AA .

aarons22 commented 4 years ago

bummer. can you send logs again?

Silmar-99 commented 4 years ago

Aaron,

Here you go...

[8/30/2020, 2:55:28 PM] [Bond] Response (185d103c15ffc000) [get http://192.168.0.146/v2/devices] - {"1":{"":"04fc29f9"},"":"b503fc0b"} [8/30/2020, 2:55:28 PM] [Bond] Response (185d103c16000000) [get http://192.168.0.146/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":156280,"make":"Chungear Industrial Co., Ltd.","model":"MR196W","branding_profile":"KOF_KNKSA","bondid":"KNKSACG91580","upgradehttp":true,"api":2,"":"b753cea0"} [8/30/2020, 2:55:28 PM] [Bond] ** Bond Info *** bondId: KNKSACG91580 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/30/2020, 2:55:29 PM] [Bond] Response (185d103c16000001) [get http://192.168.0.147/v2/devices] - {"1":{"":"6c794dc0"},"":"f4d2f6f2"} [8/30/2020, 2:55:29 PM] [Bond] Response (185d103c16000002) [get http://192.168.0.147/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":156282,"make":"Unbranded","model":"MR196W","branding_profile":"KOF_MR196W","bondid":"KNKSADE42861","upgradehttp":true,"api":2,"":"f95738cd"} [8/30/2020, 2:55:29 PM] [Bond] ** Bond Info *** bondId: KNKSADE42861 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/30/2020, 2:55:29 PM] [Bond] 1 cached accessories were loaded [8/30/2020, 2:55:29 PM] [Bond] Getting devices... [8/30/2020, 2:55:29 PM] [Bond] 1 devices were found on this Bond. [8/30/2020, 2:55:29 PM] [Bond] Attempting to add 0 devices that were not previously added. [8/30/2020, 2:55:29 PM] [Bond] Getting devices... [8/30/2020, 2:55:29 PM] [Bond] 1 devices were found on this Bond. [8/30/2020, 2:55:29 PM] [Bond] Attempting to add 0 devices that were not previously added. [8/30/2020, 2:55:29 PM] [Bond] Configuring Accessory: Master Bedroom MBR Fan [8/30/2020, 2:55:29 PM] [Bond] [MBR Fan] min step: 25, max value: 100 [8/30/2020, 2:55:29 PM] [Bond] Request (185d103c187ac000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 2:55:29 PM] [Bond] Request (185d103c187ac001) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 2:55:29 PM] [Bond] Response (185d103c187ac000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"b0f0b061"} [8/30/2020, 2:55:29 PM] [Bond] [MBR Fan] speed value: 2 [8/30/2020, 2:55:29 PM] [Bond] [MBR Fan] index value: 2 [8/30/2020, 2:55:29 PM] [Bond] [MBR Fan] step value: 50 [8/30/2020, 2:55:29 PM] [Bond] Response (185d103c187ac001) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"b0f0b061"}

Jérôme Istin, KG5GIV jerome.istin@gmail.com (Houston, TX - USA) - Motorcycle Marshal for the MS-150 (http://main.nationalmssociety.org/BP-MS-150)

On Sun, Aug 30, 2020 at 2:43 PM Aaron Sapp notifications@github.com wrote:

bummer. can you send logs again?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aarons22/homebridge-bond/issues/97#issuecomment-683461915, or unsubscribe https://github.com/notifications/unsubscribe-auth/APQ4NZJDHUH5FB3DWDE4LV3SDKTVHANCNFSM4OPNM3AA .

aarons22 commented 4 years ago

@Silmar-99 thanks again, I see the problem but I don't have a clear solution without breaking other folks setups. Going to think on it for a bit

aarons22 commented 4 years ago

@Silmar-99 Okay I think I may have it this time (🤞 ). You'll definitely need to remove the accessory from the cached accessories, but give 2.8.7 a try and let me know.

Silmar-99 commented 4 years ago

Aaron,

I do have a good news and a bad one... The good is you fixed the "recognition" issues. Both fans are not recognized and added to the list of accessories. The bad is the controls are totally messed up... It seems that any commend I use for either the DR or MBR Fan are directed to the MBR (first in list one). Log below...

[8/30/2020, 4:21:02 PM] [Bond] Getting devices for this Bond (KNKSACG91580)... [8/30/2020, 4:21:02 PM] [Bond] 1 devices were found on this Bond (KNKSACG91580). [8/30/2020, 4:21:02 PM] [Bond] Attempting to add 1 devices that were not previously added. [8/30/2020, 4:21:02 PM] [Bond] Request (185d104facaa8000) [get http://192.168.0.146/v2/devices/1] [8/30/2020, 4:21:02 PM] [Bond] Getting devices for this Bond (KNKSADE42861)... [8/30/2020, 4:21:02 PM] [Bond] 1 devices were found on this Bond (KNKSADE42861). [8/30/2020, 4:21:02 PM] [Bond] Attempting to add 1 devices that were not previously added. [8/30/2020, 4:21:02 PM] [Bond] Request (185d104facaa8001) [get http://192.168.0.147/v2/devices/1] [8/30/2020, 4:21:02 PM] [Bond] Response (185d104facaa8000) [get http://192.168.0.146/v2/devices/1] - {"name":"MBR Fan","location":"Master Bedroom","type":"CF","actions":["TurnOn","TurnOff","TogglePower","SetSpeed","IncreaseSpeed","DecreaseSpeed","SetTimer","BreezeOn","BreezeOff","SetBreeze"],"":"04fc29f9","state":{"":"b0f0b061"},"properties":{"":"d15c8771"},"addr":{"":"9f2ff778"}} [8/30/2020, 4:21:02 PM] [Bond] Request (185d104facb74000) [get http://192.168.0.146/v2/devices/1/properties] [8/30/2020, 4:21:02 PM] [Bond] Response (185d104facaa8001) [get http://192.168.0.147/v2/devices/1] - {"name":"DR Fan","location":"Dining Room","type":"CF","actions":["TurnOn","TurnOff","TogglePower","SetSpeed","IncreaseSpeed","DecreaseSpeed","TurnLightOn","TurnLightOff","ToggleLight","SetTimer","BreezeOn","BreezeOff","SetBreeze"],"":"6c794dc0","state":{"":"6fc3b4a4"},"properties":{"":"53d48785"},"addr":{"":"4aff115f"}} [8/30/2020, 4:21:02 PM] [Bond] Request (185d104facb90000) [get http://192.168.0.147/v2/devices/1/properties] [8/30/2020, 4:21:02 PM] [Bond] Response (185d104facb74000) [get http://192.168.0.146/v2/devices/1/properties] - {"max_speed":4,"feature_light":false,"breeze_max_speed":3,"breeze_min_speed":1,"breezeperiod":30,"":"d15c8771"} [8/30/2020, 4:21:02 PM] [Bond] [MBR Fan] min step: 25, max value: 100 [8/30/2020, 4:21:02 PM] [Bond] Request (185d104facc7c000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 4:21:02 PM] [Bond] Request (185d104facc80000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 4:21:02 PM] [Bond] Adding accessory Master Bedroom MBR Fan [8/30/2020, 4:21:02 PM] [Bond] Device unique id: KNKSACG915801 [8/30/2020, 4:21:02 PM] [Bond] [MBR Fan] Accessory already added. [8/30/2020, 4:21:02 PM] [Bond] Response (185d104facb90000) [get http://192.168.0.147/v2/devices/1/properties] - {"max_speed":4,"feature_light":true,"feature_brightness":false,"breeze_max_speed":3,"breeze_min_speed":1,"breezeperiod":30,"":"53d48785"} [8/30/2020, 4:21:02 PM] [Bond] [DR Fan] min step: 25, max value: 100 [8/30/2020, 4:21:02 PM] [Bond] Request (185d104faccc4000) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 4:21:02 PM] [Bond] Request (185d104faccc4001) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 4:21:02 PM] [Bond] Request (185d104faccc4002) [get http://192.168.0.146/v2/devices/1/state] [8/30/2020, 4:21:02 PM] [Bond] Adding accessory Dining Room DR Fan [8/30/2020, 4:21:02 PM] [Bond] Device unique id: KNKSADE428611 [8/30/2020, 4:21:02 PM] [Bond] [DR Fan] Accessory already added. [8/30/2020, 4:21:02 PM] [Bond] Response (185d104facc7c000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"b0f0b061"} [8/30/2020, 4:21:02 PM] [Bond] [MBR Fan] speed value: 2 [8/30/2020, 4:21:02 PM] [Bond] [MBR Fan] index value: 2 [8/30/2020, 4:21:02 PM] [Bond] [MBR Fan] step value: 50 [8/30/2020, 4:21:02 PM] [Bond] Response (185d104facc80000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"b0f0b061"} [8/30/2020, 4:21:02 PM] [Bond] Response (185d104faccc4000) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"b0f0b061"} [8/30/2020, 4:21:02 PM] [Bond] [DR Fan] speed value: 2 [8/30/2020, 4:21:02 PM] [Bond] [DR Fan] index value: 2 [8/30/2020, 4:21:02 PM] [Bond] [DR Fan] step value: 50 [8/30/2020, 4:21:02 PM] [Bond] Response (185d104faccc4001) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"":"b0f0b061"} [8/30/2020, 4:21:02 PM] [Bond] Response (185d104faccc4002) [get http://192.168.0.146/v2/devices/1/state] - {"power":1,"speed":2,"timer":0,"breeze":[0,50,50],"_":"b0f0b061"}

aarons22 commented 4 years ago

@Silmar-99 once again your logs were very helpful! I'm surprised these bugs have existed for this long, so I appreciate you helping me get to the bottom of this. I believe I've fixed this new issue in the latest release.

Silmar-99 commented 4 years ago

Good morning Aaron,

You are more than welcome! It is a win-win situation... You chase the bugs and I will have my dumb fan becoming smart in the process :)

I'm thinking I'm just pushing the envelope, since this configuration was probably not what you had in mind when you created the plugin. I just hope you efforts will be useful for others Users too.

It may still be "confidential" for now, but when more and more people will discover than you can remotely control with your phone (and Home Assistants) you "dumb" and/or any style of fan you like for about $60, without having to spend an arm and a leg buying a "Smart" one, they will jump on it as I did...

Anyway, going back at the plugin, we are not there yet. It seems to be "unstable", as I have a lot of "Updating" and red exclamation point in HomeKit.

Looking at the log (but I'm not a programmer), it seems after both fans are discovered, the plugin only "speaks" to the second one (IP ..*.147) instead of both (146 for the MBR Fan and 147 for the DR Fan). In HomeKit, it does translate in the DR Tile working fine, but the MBR Tile doing nothing at all... As usual, logs below...

[8/31/2020, 8:14:51 AM] [Bond] Response (185d1129fcba4001) [get http://192.168.0.147/v2/devices] - {"1":{"":"feeba265"},"":"112fae54"} [8/31/2020, 8:14:51 AM] [Bond] Response (185d1129fcba8000) [get http://192.168.0.147/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":218644,"make":"Unbranded","model":"MR196W","branding_profile":"KOF_MR196W","bondid":"KNKSADE42861","upgradehttp":true,"api":2,"":"f95738cd"} [8/31/2020, 8:14:51 AM] [Bond] ** Bond Info *** bondId: KNKSADE42861 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/31/2020, 8:14:51 AM] [Bond] Response (185d1129fcba0000) [get http://192.168.0.146/v2/devices] - {"1":{"":"d17bef9a"},"":"86343090"} [8/31/2020, 8:14:51 AM] [Bond] Response (185d1129fcba4000) [get http://192.168.0.146/v2/sys/version] - {"target":"breck-northstar","fw_ver":"v2.10.12","fw_date":"Mon Dec 30 18:52:52 UTC 2019","uptime_s":218643,"make":"Chungear Industrial Co., Ltd.","model":"MR196W","branding_profile":"KOF_KNKSA","bondid":"KNKSACG91580","upgradehttp":true,"api":2,"":"b753cea0"} [8/31/2020, 8:14:51 AM] [Bond] ** Bond Info *** bondId: KNKSACG91580 FW: v2.10.12 API: v2 Make: MR196W Model: MR196W


[8/31/2020, 8:14:51 AM] [Bond] 2 cached accessories were loaded [8/31/2020, 8:14:51 AM] [Bond] Getting devices for this Bond (KNKSACG91580)... [8/31/2020, 8:14:51 AM] [Bond] 1 devices were found on this Bond (KNKSACG91580). [8/31/2020, 8:14:51 AM] [Bond] No new devices to add for this Bond (KNKSACG91580). [8/31/2020, 8:14:51 AM] [Bond] Getting devices for this Bond (KNKSADE42861)... [8/31/2020, 8:14:51 AM] [Bond] 1 devices were found on this Bond (KNKSADE42861). [8/31/2020, 8:14:51 AM] [Bond] No new devices to add for this Bond (KNKSADE42861). [8/31/2020, 8:14:52 AM] [Bond] Configuring Accessory: Master Bedroom MBR Fan [8/31/2020, 8:14:52 AM] [Bond] [MBR Fan] min step: 25, max value: 100 [8/31/2020, 8:14:52 AM] [Bond] Request (185d1129fd3a4000) [get http://192.168.0.147/v2/devices/1/state] [8/31/2020, 8:14:52 AM] [Bond] Request (185d1129fd3a8000) [get http://192.168.0.147/v2/devices/1/state] [8/31/2020, 8:14:52 AM] [Bond] Request (185d1129fd3ac000) [get http://192.168.0.147/v2/devices/1/state] [8/31/2020, 8:14:52 AM] [Bond] Configuring Accessory: Dining Room DR Fan [8/31/2020, 8:14:52 AM] [Bond] [DR Fan] min step: 25, max value: 100 [8/31/2020, 8:14:52 AM] [Bond] Request (185d1129fd3c0000) [get http://192.168.0.147/v2/devices/1/state] [8/31/2020, 8:14:52 AM] [Bond] Request (185d1129fd3c4000) [get http://192.168.0.147/v2/devices/1/state] [8/31/2020, 8:14:52 AM] [Bond] Request (185d1129fd3c4001) [get http://192.168.0.147/v2/devices/1/state] [8/31/2020, 8:14:52 AM] [myQ] myQ API: Successfully connected to the myQ API. [8/31/2020, 8:14:52 AM] [Bond] Response (185d1129fd3a4000) [get http://192.168.0.147/v2/devices/1/state] - {"power":1,"speed":2,"light":1,"timer":0,"breeze":[0,50,50],"":"50005835"} [8/31/2020, 8:14:52 AM] [Bond] [MBR Fan] speed value: 2 [8/31/2020, 8:14:52 AM] [Bond] [MBR Fan] index value: 2 [8/31/2020, 8:14:52 AM] [Bond] [MBR Fan] step value: 50 [8/31/2020, 8:14:52 AM] [Bond] Response (185d1129fd3a8000) [get http://192.168.0.147/v2/devices/1/state] - {"power":1,"speed":2,"light":1,"timer":0,"breeze":[0,50,50],"":"50005835"} [8/31/2020, 8:14:52 AM] [Bond] Response (185d1129fd3ac000) [get http://192.168.0.147/v2/devices/1/state] - {"power":1,"speed":2,"light":1,"timer":0,"breeze":[0,50,50],"":"50005835"} [8/31/2020, 8:14:52 AM] [Bond] Response (185d1129fd3c0000) [get http://192.168.0.147/v2/devices/1/state] - {"power":1,"speed":2,"light":1,"timer":0,"breeze":[0,50,50],"":"50005835"}

aarons22 commented 4 years ago

Hey @Silmar-99 - Let's try this again with 2.8.9. You'll definitely need to clear your bonds from the cached accessories.

Silmar-99 commented 4 years ago

Hey Aaron!

You are definitively making progress here... I am now able to control both fans (light and fan) separately from the Homebridge interface.

BTW, not only I had to remove both cached accessories, but I also had to remove them from your plugin configuration, reboot Homebridge, and re-add them one by one.

What is still missing? I still have issues with HomeKit (but I'm not sure if it is of the resort of your plugin, Homebridge itself or Apple). It can take several seconds for the command to be executed. Also I have a not of "Non responding" status, orange "!" and turning wheels, like the communication between HomeKit and the device is taking forever to go one way or another...

Will it be something you can look into? Or would it be out of your plugin scope?

aarons22 commented 4 years ago

That's great to hear! I think your other issues will be resolved in the 3.0.0 version I'm working on. A lot of improvements to help speed network interactions. That should be ready soon!

Silmar-99 commented 4 years ago

Great news!

I'm looking forward to it. Thanks again for all the help Aaron!