I’m using IP Symcon in combination to visualize my LCN-system. Now I’m trying to switch the frontend to home assistant.
I already adjusted the configuration.yaml:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
logger:
default: error
logs:
homeassistant.components.lcn: debug
pypck: debug
lcn:
connections:
- name: myLCN
host: 192.168.1.249
port: 4114
username: lcn_name
password: lcn_password
lights:
- name: Garage Licht
address: myLCN.s0.m8
output: output1
Do you have any idea what’s wrong?
LOG:
Logger: homeassistant.setup
Source: setup.py:221
First occurred: 21:11:08 (1 occurrences)
Last logged: 21:11:08
Setup failed for ‘lights’: Integration not found.
You must pay attention to the leading spaces. The LCN related platforms need to be indented:
lcn:
connections:
...
lights:
...
sensors:
...
thank you for the response. With your feedback now it worked.
since many LCN-Devices are now correclty listed I want to know, if the key A5 from device M45 is pushed.
The device behind M45 is a LCN-SH and Key A5 is a TU4H.
Unfortunately, this is not so easy. In an LCN system, the status of the buttons is not communicated via the bus and therefore cannot be checked directly. The only thing that works is to trigger an action in the module where the button was pressed (so, program the key with LCN-Pro) and to monitor the action in the system.
One of those commands is the “send keys” command. There is a special event in the LCN integration, which is able to watch out for this “send keys” command and which can be used to trigger any HomeAssistant script or automation.
You can find some documentation on how to program the “send keys” command
using LCN Pro in the appendix (chapter 5) of this document.
Another solution would be to change a (virtual) relay state when a key is pressed and monitor the relay state in HomeAssistant (LCN integration → switch component).
thank you for your quick repsonse. I tried the virtual relay but didn’t succeed:
On the left hand you can see LCN-PRO and from HA I can change the status of several LCN-Modules (Relais). But the virtual Relais 5 is not available
Any suggestion or examples?
Using the (virtual relays) should work exactly the way you showed. I tested the same configuration on my side and it works. From your screenshots I cannot see anything which is not correct.
However, you could consider using the “send_keys” events.
For this you have to configure one of your module’s keys in LCN Pro to send the “send_keys” command:
![image](https://community-assets.home-assistant.io/original/4X/d/6/8/d6828ee62bb7dd56af00802a09c344fc61e8623f.png)
Ensure you select the option “A-C (former command)”.
Now, you can use a the “send_keys” event in HomeAsssistant to trigger an action. For example you could set up an automation like this:
Go to “Settings” → “Automations & scenes” → “Create Automation” → “Create new automation”.
In the “When” section click on “Add Trigger” → “Device” and select the LCN Module you sent the command from (should show up in the list with it’s name as defined in LCN-Pro).
As trigger select “Send keys received”. Select the key and the action as programmed in LCN-Pro in the first step.
In the “Then do” section you can trigger any HomeAssistant action you want.