cyberjunky / home-assistant-custom-components

My custom components for Home Assistant
MIT License
71 stars 19 forks source link

After install it won't connect #42

Closed rikmaris closed 4 years ago

rikmaris commented 4 years ago

After a fresh install of a rooted toon (never worked before) i did follow all instructions. But the custom component wont connect.

`Log Details (ERROR) Thu Oct 10 2019 21:52:11 GMT+0200 (Midden-Europese zomertijd) Error while setting up platform toon_climate Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection raise err File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection sock.connect(sa) socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen chunked=chunked, File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 387, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.7/http/client.py", line 1244, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.7/http/client.py", line 1290, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.7/http/client.py", line 1239, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.7/http/client.py", line 1026, in _send_output self.send(msg) File "/usr/local/lib/python3.7/http/client.py", line 966, in send self.connect() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 184, in connect conn = self._new_conn() File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 164, in _new_conn % (self.host, self.timeout), urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7fa9d1432810>, 'Connection to 192.168.2.10 timed out. (connect timeout=5)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send timeout=timeout File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.2.10', port=10080): Max retries exceeded with url: /happ_thermstat?action=getThermostatInfo (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fa9d1432810>, 'Connection to 192.168.2.10 timed out. (connect timeout=5)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for return fut.result() File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, self.kwargs) File "/config/custom_components/toon_climate/climate.py", line 68, in setup_platform config.get(CONF_PORT))]) File "/config/custom_components/toon_climate/climate.py", line 90, in init self.update() File "/config/custom_components/toon_climate/climate.py", line 119, in update '/happ_thermstat?action=getThermostatInfo')) File "/config/custom_components/toon_climate/climate.py", line 95, in do_api_request req = requests.get(url, timeout=DEFAULT_TIMEOUT) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 75, in get return request('get', url, params=params, kwargs) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 504, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPConnectionPool(host='192.168.2.10', port=10080): Max retries exceeded with url: /happ_thermstat?action=getThermostatInfo (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fa9d1432810>, 'Connection to 192.168.2.10 timed out. (connect timeout=5)'))`

Fietspomp86 commented 4 years ago

Is your Toon up to date? Try to get the information from a browser see if that works

http://192.168.2.10:10080/happ_thermstat?action=getThermostatInfo

rikmaris commented 4 years ago

Yes, my toon is up to date. I can ping my toon. I have SSH access to my toon.. so i dont understand what's going wrond.

The link you gave won't open from a browser

cyberjunky commented 4 years ago

This probably means you didn't whitelist the web interface and thus it isn't listening to the port and url needed. Please follow the rest the instructions regarding rooting of your TOON, you need to edit a file under /qmf Read here: https://www.domoticaforum.eu/viewtopic.php?f=100&t=11235#p82535

<hcb_web>
        <port>10080</port>
        <defaultEntry>/qmf/www/</defaultEntry>
        <enforceWhitelist>**0**</enforceWhitelist>
        <whitelist>
                       <item>hdrv_zwave</item>                                                                                                                                   
                       <item>hdrv_hue</item>
                       <item>happ_thermstat</item>
        </whitelist>
    </hcb_web>
rikmaris commented 4 years ago

It works using port 80.

{"result":"ok", "currentTemp":"1982", "currentSetpoint":"1500", "currentInternalBoilerSetpoint":"6", "programState":"0", "activeState":"3", "nextProgram":"-1", "nextState":"-1", "nextTime":"0","nextSetpoint":"0","randomConfigId":"1804289383","errorFound":"255","connection":"0","burnerInfo":"0","otCommError":"0","currentModulationLevel":"0"}