Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hue Config Documentation #123

Closed
infused-kim opened this issue May 13, 2015 · 11 comments
Closed

Hue Config Documentation #123

infused-kim opened this issue May 13, 2015 · 11 comments
Labels

Comments

@infused-kim
Copy link

Hi,

I noticed the documentation does not explain how to properly setup philips hue lamps. All it says is that the discovery service should be used.

But to get it working you have to create a phue.config in the config dir, which is not documented anywhere.

If anyone else is having trouble setting it up, here is the format:
{"<your host / ip>": {"username": ""}}

@balloob
Copy link
Member

balloob commented May 13, 2015

The process of configuring Hue and creating the config happens via the
interface of home Assistant after it has discovered your lights.

Paulus

On Tue, May 12, 2015, 19:37 KimchaC [email protected] wrote:

Hi,

I noticed the documentation does not explain how to properly setup philips
hue lamps. All it says is that the discovery service should be used.

But to get it working you have to create a phue.config in the config dir,
which is not documented anywhere.

If anyone else is having trouble setting it up, here is the format:
{"<your host / ip>": {"username": ""}}


Reply to this email directly or view it on GitHub
#123.

@infused-kim
Copy link
Author

Yeah, but in order for it to discover your lights you need to create the phue.config, right? It wasn't discovering it automatically and I had to create the phue.conf manually.

I have the discovery service enabled too.

Maybe its supposed to be created automatically, but for some reason didn't on my machine/network. This may happen to others too, so adding some instructions of how to create the config manually in case that happens to the documentation would probably be a good idea.

@balloob
Copy link
Member

balloob commented May 13, 2015

Home Assistant should be able to pick up your Hue lights without any configuration using uPNP. After discovery, if not configured it will show a card that offers a configure button (see the demo for an example). That process should end up creating a phue.conf file.

I'll test it tonight to make sure it works. I'll also update the component page for Hue with instructions how to set it up if you have no discovery.

@michaelarnauts
Copy link
Contributor

I also had to create the phue.conf file myself, no card appeared. I'm using latest code from git.

@rmkraus
Copy link
Contributor

rmkraus commented Jul 26, 2015

Reviving an old issue here. If the discovery platform is not working, it is possible that the system's firewall is blocking it. The hue platform also accepts a host parameter in the configuration file that will allow HA to find the hue lights without using discovery. We probably need to add this host parameter to the documentation. Full configuration looks something like this:

light:
    platform: hue
    host: 192.168.10.205

@balloob balloob added the bug label Aug 9, 2015
@balloob
Copy link
Member

balloob commented Aug 13, 2015

So I experienced this problem last week but it seems that now my Hue hub is discoverable again. Maybe there was a firmware update that fixed it.

@balloob
Copy link
Member

balloob commented Aug 13, 2015

I will keep monitoring this, will reopen if it occurs again.

@balloob balloob closed this as completed Aug 13, 2015
@XodarapXT
Copy link

Hi, I am just getting started working with HA and have spent the last few days working to get various aspects running on Ubuntu 14.04. I ran into the hue issue described above and have been searching for a resolution when I found this page. Below is the log of what was happening if this provides any benefit. Adding the light component with the specific host IP worked to resolved the issue.

15-08-27 20:21:42 ERROR (Thread-13) [homeassistant.components.light] Error while setting up platform hue
Traceback (most recent call last):
  File "/home/tim/home-assistant/homeassistant/helpers/entity_component.py", line 136, in _setup_platform
    self.hass, platform_config, self.add_entities, discovery_info)
  File "/home/tim/home-assistant/homeassistant/components/light/hue.py", line 42, in setup_platform
    host = urlparse(discovery_info).hostname
  File "/usr/lib/python3.4/urllib/parse.py", line 292, in urlparse
    url, scheme, _coerce_result = _coerce_args(url, scheme)
  File "/usr/lib/python3.4/urllib/parse.py", line 112, in _coerce_args
    return _decode_args(args) + (_encode_result,)
  File "/usr/lib/python3.4/urllib/parse.py", line 96, in _decode_args
    return tuple(x.decode(encoding, errors) if x else '' for x in args)
  File "/usr/lib/python3.4/urllib/parse.py", line 96, in <genexpr>
    return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 'tuple' object has no attribute 'decode'

@quantenschaum
Copy link

Same problem here. I just installed HA by running the docker image

$ docker run -d --net=host balloob/home-assistant

The auto discovery did not discover the hue bridge, but after adding

light:
  platform: hue
  host: 192.168.222.56

It was "discovered". I had to set host to the IP, not the hostname of the bridge.

@dhevans79
Copy link

Just a quick poke from my perspective.

I've set up a Raspberry Pi 2 (in case that makes any difference) and had to add the following command to the configuration before it would show the configuration panel in the browser.

light:
  platform: hue

As others have mentioned above, this does resolve the issue, and does not seem to have been fixed/addressed within home-assistant as some of the other comments would indicated.

I'm not fussed about this, however I think the documentation should be changed as follows:

instead of:

If you want to enable the component without relying on the discovery component, add the following lines to your 'configuration.yaml':

to

If you want to enable the component without relying on the discovery component, or are having issues with the initial discovery, add the following lines to your 'configuration.yaml':

I didn't want to try this option until I read all the comments above as I though this would lower the functionality by using an inferior component inside HA. This does not seem to be the case, and I think this thread could be resolved by a more specific description in the documentation.

Best regards :)

@balloob
Copy link
Member

balloob commented Nov 28, 2016

There is an "Edit on github" link on the top of the docs page, makes it very easy to suggest changes! 👍

@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants