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

Can't find bridge #27

Open
Duckle29 opened this issue Apr 7, 2017 · 11 comments
Open

Can't find bridge #27

Duckle29 opened this issue Apr 7, 2017 · 11 comments

Comments

@Duckle29
Copy link

Duckle29 commented Apr 7, 2017

Hey there. So I got the program installed and ran it.

It can't find any bridges, (meethue can't either) and I beleive the problem is with the network setup here.
The bridge seems to get an ip in the range x.y.128.z while my laptop gets an ip in the range x.y.129.k

I can't figure out how to add the bridge by ip

@craigcabrey
Copy link
Owner

Can you run it from the terminal and post any output? If it can't find a bridge automatically, it should fallback to a UI that allows manual input of a bridge IP address.

@Duckle29
Copy link
Author

Duckle29 commented Apr 17, 2017

Yep. This is what it spits out:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/luminance/views/setup.py", line 153, in search
    raise ValueError('No bridges registered with Philips')
ValueError: No bridges registered with Philips

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/luminance/views/setup.py", line 160, in search
    limit_discovery=['philips_hue']
TypeError: __init__() got an unexpected keyword argument 'limit_discovery'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.5/site-packages/luminance/views/setup.py", line 190, in search
    GLib.idle_add(cb, results)
UnboundLocalError: local variable 'results' referenced before assignment

@janus-reith
Copy link

janus-reith commented Apr 21, 2017

I get the same exception, and there is no option to input an manual ip - the ui just keeps showing "searching..."

@Dbroqua
Copy link

Dbroqua commented Apr 30, 2017

Hello,

same exception here.

OS: Debian sid

@patbec
Copy link

patbec commented Jul 8, 2017

Hi,
same exception too.

Ubuntu 16.04.2 LTS

@jonathanvansina
Copy link

Hi,
Same exception here,
Still no fix?

Ubuntu 16.04

@dskindell
Copy link

Hi,
Same exception on Linux Mint 18.2

@ccarnivore
Copy link

had the same exception, can be fixed by changing luminance/views/setup.py
line 174
res = requests.get('http://{ip}/description.xml'.format(ip=ip))
to
res = requests.get('http://{ip}/description.xml'.format(ip=ip), timeout=1)

this should do the trick.
at least, it worked for me.

@PanderMusubi
Copy link

Another workaround, is to connect the bridge to the same subnet or hardware switch, connect and than move the bridge back to its original location. With OpenHAB2, this is sometimes also an issue. It can be solved in software, but this is an alternative to fix it, especially if other software also cannot find your bridge.

@Joz3d
Copy link

Joz3d commented Feb 5, 2021

Same here, adding the timeout=1 per @ccarnivore above did not fix for me. Looks like this app is abandoned. Any good linux hue apps in 2021?

@MrEnergy64
Copy link

MrEnergy64 commented Nov 24, 2021

can't find bridge issue same here, set timeout=1 didn't resolve the issue, Linux Kernel 5.14, Hue bridge Software 1.48.1948086000, BSB002, Linux PC and bridge are in the same network, bridge is pingable. I hope you can add the point to manually add the IP to your prog. I found this section in your bridge.py:

else:
self.bridge_address_label.set_text(
'{host} ({ip})'.format(
host=bridge.ip,
ip=self.api['config']['ipaddress']
)
)

Does it make sense to add the bridge IP to host=x.x.x.x ??
OK, test it with host="x.x.x.x", but your prog is still in discovery mode. These lines I get when I start the prog (with host="x.x.x.x"):

└─$ luminance
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/luminance/views/setup.py", line 150, in search
data = requests.get('https://www.meethue.com/api/nupnp').json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/luminance/views/setup.py", line 159, in search
network_discovery = netdisco.discovery.NetworkDiscovery(
TypeError: init() got an unexpected keyword argument 'limit_discovery'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.9/site-packages/luminance/views/setup.py", line 190, in search
GLib.idle_add(cb, results)
UnboundLocalError: local variable 'results' referenced before assignment
^CTraceback (most recent call last):
File "/usr/bin/luminance", line 45, in
application.run(sys.argv)
File "/usr/lib/python3/dist-packages/gi/overrides/Gio.py", line 42, in run
return Gio.Application.run(self, *args, **kwargs)
File "/usr/lib/python3.9/contextlib.py", line 126, in exit
next(self.gen)
File "/usr/lib/python3/dist-packages/gi/_ossighelper.py", line 237, in register_sigint_fallback
signal.default_int_handler(signal.SIGINT, None)
KeyboardInterrupt

These lines when host=bridge.ip,

└─$ luminance
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/luminance/views/setup.py", line 150, in search
data = requests.get('https://www.meethue.com/api/nupnp').json()
File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3/dist-packages/simplejson/init.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/luminance/views/setup.py", line 159, in search
network_discovery = netdisco.discovery.NetworkDiscovery(
TypeError: init() got an unexpected keyword argument 'limit_discovery'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.9/site-packages/luminance/views/setup.py", line 190, in search
GLib.idle_add(cb, results)
UnboundLocalError: local variable 'results' referenced before assignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests