youridijk / homebridge-kaku-ics2000

HomeKit support for Klik Aan Klik Uit ICS-2000
Apache License 2.0
21 stars 6 forks source link

Controlling multiple accessories at once #16

Closed MarijnDijks closed 1 year ago

MarijnDijks commented 1 year ago

When selecting a scene in the home app that needs multiple lights to be controlled at the same time, you get very mixed results. It either turns off one of the devices, or none of them. This makes scenes with more than one KAKU accessory useless. A fix that I have found is to send the commands separately through automations, but this is not flexible and takes a long time to set up.

youridijk commented 1 year ago

I’m familiar with this issue. The problem is that sending multiple commands rapidly after each other just doesn’t work with the ICS-2000. Don’t really know why. As a kind of workaround, I’m planning to add Kaku scenes as devices to this plugin. So if you want to turn on or off multiple devices, you can “turn on” a scene (aka run it).

EdgarKooren commented 1 year ago

When are you planning this feature for a release? i am stuck on the old ics-1000 plugin because of this issue. Have bought the ics-2000 a while ago and waiting for multiple command support. I have all kinds of scenes with multiple commands setup in homekit with the ics-1000 control center that works. Happy to help testing when you are ready

youridijk commented 1 year ago

Hard to say. I am currently busy with my internship that will end in a few week. When I’m done with my internship, I think I have enough time to get on it.

youridijk commented 1 year ago

@EdgarKooren a temporarily solution is to use a zigbee group created in the kaku app. These are already supported.

youridijk commented 1 year ago

Added scenes as devices to this plugin. Currently testing it on my own installation. If you want to use it now, manually use the feature/#16-add-scenes-support branch or install version 1.3.0-beta.1

EdgarKooren commented 1 year ago

I have tested the scene functionality during the afternoon. At first it worked fine, I could use the scenes and my lights were responding to it. Until I tried to turn on or off an individual lamp, it didn't work. After restarting the plugin and reconnecting it in Apple Home, everything gets the status not responding. I observe that when I change the name of a plug in the Kaku app, it does not update when I configure the ics-2000 bridge again in the Apple Home. The old name persist. It seems that the old name stays somewhere in a cache. The reload switch does not work anymore either.

EdgarKooren commented 1 year ago

After i install the previous version of the plugin i get the following error

Scherm­afbeelding 2023-02-07 om 17 17 18

{
    "name": "ICS-2000",
    "email": "****",
    "password": "****",
    "hideReloadSwitch": false,
    "_bridge": {
        "username": "****",
        "port": 57265
    },
    "platform": "KAKU-ICS2000"
}

I have nothing added to the Blacklist

Scherm­afbeelding 2023-02-07 om 17 18 36
youridijk commented 1 year ago

In #23 someone else has the blacklist error tho. I probably broke something in the ICS-2000 lib. Gonna fix it this afternoon.

youridijk commented 1 year ago

Further, I have the same problem with scenes working and lights not, will take a look at tho, but first fix the other issue.

youridijk commented 1 year ago

Current state: I guess I fixed the issue of not controlling devices. It's not tested yet, but I fixed some stupid mistakes, so it should work.

EdgarKooren commented 1 year ago

Current state: I guess I fixed the issue of not controlling devices. It's not tested yet, but I fixed some stupid mistakes, so it should work.

I guess there is not a new beta release yet? When you release it i will test it.

youridijk commented 1 year ago

Just released V1.3.0-beta.2 (and version 1.2.0-beta.4 of the lib)

youridijk commented 1 year ago

Released V1.3.0-beta.3 where I fixed the bug you experienced in #23

EdgarKooren commented 1 year ago

Released V1.3.0-beta.3 where I fixed the bug you experienced in #23

Awesome seems to work fine! I will thoroughly test it during the weekend. Awesome beta release @youridijk

EdgarKooren commented 1 year ago

There is a bug to mention

The evening scene kicked off “all lights out” which went perfectly.

In the morning the morning scene kicked off no response. Because there was no logging, no idea what was happening. Also no other scene of device works.

After restarting the Bridge it worked again.

EdgarKooren commented 1 year ago

There is a bug to mention

The evening scene kicked off “all lights out” which went perfectly.

In the morning the morning scene kicked off no response. Because there was no logging, no idea what was happening. Also no other scene of device works.

After restarting the Bridge it worked again.

@youridijk I run the beta release for a few days now. Besides the one time bug the scene functionality runs perfect. I think it is ready for a feature release. that's is up to you (-:

youridijk commented 1 year ago

I guess something went wrong with rerunning setup at night. But glad to hear it works! Just added debug logging for scenes (turn on debug mode in settings to see more logging about everything). I guess it will work, but just making sure it works through a beta.

EdgarKooren commented 1 year ago

I have found a new issue:

After delete a scene in de kaku app the scene still persist in the Home app after using the reload switch. This also occurring after a restart.

I think there still cached

youridijk commented 1 year ago

Did you delete the cache for the scene device in homebridge? Could be possible that it is cached.

EdgarKooren commented 1 year ago

I have 13 accessories including scenes

7398B17A-5E68-4E85-B552-CBC7B3FC2802

EdgarKooren commented 1 year ago

Did you delete the cache for the scene device in homebridge? Could be possible that it is cached.

Two minds think alike 😋

youridijk commented 1 year ago

I tested it with my own installation. You need to remove the "device" (the scene that's added to Homebridge as a device) from the cache in the homebridge settings. After that, restart Homebridge en the scene will be removed.

youridijk commented 1 year ago

Closing due inactivity.