Zacknetic / HomebridgeMagicHome-DynamicPlatform

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

This plugin generated a warning from the characteristic #91

Closed madmunky closed 2 years ago

madmunky commented 3 years ago

Getting lots of errors in the Homebridge Logs?

[25/02/2021, 14:38:57] [homebridge-magichome-dynamic-platform] This plugin generated a warning from the characteristic 'Hardware Revision': characteristic was supplied illegal value: number instead of string, supplying illegal values will throw errors in the future. See https://git.io/JtMGR for more info.

[25/02/2021, 14:38:57] [homebridge-magichome-dynamic-platform] This plugin generated a warning from the characteristic 'Firmware Revision': characteristic was supplied illegal value: number instead of string, supplying illegal values will throw errors in the future. See https://git.io/JtMGR for more info.

dekay7 commented 3 years ago

I'm pretty sure that this started occurring as a result of the major Homebridge update to v1.3.0. If you really want to have proper functionality, right now, with this plugin, I would consider rolling back your update to the latest v1.2 version. Otherwise, we will just have to wait for the creator to resolve this... or... you can run the 1.9.3 beta of this plugin and it should resolve the issue... but now I'm having connectivity issues to my WiFi Controller.

tom-23 commented 3 years ago

Fixed in beta.6

Zacknetic commented 3 years ago

Just a warning. While this particular issue is fixed in beta.6, it is still a beta. Meaning it's not quite ready for release so please install at your own risk. It's not going to set your house on fire but you may end up having to re-implement all your MH accessories.

@tom-23 Let's keep this open until a release version solves this issue. At that time we can reference the update here and wait for confirmation from @madmunky that it solves their issue permanently.

dekay7 commented 3 years ago

homebridge is not connecting to the controller while on this beta so I'll just wait. thanks for being so responsive. i appreciate it.

Zacknetic commented 3 years ago

Aww you edited it. Will keep you guys informed.

dekay7 commented 3 years ago

i didn't want to make other people scared... you never know if someone will take the joke...

Zacknetic commented 3 years ago

So true.

leonardbld commented 3 years ago

When it get fixed in a stable version ?

boehser-enkel commented 3 years ago

Just need a little fix to convert the Hardware Revision to a string instead of a number. Is there any fork which does this?

Zacknetic commented 3 years ago

Hello, thank you for your extended patience. Update 1.9.4 has adjusted the data type to string and the warning should no longer appear.

If anyone is still around, please let me know how that goes after testing for a bit. Lets try to the original issue. If you find any other issues, please see if it already exists, if not, create it.

Thank you again.

tedcarstensen commented 3 years ago

This is happening for me on 1.9.4, but for 'Brightness' not 'Hardware Revision'.

I am running the plugin in a child bridge. I've restarted the child bridge and the main Homebridge instance and still getting these errors.

Was the 1.9.4 fix exclusive to hardware revision errors?

[7/7/2021, 9:00:56 AM] [homebridge-magichome-dynamic-platform] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 102 exceeded maximum of 100. See https://git.io/JtMGR for more info.

Zacknetic commented 3 years ago

This is happening for me on 1.9.4, but for 'Brightness' not 'Hardware Revision'.

I am running the plugin in a child bridge. I've restarted the child bridge and the main Homebridge instance and still getting these errors.

Was the 1.9.4 fix exclusive to hardware revision errors?

[7/7/2021, 9:00:56 AM] [homebridge-magichome-dynamic-platform] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 102 exceeded maximum of 100. See https://git.io/JtMGR for more info.

The 1.9.4 fix was indeed exclusive to the hardware revision errors. Apologies. It seems there are some rounding errors that are being sent to HomeKit for brightness. The math and logic for converting rgb and cct (or both) has always been a little... wonky, to say the least. I believe it can be solved by capping the value at 100 before sending to HomeKit which... I thought I was already doing... Will look into this further and provide an update. Thank you for your patience.

Just a heads up, I have taken a step back from the plugin. I plan on returning to it once I find full time employment as a software engineer. I apologize that fixes have been arriving so slowly. I didn't expect to be out this long ( it's been 7 months... ). I just really need to stabilize myself financially first.

tedcarstensen commented 3 years ago

I appreciate your quick response even after you have stepped away from the project. This is not a major issue and I am grateful for all of your work to get things working as well as they are.

For anyone else who is experiencing this issue, I spent some time tinkering tonight and realized I could avoid the errors entirely by editing my Home.app automations to only turn my lights to 98% brightness or below. The resulting brightness value shown in Home.app after these automations trigger is always 2% higher (in my limited testing), so by limiting this to 98+2=100, I'm no longer triggering errors.

Zacknetic commented 2 years ago

@tedcarstensen @madmunky @dekay7 Hello, please update to version 1.9.7 and ensure you are upgraded to node 16. This should fix your issues. I have made an adjustment with the brightness so that it divides the values by 2.55. Not by 2.5. This should remove the illegal value problem.

Please let me know. -z

Zacknetic commented 2 years ago

Closing this issue as solved. Please re-open or create a new issue if need be.

korgoth commented 2 years ago

I am sorry to reopen this issue but the problem persist for me.

[homebridge-magichome-dynamic-platform] This plugin generated a warning from the characteristic 'Brightness': characteristic was supplied illegal value: number 193 exceeded maximum of 100. See https://homebridge.io/w/JtMGR for more info.

My brightness numbers are waaaay above 100 and i have no idea how to tackle that.