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

Philips TV won't find Hue Emulator #223

Closed
FezVrasta opened this issue May 12, 2018 · 12 comments
Closed

Philips TV won't find Hue Emulator #223

FezVrasta opened this issue May 12, 2018 · 12 comments

Comments

@FezVrasta
Copy link
Contributor

Hi! I know it's going to be hard to fix it, but I wanted to report that the Hue Emulator is not discovered by my Philips TV (with Ambilight+Hue capabilities).

My TV runs Android 4.2.2 (Google TV) and it's on the latest available firmware (AND1E.0.10.170.0). The model is 55PUS7909/12

The Hue app finds the Hue Emulator just fine and it works nicely.

@mariusmotea
Copy link
Owner

Hmm, i have two different Philips tv's 6000 series, both discover the hue emulator and works ok. Can you insist a little bit with hue emulator discovery, maybe the tv did not catch the ssdp frames right away. In order to see what is happening at ssdp level you can start the script with sudo and provide the output.

@FezVrasta
Copy link
Contributor Author

Just to make sure I'm doing it right. I should just go in the Ambilight+Hue settings and make it search for a new bridge right?

@mariusmotea
Copy link
Owner

Yes. Check if ssdp reply is send by hue emulator. You can also press the link button like you did to pair the phone

@FezVrasta
Copy link
Contributor Author

FezVrasta commented May 12, 2018

Umh I get some weird log when I start it.

/opt/hue-emulator   6s
❯ sudo ./HueEmulator3.py                                                                         pi@raspberrypi
Config loaded
Exception in thread Thread-1:
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 "./HueEmulator3.py", line 111, in ssdpSearch
    sock.bind(server_address)
OSError: [Errno 98] Address already in use

start ssdp broadcast
sync with lights
Starting httpd...
----------------------------------------
Exception happened during processing of request from ('10.0.0.19', 33098)
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 625, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 390, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/usr/lib/python3.5/socket.py", line 576, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
----------------------------------------
127.0.0.1 - - [12/May/2018 10:48:37] "PUT /api/324/config/wifi/scanresult HTTP/1.1" 200 -
in PUT method
/api/324/config/wifi/scanresult
b'[{"rssi": -37.0, "ssid": "MiMoreWifi-2.5G", "channel": 4}, {"rssi": -65.0, "ssid": "SerenityLater", "channel": 11}, {"rssi": -81.0, "ssid": "Telekom-998558", "channel": 11}, {"rssi": -83.0, "ssid": "SMC", "channel": 6}]'
127.0.0.1 - - [12/May/2018 10:48:37] "PUT /api/324/config/wifi/updated HTTP/1.1" 200 -
in PUT method
/api/324/config/wifi/updated
b'{"status":"current-config", "mgmt":"0"}'
----------------------------------------
Exception happened during processing of request from ('10.0.0.19', 35586)
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 625, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 390, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/usr/lib/python3.5/socket.py", line 576, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
----------------------------------------
-------------------

especially weird is OSError: [Errno 98] Address already in use, I don't have anything else running on port 80

@mariusmotea
Copy link
Owner

mariusmotea commented May 12, 2018

If i'm not wrong you use deconz also? If yes, disable deconz ssdp service by editing systemd file and append --upnp=0.

@mariusmotea
Copy link
Owner

@FezVrasta
Copy link
Contributor Author

Thanks I tried that but I still get the same errors in the console 🤔

@mariusmotea
Copy link
Owner

sudo netstat -lnup to see exactry what service is using the port 1900/udp. Kill that process and it will work after.

@FezVrasta
Copy link
Contributor Author

FezVrasta commented May 12, 2018

it was minissdpd, is it spawned by diyHue maybe?

Anyway, now the log is:

Config loaded
starting ssdp...
start ssdp broadcast
sync with lights
Starting httpd...
10.0.0.2 - - [12/May/2018 11:03:52] "GET /description.xml HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('10.0.0.19', 43290)
Traceback (most recent call last):
  File "/usr/lib/python3.5/socketserver.py", line 625, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.5/socketserver.py", line 354, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.5/socketserver.py", line 681, in __init__
    self.handle()
  File "/usr/lib/python3.5/http/server.py", line 422, in handle
    self.handle_one_request()
  File "/usr/lib/python3.5/http/server.py", line 390, in handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/usr/lib/python3.5/socket.py", line 576, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer
----------------------------------------

@FezVrasta
Copy link
Contributor Author

Ah, anyway now the TV found the bridge :-) thanks!

@mariusmotea
Copy link
Owner

ssdpd server is native build in diyhue, minissdpd may de a default package in raspbian or is a dependency for something you had installed.

@FezVrasta
Copy link
Contributor Author

umh ok thanks!

grywnn pushed a commit to grywnn/diyHue that referenced this issue Nov 15, 2019
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

2 participants