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

hue2 initial setup fails due to missing ip #623

Closed
bytesplit opened this issue Aug 21, 2022 · 4 comments
Closed

hue2 initial setup fails due to missing ip #623

bytesplit opened this issue Aug 21, 2022 · 4 comments
Labels

Comments

@bytesplit
Copy link

Just started to migrate from old hue plugin to new one. At first I tried using the webif to activate Hue2 plugin. The plugin is added to etc/plugin.yaml but does not have any config. It seems it is missing initial values which I suppose should be added once configured in webif.

During startup I got this error:

2022-08-21  14:08:55 ERROR    plugins.hue2        discover_bridges: Exception in discover_bridges(): [Errno -2] Name or service not known
2022-08-21  14:08:55 ERROR    lib.plugin          Plugin 'hue2' from section 'huebridge' exception: 'ip'
> Traceback (most recent call last):
>   File "/usr/local/smarthome/lib/plugin.py", line 162, in __init__
>     plugin_thread = PluginWrapper(smarthome, plugin, classname, classpath, args, instance, self.meta, self._configfile)
>   File "/usr/local/smarthome/lib/plugin.py", line 629, in __init__
>     exec("self.plugin.__init__(smarthome{0}{1})".format("," if len(arglist) else "", argstring))
>   File "<string>", line 1, in <module>
>   File "/usr/local/smarthome/plugins/hue2/__init__.py", line 135, in __init__
>     if self.bridge['ip'] != self.bridge_ip:
> KeyError: 'ip'

I manually looked up values for bridge_serial, user and ip and got things working. Wonder how discover bridges could be brought to life. I double-checked and requirements.txt are ok both for SHNG and plugin.

SmarthomeNG v1.9.2-master (cc57a0ad)
Plugins v1.9.2-master (e9f4b86)
Python 3.9.2
Debian Bullseye 11.4

@msinn
Copy link
Member

msinn commented Aug 21, 2022

You have to give more information on what you did exactly.

It is perfectly normal and correct, that after activation the plugin, no further information is present in the etc/plugin.yaml. It is added, after you did a bridge discovery in the web interface and pressed the button next to the bridge you want to use.

@bytesplit
Copy link
Author

The state is error so the plugin did not initialize. Thus it did not appear in admin/plugin_list and the plugin/hue2 page was not available. I think SHNG just skipped the plugin.

Steps:

  • (pre-condition: plugin.yaml has no hue2 tree)
  • in admin webif add plugin (as per documentation)
    • wait for list of installed plugins to load
    • select hue2
    • give unique name (I gave huebridge)
  • relaunch SHNG
  • expected: hue2 webif appears but empty so discovery can start
  • observed: error in log and hue2 plugin missing from admin

@msinn
Copy link
Member

msinn commented Feb 22, 2023

Should be fixed with hue2 actual plugin in develop branch.

@msinn msinn added the resolved label Feb 22, 2023
@msinn
Copy link
Member

msinn commented Mar 14, 2023

SmartHomeNG v1.9.4 has been released

@msinn msinn closed this as completed Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants