bitfocus / companion-module-phillips-hue

MIT License
2 stars 5 forks source link

Missing Buttons? No way to enter IP? #8

Open twokingsfilms opened 2 years ago

twokingsfilms commented 2 years ago

Hey all!

Longtime fan of Companion (but NOT a coder by any means) and desperately in need of the Philips Hue connection - so was super excited to see this developed! Sadly, I haven't been able to get this to work at all - in fact, to this point, the buttons that I see on my screen don't even seem to be the same buttons that you list out in your walkthrough of how to connect.

I've attached some images below (hopefully those work) - but to walk you through it, here's what I can tell you so far:

Anyways, the above is meant to hopefully provide some context - additionally, the Username field is blank - so I have left it blank - checked the box "CreateUser" and within 5 - 10 seconds have hit my Bridge with nothing happening as far as I can see.

However, the companion log does indicate: "Error updating instance configuration: Cannot read property 'length' of undefined

As some last notes:

Any and all helps is appreciated - I'm pulling my hair out trying to solve this! Thank you!

PhilipsHueConfig_1 PhilipsHueConfig_2

MegaAdragon commented 2 years ago

Confirmed I am running v06 of philips-hue module

The latest version is v0.1.0 Either update companion to the newest beta, or just update this module to the newest version (see https://github.com/bitfocus/companion-module-phillips-hue/issues/5#issuecomment-1148922225)

The new version should fix your issues and also simplifies the configuration (as described in the HELP.md)

twokingsfilms commented 2 years ago

Confirmed I am running v06 of philips-hue module

The latest version is v0.1.0 Either update companion to the newest beta, or just update this module to the newest version (see #5 (comment))

The new version should fix your issues and also simplifies the configuration (as described in the HELP.md)

Thank you so much! My problem is that I don't fully understand HOW to do comment #5. I'm really not savvy with coding or anything, so while I can fumble my way through companion on a good day - I'm kind of really lost as to how to update the module - is there any place you could point me towards that helps break down HOW to update a module? I'm not even sure where to start...

MegaAdragon commented 2 years ago

What platform are you running companion on?

twokingsfilms commented 2 years ago

I'm on Windows 10 - I did go ahead and figure out how to get the Beta so now I see an IP AND it generates a username - but the module just keeps saying SYNCING endlessly. So...progress?

MegaAdragon commented 2 years ago

I'm on Windows 10 - I did go ahead and figure out how to get the Beta so now I see an IP AND it generates a username - but the module just keeps saying SYNCING endlessly. So...progress?

Yes, looks like you have the newest version now.

  1. Does the Bridge Address dropdown show your Philips Hue Bridge (Name + IP address)? Otherwise you can manually enter it there.
  2. If you want to create a new user, you have to first press the button on your bridge, then check the Create new User box and then save the config. -> The newly created user should be filled in the background and when you reopen the config, you should see a user name
twokingsfilms commented 2 years ago

Answers below:

  1. I don't get any drop down options, but CAN and DO enter my Bridge's IP
  2. Followed your directions, pressed bridge FIRST then check'd box, then saved. When I re-opened the config I do see a User (a bunch of letters and numbers) - however in Companion's "Connections" tab it just says "Syncing" in Yellow and doesn't ever change and if I try to create a button there's nothing there to connect it to
MegaAdragon commented 2 years ago

Ok, interesting. Looks like there is an issue with discovering the bridge in your network. Can you share a screenshot of your current configuration? Is there any output in the log tab?

twokingsfilms commented 2 years ago

Attached is an image of my log tab - when you're asking for my configuration, are you looking for the config of the Philips Hue? I can share that definitely, just want to make sure I understand your question so I can get you what you need

PhilipsHueConfig_3

MegaAdragon commented 2 years ago

when you're asking for my configuration, are you looking for the config of the Philips Hue?

Yes. The part in the "Connections" tab. I have a similar issue, when I replace the IP address with an invalid IP address. The module stays in "Syncing" for about 1min and after that goes into the error state, because it can't connect. Have you waited a little bit after applying the config?

twokingsfilms commented 2 years ago

Here's the screenshot you were looking for - I have waited, it actually still says "Syncing" now and that's been going on for a good 10 minutes at least

PhilipsHueConfig_4

MegaAdragon commented 2 years ago

Are you able to access your bridge with the following URL?: https://<bridge ip address>/debug/clip.html

twokingsfilms commented 2 years ago

Takes me to a site for CLIP API Debugger - so I think so?

MegaAdragon commented 2 years ago

Ok, this is definitely strange and I'm not sure what the problem is...

Just to be sure, can you manually create a new user by following these instructions: https://developers.meethue.com/develop/get-started-2/

Just copy the user (with the letters and number) into the companion and check if this helps.

MegaAdragon commented 2 years ago

And two other tests just to make sure the module is working as expected:

  1. Manually change the IP address to an invalid value (f.e. 192.168.1.3) -> the module should go into the error state after a short while
  2. Change the user name to an invalid value (just add an additional character) -> should also go into error state
twokingsfilms commented 2 years ago

I followed the directions for the CLIP API Debugger and have a screenshot below - what may, or may not be of interest, is that those directions state that I can now do the GET command from earlier in the directions and "get more information" -- however, I get the exact same "unauthorized user" message

Additionally changing the user name value DID send it into an error state

PhilipsHueConfig_5

twokingsfilms commented 2 years ago

Tried doing the next command at that link for "Turning a light on and off" and ALSO got the "unauthorized user" message....

MegaAdragon commented 2 years ago

Tried doing the next command at that link for "Turning a light on and off" and ALSO got the "unauthorized user" message....

Did you use the correct user name? https://<bridge ip address>/api/<user name>/lights

You have to fill in your user name into the URL from the instructions.

twokingsfilms commented 2 years ago

Okay, good catch, plugged in that user in the API and that turned up results...

twokingsfilms commented 2 years ago

Do you think maybe I should factory reset the bridge? Or maybe some other crazy idea? I'm stumped...

MegaAdragon commented 2 years ago

Do you think maybe I should factory reset the bridge? Or maybe some other crazy idea? I'm stumped...

TBH I'm not really sure. Everything seems to work how it should, but somehow the module is not able to use the API connection and at the same time does not throw any error. Maybe this is an issue of your network? Do you have any special firewall settings or something like this?

twokingsfilms commented 2 years ago

Not really - everything is on the same network and via the same switch - the app works fine from my phone and in the past I used IFTTT to control the Hues - but that also is given me connection problems. I'm out of studio for the next day or so, but when I get back in I'm going to try a factory reset and see if that answers any questions. Thank you so much for all your help so far! Honestly, your patience and understanding is so appreciated!