NoUseFreak / niko-home-control

Python connector for niko home control
MIT License
4 stars 7 forks source link

Default brightness value of 255 not correct #11

Open pcallewaert opened 3 years ago

pcallewaert commented 3 years ago

Hi,

I got here because I tried to get Niko Home Control working in Home Assistant. All the lights worked, except for the dimmers. So after some debugging with a python script using this module I noticed it worked if value1 is between 0-100. I even noticed if I do list_actions_raw() that even my "normal" switches return value1: 100, even after setting it to 255. So it seems for my installation I have the range between 0-100 needed for all my actions.

My installation is pretty up to date and probably updated to the last version possible. {'swversion': '1.10.0.34209', 'api': '1.19', 'time': '20210817211234', 'language': 'NL', 'currency': 'EUR', 'units': 0, 'DST': 3600, 'TZ': 3600, 'lastenergyerase': '', 'lastconfig': '20210420171354'}

So my question is, am I the only one which the range is 0-100 for value1 (and >100 gets dropped for dimmers) or is this is "bug" ?

NoUseFreak commented 2 years ago

Hi, I would like to look into this issue, the problem is I can't get my dimmable lights in the API.

Looks like we have the same swversion version and API version. Do you see any dimmable lights in the list_raw_actions() call?

I indeed also see values between 0-100.

pcallewaert commented 2 years ago

Yeah, I see them in the raw actions and in the list_actions. They are type 2

Kenshee002 commented 2 years ago

Hi, I'm running version 1.19 as well and I'm not able to see any of my dimmers in the raw data. Normal switches i can operate. I can't get them in app on the phone and can't select them in the software(pc) to link them to a phone. Anyone got any ideas?

pcallewaert commented 2 years ago

@Kenshee002 No idea to be honest. I go the dimmers with the "new" look for the NHCII system. I was able to link them to the phone, as this is needed to get the data from it.

Are you using the latest version of NHC software?

Kenshee002 commented 2 years ago

@pcallewaert: Thanx for the reply. I got it to work, got the dimmable lights in the HA software. Just needed to created an seperate action and link it to the phone as you mentioned. Software is the latest for NHC v1. The problem i'm now facing is that I can control the "ON/OFF" light from HA but I'm not able to control the dimmable lights. When I use a Python script I'm able to dim the lights and turn them ON and OFF. I guess I'm gonna have to write a scipt in Python to be able to dim the light from within HA.

VandeurenGlenn commented 1 year ago

Hi @pcallewaert Value1 when writting to the niko api is different then the one you get from it, this is "normal"

@Kenshee002 Dimming is fixed in has since couple months 🥳