hi,
I’ve try setup again but i’ve same problem…
I’ve this error:
2019-02-17 12:06:49 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up platform enigma
Traceback (most recent call last):
File "/usr/local/lib/python3.6/urllib/request.py", line 1318, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/local/lib/python3.6/http/client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/lib/python3.6/socket.py", line 724, in create_connection
raise err
File "/usr/local/lib/python3.6/socket.py", line 713, in create_connection
sock.connect(sa)
OSError: [Errno 113] Host is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/media_player/enigma.py", line 156, in request_call
return self._opener.open(uri, timeout=self._timeout).read()
File "/usr/local/lib/python3.6/urllib/request.py", line 526, in open
response = self._open(req, data)
File "/usr/local/lib/python3.6/urllib/request.py", line 544, in _open
'_open', req)
File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.6/urllib/request.py", line 1346, in http_open
return self.do_open(http.client.HTTPConnection, req)
File "/usr/local/lib/python3.6/urllib/request.py", line 1320, in do_open
raise URLError(err)
urllib.error.URLError:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/config/custom_components/media_player/enigma.py", line 70, in async_setup_platform
devices.append(EnigmaMediaPlayer(device))
File "/config/custom_components/media_player/enigma.py", line 97, in __init__
self.load_sources()
File "/config/custom_components/media_player/enigma.py", line 125, in load_sources
reference = urllib.parse.quote_plus(self.get_bouquet_reference())
File "/config/custom_components/media_player/enigma.py", line 145, in get_bouquet_reference
bouquets_xml = self.request_call('/web/getallservices')
File "/config/custom_components/media_player/enigma.py", line 160, in request_call
HTTPError.code)
AttributeError: type object 'HTTPError' has no attribute 'code'
This error is because have this configuration:
devices:
- host: 172.16.1.110
port: 80
name: GM
timeout: 20
username: root
password: xxxx
picon: picon
- host: 172.16.1.9
port: 80
name: Dm800
timeout: 20
username: root
password: xxxxx
picon: picon
- host: 172.16.1.159
port: 80
name: Wetek
timeout: 20
username: root
password: xxxx
picon: picon
The problem is on restart HA, if one device is disconnect from AC (220V), the python script give me error and the custom component is not setup on HA. I’ve have my box enigma always disconnect from AC less view tv and connect box + tv to AC.
If i restart HA with one or three device configured on enigma and this device connected to AC, the component enigma works 5*****
It’s possible resolve this?
Thank you.