Hi,
I want to connect my LCN to Home Assistant but i get info that connaction failed.
I can connect to it via LCN-PRO, but same config in HA doesn’t work.
Please help me somehow.
Hi @sosnaapl ,
could you please try to reduce the number of sk_num_tries
.
This is the number the underlying library tries to find a segment coupler. Each try takes about 3 seconds, which is in sum 24 seconds. Much earlier Home Assistant raises a timeout and reports that the integration failed to initialize.
If you don’t have any segment coupler in your system, you may set this to zero.
Andre
Dear @alengwenus
Unfortunately, I am not managing to integrate LCN with HA.
If anything I’m sharing doesn’t seem right, feel free to let me know and I’ll proceed to delete it.
The HA integration is configured as follows:
lcn:
connections:
- name: myLCN
host: 172.25.224.241
port: 4114
username: myLCNwebuser
password: myLCNwebPasswd
sensors:
- name: Temp
address: myLCN.s34.m18
source: var2
unit_of_measurement: °C
switches:
- name: luz despacho
address: myLCN.s34.m18
output: relay1
The ha log returns the following
Logger: homeassistant.components.lcn.config_flow
Source: components/lcn/config_flow.py:90
Integration: LCN (documentation, issues)
First occurred: 8:38:28 AM (1 occurrences)
Last logged: 8:38:28 AM
Connection to PCHK "myLCN" failed
It’s possible the username and password should be different from those for the web server?
or lack of any kind of licenses?
My goal is to turn on a light and read some temperature values.
Thanks in advance.
Hi @Carlos_Luis,
the logs you sent do not tell that much what‘s going on. First of all, please check if your IP address is correct.
You could also add the following snippet to your configuration.yaml
:
logger:
default: error
logs:
homeassistant.components.lcn: debug
pypck: debug
Then start HomeAssistant and post the log here.
Thanks a lot.
The IP address is the same as the one I use to access LCN via web, and it responds to ping from the HA server.
2022-05-31 09:35:56 DEBUG (MainThread) [homeassistant.components.lcn.config_flow] Validating connection parameters to PCHK host 'myLCN'
2022-05-31 09:36:02 WARNING (MainThread) [homeassistant.components.lcn.config_flow] Connection to PCHK "myLCN" failed
Dear @alengwenus I see as well the following logs:
File "/usr/src/homeassistant/homeassistant/components/lcn/config_flow.py", line 78, in async_step_import
await validate_connection(host_name, data)
File "/usr/src/homeassistant/homeassistant/components/lcn/config_flow.py", line 61, in validate_connection
await connection.async_connect(timeout=5)
Thanks in advance!
Of course:
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
2022-06-01 12:25:07 ERROR (Thread-5) [root] Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/site-packages/xiaomi_gateway/__init__.py", line 180, in _listen_to_msg
data, (ip_add, _) = self._mcastsocket.recvfrom(SOCKET_BUFSIZE)
OSError: [Errno 9] Bad file descriptor
2022-06-01 12:25:07 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /homeassistant/restart request Server disconnected
[finish] process exit code 0
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2022-06-01 12:25:18 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-01 12:25:18 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration nodered which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-01 12:25:18 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration reolink_dev which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-01 12:25:31 DEBUG (MainThread) [homeassistant.components.lcn.config_flow] Validating connection parameters to PCHK host 'myLCN'
2022-06-01 12:25:36 WARNING (MainThread) [homeassistant.components.lcn.config_flow] Connection to PCHK "myLCN" failed
2022-06-01 12:25:45 ERROR (SyncWorker_1) [xiaomi_gateway] Cannot connect to Gateway
Thanks!
Looks to me like these are not the correct logs.
In the frontend go to Settings->System->Logs, select „Home Assistant Core“ and click on the button to show the complete logs.
However, it seems like you have some malfunctioning integrations (Xiaomi?) and some custom HACS stuff. Sometimes this might cause trouble and it‘s always a good idea to deactivate it if problems with native HA components occur. I once has a similar bug report related to a HACS custom component. The solution was to setup everything from scratch… Hope that‘s not the case with you!
Dear @alengwenus,
AFAIK my HA is working good. The only problem is that I cannot integrate LCN.
Should I enter the IP of an Ethernet module (LCN-VISU) instead of the one of the Windows server with LCN?
If I go to the log section you indicate shows this:
Thanks in advance!