Zacknetic / HomebridgeMagicHome-DynamicPlatform

Homebridge Plugin for MagicHome LED controllers and light bulbs
Apache License 2.0
61 stars 11 forks source link

[BUG] GRB controller capped at 50% brightness #81

Open rrroyal opened 3 years ago

rrroyal commented 3 years ago

Describe the bug

I'm using this controller (model WiFi RGB WF113). HomeKit reports brightness at 100%, but it really is at only 50%.

To Reproduce

Set the brightness in HomeKit to 100%. MagicHome will show that the real brightness is at 50%.

Expected behavior

Brightness will set 100% as real 100%, not 50%.

Additional context

n/a

Host Hardware

Homebridge and MagicHome

Screenshots

n/a

rrroyal commented 3 years ago

Fixed by updating Node to LTS. Minor bug - the color sometimes shows blue, but lights are actually white.

rrroyal commented 3 years ago

Nevermind, still happening 😶

tom-23 commented 3 years ago

@rrroyal could you turn on homebridge debug mode and send us the logs? https://github.com/homebridge/homebridge/wiki/Basic-Troubleshooting#debug-mode

You can also enable this within the config-ui-x

rrroyal commented 3 years ago

Nothing is logged when changing the brightness, so that is all:

[1/26/2021, 2:56:55 PM] [homebridge-magichome-dynamic-platform] 1 - Registering existing accessory...
Display Name: 'Pasek' 
Controller Logic Type: 'GRBStrip'  
Model: 'AK001-ZJ2101' 
Unique ID: '10521CCE9B17' 
IP-Address: '192.168.0.181' 
Hardware Version: '33' 
Firmware Version: '8'
[1/26/2021, 2:56:55 PM] [homebridge-magichome-dynamic-platform] 
Registered 1 Magichome device(s). 
New devices: 0 
Cached devices that were seen this restart: 1
Cached devices that were not seen this restart: 0

[1/26/2021, 2:56:55 PM] [homebridge-magichome-dynamic-platform] Discovery summary:  Found 1 devices.
[1/26/2021, 2:57:23 PM] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '192.168.0.255' for Magichome devices...
[1/26/2021, 2:57:23 PM] [homebridge-magichome-dynamic-platform] 
1 - Discovered device...
UniqueId: '10521CCE9B17' 
IpAddress '192.168.0.181' 
Model: 'AK001-ZJ2101'
[1/26/2021, 3:01:53 PM] [homebridge-magichome-dynamic-platform] Get Characteristic Brightness -> 100 for device: 'Pasek' 
[1/26/2021, 3:01:53 PM] [homebridge-magichome-dynamic-platform] Get Characteristic On -> false for device: 'Pasek' 
[1/26/2021, 3:01:53 PM] [homebridge-magichome-dynamic-platform] Get Characteristic Hue -> 26.249999999999986 for device: 'Pasek' 
[1/26/2021, 3:01:53 PM] [homebridge-magichome-dynamic-platform] Scanning broadcast-address: '192.168.0.255' for Magichome devices...
Zacknetic commented 3 years ago

[1/26/2021, 3:01:53 PM] [homebridge-magichome-dynamic-platform] Get Characteristic Brightness -> 100 for device: 'Pasek'

@tom-23 looks like it's receiving 100% brightness from homekit.

@rrroyal we've just implemented a new logging system that will spit out practically everything. Once that is available for beta, I will inform you here.

muzzymate commented 3 years ago

Just wanted to put in that I am also seeing this occurring on at least two of my GRB MagicHome Controllers. Both in the Alexa app and MagicHome app, the brightness shows and the LEDs are at 50% rather than in Homekit where it was set to 100%. An additional observation: this is only occurring when I send white through Homekit. If it's a color, the LEDs and MagicHome app will be at 100%.

Lukew11037 commented 3 years ago

I have the same controller and issue as reported here. As a hot fix for my setup i edited the file "GRBStrip.js" so it instead says Math.round(((utils_1.clamp(red, 0, 255) / 100) * brightness * 2)) for all three colours and so far it seems to be working fine and solved this issue however im not sure if this is going to cause further issues with something else or not

edit: to add to this further, it seems the brightness value is trying to be set to 200 which exceeds the maximum value of 100