youridijk / homebridge-kaku-ics2000

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

Any updates? #1

Closed childledj closed 2 years ago

childledj commented 2 years ago

Great plugin! I've wait for it for a long time!

  1. Every device connected to ICS-2000 detects like lamps, even Sockets, Switches and Sensors, will it be possible to change them? In my setup I have sockets, hidden relays, doorbell, ambient light sensor.
  2. When I configure plugin via Plugins/KAKU ICS-2000/Settings - there are some collisions with config.json (e.g. Platform: "ExampleHomebrigdePlugin" instead of "KAKU-ICS2000") and vice versa when I change settings in config.json, in plugin settings everything disappears (kaku user, password etc.). I have stopped now on working option when I use config.json to configure KAKU plugin but in most cases it is difficult to catch that moment when everything works fine.
arnoldwillems84 commented 2 years ago

I am experiencing the same issue as you discribed at point 2

childledj commented 2 years ago

Still waiting for the plugin update

youridijk commented 2 years ago

I just released an update to fix the second issue. As for the first one: In only have wall sockets connected with lights and lightbulbs from KAKU, so that's why everything is a lamp in homebridge. I will change everything that you can only turn on an off to a switch in a future update, so you can decide yourself what type it is (you can say to HomeKit that a switch is a light)

childledj commented 2 years ago

I just released an update to fix the second issue. As for the first one: In only have wall sockets connected with lights and lightbulbs from KAKU, so that's why everything is a lamp in homebridge. I will change everything that you can only turn on an off to a switch in a future update, so you can decide yourself what type it is (you can say to HomeKit that a switch is a light)

Thank you for your plugin and it’s support!
I think in most cases it will be enough to choose from light, socket, switch and fan (just on and off).

youridijk commented 2 years ago

I just made a commit that adds your request + another feature. I'm testing this for a few days on my own homebridge setup and if it's working, I'll publish it on npm.

arnoldwillems84 commented 2 years ago

Hi @youridijk could you please also add smoke detectors ?

youridijk commented 2 years ago

Since I don't own a smoke detector that works with KAKU, it will be very hard to add that functionality. I don't know how much programming skills you have, but maybe you can try it yourself! I ever own a smoke detector that works with KAKU, I'll try to add it!

arnoldwillems84 commented 2 years ago

@youridijk ,

No worries, maybe we can help each other out with this. I am a developer but normally script in different languages and have never used TypeScript. Mainly I script in SuiteScript which is build on JavaScript.

I noticed when I update the package.json file on my server, that I can point the plugin to my forked github repo which enables me to test any changes.

I will wait till you push your final changes and will familiarize my self then with your scripts.

Is there any documentation you would recommend our that you use for this development related to the KAKU api's ?

Thanks in advance

Arnold

youridijk commented 2 years ago

Well if you need any help, feel free to ask! For developing this plugin I used the official documentation of homebridge and this library written in Python. I rewrote parts of the library in TypeScript to use with this plugin. There isn't really documentation available, but the code of Stijn really explains itself and I will write some documentation for the KAKU api. The API in brief: The Hub (ICS-2000) works with encrypted UPD messages (128-AES, IV is all zero's and encryption keys is stored on your account on Trust server). This messages are directly send to the Hub from your device. In this message you specify the new status of a specified device. The (encrypted with same key as mentioned before) list of devices is stored on Trust server along with current status of the devices (the server knows status for all devices, also the devices that officially don't support it, like wall plugs not using Zigbee). For more details, take a look at Stijn's library or my code in the KAKU folder (the files in that folder are used for communication with the Hub).

Edit -- One note for the device list from the Trust server: In my case, the list contains devices that were already deleted, don't know why they are still there. That's why I am using a device blacklist to filter these devices (I tried to filter it out using code, but every filter filters some active devices as well.

Ps: Judging by your name, I think you are Dutch, so am I. So if you have questions, you can contact me using e-mail in English or Dutch on steltje.maraboe_0q@icloud.com

jocstone commented 2 years ago

Hi all, I know nothing about scripting but happy to test or provide information about these things. My homebridge runs on my qnap server. I have all kinds of receivers and transmitters as well as some zigbee (Ledvance) wall plugs. Also water detector. So, please shout if anything needed 😀 PS: also Dutch speaking.

arnoldwillems84 commented 2 years ago

Hi all,

Thanks for the feedback and yes you guessed write I am Dutch :) I am also running this on my QNAP and will have a look to see if I can help as its a new area for me but always good to challenge your self with new things.

Gr

youridijk commented 2 years ago

@jocstone Thanks for offering help! At the moment, I started writing documentation about the ICS-2000. If you want to help, you can read the docs and provide feedback, and if you want, you can improve the docs (you can help with non technical things, like better sentence structure). And if the docs are done, maybe you can translate the docs to Dutch. Because I think most people using Klik Aan Klik Uit are Dutch, it would be nice to also have Dutch. But my primary focus is making docs in English, so everyone can read it.

Edit: @arnoldwillems84 I added a method to the hub to easily get a JSON list of all devices, rooms, etc. from the cloud and I started with documentation on the ICS-2000 in the docs branch

childledj commented 2 years ago

After update to 1.0.3 every kaku device began to consist of two switches - “lightbulb “ and “switch”, with only “switch” works to control device. 646C9033-E202-43BF-9440-57E18171B127

youridijk commented 2 years ago

@childledj Please open up a new issue for this

youridijk commented 2 years ago

@arnoldwillems84 I created detailed docs in the docs folder about everything I know about the ICS-2000. I hope this will help you with your development!

youridijk commented 2 years ago

Closing issue as the original issue is resolved