luminance icon indicating copy to clipboard operation
luminance copied to clipboard

Can't find bridge

Open Duckle29 opened this issue 8 years ago • 11 comments

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

Duckle29 avatar Apr 07 '17 21:04 Duckle29

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.

craigcabrey avatar Apr 15 '17 22:04 craigcabrey

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

Duckle29 avatar Apr 17 '17 12:04 Duckle29

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

janus-reith avatar Apr 21 '17 23:04 janus-reith

Hello,

same exception here.

OS: Debian sid

Dbroqua avatar Apr 30 '17 11:04 Dbroqua

Hi, same exception too.

Ubuntu 16.04.2 LTS

patbec avatar Jul 08 '17 20:07 patbec

Hi, Same exception here, Still no fix?

Ubuntu 16.04

jonathanvansina avatar Mar 08 '18 17:03 jonathanvansina

Hi, Same exception on Linux Mint 18.2

dskindell avatar Mar 11 '18 03:03 dskindell

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.

ccarnivore avatar Dec 30 '18 08:12 ccarnivore

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.

PanderMusubi avatar Dec 31 '18 16:12 PanderMusubi

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?

Joz3d avatar Feb 05 '21 08:02 Joz3d

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

MrEnergy64 avatar Nov 24 '21 10:11 MrEnergy64