LCN Integration to HA

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.

should be:

light:

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

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.







Dear Andre

First of all, I want to say that I’m a big fan and very grateful for your LCN integration! I control all my room thermostats via LCN and Home Assistant, and it works really well.

However, from time to time, I notice some “strange” temperature values in TVAR (see Images 1–3). For example, I occasionally get values like 6,453.5°C or -100°C. Do you have any idea where these values might come from and what I could possibly do to prevent this?

Here’s a quick overview of my setup:

  • In LCN , I write the sensor values to R1VAR (see Image 4).
  • Using an automation, I detect changes in R1VAR , read the value, and write it with an offset (in this case, +0.9°C) to TVAR (see Image 5). This allows me to individually calibrate my sensors to an equal level.

I’m not sure if the incorrect values are coming directly from the sensor (R1VAR ) or if they are caused during the calculation and transfer to TVAR .

Additionally, I’ve noticed some strange behavior in Home Assistant. For example, in Image 6, you can see a temperature value of 3,176.7°C in TReg1 . At the same time, as shown in Image 7, the value for TReg2 in LCN is empty.

Do you have any idea what might be causing this issue?

Thanks in advance for your help! I really appreciate your support.

Best regards
Patrick

Hello, maybe someone can help me? I‘m trying to connect my LCN installation to HA. I have installed the LCN integration, have entered the PCHK connection data and the PCHK device was succesfully created in HA. But I cannot find an option to read-in the LCN devices. What am I doing wrong?