youridijk / homebridge-kaku-ics2000

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

HomeBridge dimmables wrong values #28

Open youridijk opened 11 months ago

youridijk commented 11 months ago

In #12 @RonaldR and @martienvd pointed this out. In my case the following happens:

I'll wait and see if HomeBridge team fixes this. Please open an issue at their repo.

RonaldR commented 11 months ago

@youridijk is maxBrightness: 15 in https://github.com/youridijk/ICS-2000-NodeJS/blob/main/src/kaku/DeviceConfigs.ts not the issue?

youridijk commented 11 months ago

No it isn't. In my case the entity ID is not 2. Don't remember which device has entity ID 2, but that can't be the issue. It's just a iOS 17 bug, because the code hasn't changed in the past half year.

rickklh commented 11 months ago

Same issue here, I think that the issue indeed started when updated to iOS 17. I ordered ah older iPad today i hope it has iOS 16.x installed. I can try it out if its in iOS.

In Home it shows the correct value in the small overview after comparing it to the default KAKU app but when you open the dimmables to set the value it is shows very low values.

example: overview 40% open 6% overview 47% open 7% overview 13% open 2%

you can change it a bit but it falls back down but it will change. When I try to up the 13% / 2% it falls back stays on 11% and the overview shows 73%.

youridijk commented 11 months ago

Yes, same problems here as you describe. Definitely an issues with homebridge, but can’t seem to find an issue about it on their GitHub or somewhere else. Feels weird, can’t be that it’s just us. Anyone experiencing same issues with other plugins?

rickklh commented 11 months ago

Oké, tested on an iPad with iOS 16.4 and no issues. So it has definitely something to do with iOS 17 but not sure if it is homebridge or the kaku plugin (or both) updated homebridge to the latest version and node.js

youridijk commented 11 months ago

I fixed the issue by manually convert the 0-100 brightness range from Homebridge to a 0-255 range KAKU uses. Don't really like the solution but works fine. Should be backwards compatible with previous iOS versions. I just released a new version of this plugin with the fix. If after the update the issue isn't gone, please empty your cache.

rickklh commented 11 months ago

Works, great! Only thing now is that the value is wrong other way around. When open it is correct for example 30% closed 200% so that looks a bit weird but it works again and no flyback down.

martienvd commented 11 months ago

thanks, works perfectly!

youridijk commented 11 months ago

@rickklh Hmm I'm not experiencing it after clearing the cache. Maybe it will help you too.

rickklh commented 11 months ago

@rickklh Hmm I'm not experiencing it after clearing the cache. Maybe it will help you too.

I did that after the first post because after the update to 1.3.2 I didn’t work and cleared the cache of homebridge like you said. No issues again on iOS 16.4 only 17.

Tried rebooting the whole system, no succes but simply after rebooting my phone the issue was gone!

so for anyone else having this problem, reboot your stuff might be the solution.

Thanks for your response and great homebridge plug-in. Much appreciated.