Zacknetic / HomebridgeMagicHome-DynamicPlatform

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

[BUG] Cannot get HOOBS Bridge QR Code to show #103

Closed jimmyfisher closed 3 years ago

jimmyfisher commented 3 years ago

Logs

  1. Enable debug mode in Homebridge
  2. Reproduce the issue so that it appears in the logs
  3. Upload a '.txt' file of your logs to this issue. ( Logs from screenshots, in '.rtf' format, or pasted directly into the post make debugging extremely difficult. Please just upload the file. )

Here ya go: MagicHome Plugin Errors.txt

Describe the bug

A clear and concise description of what the bug is.

I'll click on 'Start' under the 'Pairing' column and it will show the HOOBS logo spinning and then eventually it returns to the initial screen without having a QR code.

To Reproduce

e.g. Steps to reproduce the behavior:

  1. Go to bridge in HOOBS
  2. Click 'Start' under 'Pairing'

Expected behavior

A clear and concise description of what you expected to happen.

I would expect the QR code to show up to be scanned into HomeKit

Additional context

Add any other context about the problem here.

Host Hardware

Homebridge and MagicHome

Screenshots

If applicable, add screenshots to help explain your problem.

Screen Shot 2021-07-07 at 4 06 51 PM
jimmyfisher commented 3 years ago

I should also mention, I saw in one of the other issues here suggesting specifying a specific level of logging in the config. Mine looks like this right now:

Screen Shot 2021-07-07 at 4 11 30 PM

Not sure if there's some JSON value missing (my guess would be that's why it's throwing 'undefined') or where it would need to go.

jimmyfisher commented 3 years ago

OK - not sure why, but by changing 'log level' to '4' under advanced settings, then saving, the QR code showed up. Then I switched back to 3 and it stayed... so perhaps there's some glitch on initial setup?

jimmyfisher commented 3 years ago

That said, none of my bulbs are showing up. I have two of these:

https://smile.amazon.com/gp/product/B07VQJYYYR

I've successfully added the bridge using the QR code to Apple Home but, unlike when I set up my Ring Bridge, no accessories are showing linked to the MagicHome bridge. I can access both bulbs via the SmartHome app right now.

jimmyfisher commented 3 years ago

OK another update - found this in the logs (screenshot, sry)

Screen Shot 2021-07-07 at 5 05 50 PM

Going to try and see if it's the same thing if i toggle on/off the blacklisted unique IDs thing

jimmyfisher commented 3 years ago

OK that worked by selecting 'blacklisted' and not entering in any specific numbers.

Was watching a tutorial on HOOBS about how to do this, but seemed like it was another MagicHome plugin. Is this one capable of triggering custom 'functions' that I have set up in the app? Cross fades between specific colors, etc.?

Zacknetic commented 3 years ago

Hi,

Very glad you were able to solve this. Thank you for providing your initial logs in text form. That is always very helpful for us developers.

I believe your issue stems from an outdated config.json as seen here: 7/7/2021, 3:58:30 PMMagicHome BridgeWARNINGunhandled rejection: TypeError: Cannot read property 'logLevel' of undefined Thus, saving in "advanced settings", which really is just a fancy way to makes changes to the config.json, solved the problem by adding the missing settings. I can't update your config.json, but I can update the "advanced settings". My suggestion is, after an update, check to make sure your settings are where you want them to be. There may be extra settings that need manual saving (something I can't do). As for the "blacklisted" issue, thank you for bringing that to my attention. It seems that if the user does not actually select "nothing", the empty array will not populate in the config.json. Annoying!

The program does include default values for these parameters, but for some reason, homebridge seems to be ignoring them? That is something I will have to look into.

In terms of running cross fades, that is not a feature of this plugin. There may be other plugins that allow such a feature, I am not sure.

It looks like your initial problem is solved, but please let me know if that isn't the case. Otherwise I will be closing this issue after 48 hrs. Thank you for bringing these issues to my attention. Good day.

jimmyfisher commented 3 years ago

It seems to be okay - i did get this error in the log:

7/8/2021, 10:45:28 PM MagicHome Bridge ERROR [MagicHome Bridge 553F@RGBWW Non-Simultaneous@@Brightness] characteristic was supplied illegal value: number 120.7843137254902 exceeded maximum of 100

I'm not sure exactly what it is, but there was something I noticed when setting the light color in HomeKit where the brightness went above 100% when I went back into the MagicHome app even though HomeKit read 100%.

Regarding the crossfade question - it seemed like in other plugins, there were JSON parameters that were specifying preset fades that the MagicHome app had built in by name. I was able to do this w a Siri shortcut in the Shortcuts app because MagicHome is able to 'talk to' Shortcuts outside of HomeKit/HOOBS.

Didn't know if part of the API being used could transfer over that data and give me the ability to assign those to scenes, even using another HomeKit automation app like Eve.

Zacknetic commented 3 years ago

Hi there. Thank you for your patience.

I'm glad that solved the issue. As for the characteristic, there was a rounding issue that has since been fixed. I will mark this particular issue as closed as the original issue has been solved. If you are running into any other problems, please feel free to create a new issue.

-z

jimmyfisher commented 3 years ago

One other thing - I’ve had an issue w automations where my front porch light will occasionally not turn on/off as it should. If I ‘test the automation’ in the home app, all works fine.

Not sure the solve to it as there are no log lines for when the automation is run in HOOBS (unless I’m missing a setting?) so for now, I’ve created a second automation shortly after the first to see if that doubles my chances of it working.

Is this normal behavior?

I can create a new issue if preferred.

Zacknetic commented 3 years ago

This is a known issue. No need to create a new thread. I have written an overhaul for the plugin to combat this exact problem. Essentially it checks if the sent command is correct and if not, retries.

It is far from ready. But it’s an ongoing process to a bug that has plagued this plugin from day 1.

Keep an eye out for version 2.0.0 in the upcoming weeks.