LCN


The lcn integration for Home Assistant allows you to connect to LCN hardware devices.

The component requires one unused license of the coupling software LCN-PCHK (version >2.8) and a LCN hardware coupler. Alternatively a LCN-PKE coupler can be used which offers two PCHK licenses. With this setup sending and receiving commands to and from LCN modules is possible.

There is currently support for the following device types within Home Assistant:

Configuration

To use your LCN system in your installation, add the following lines to your configuration.yaml file. You have to specify at least one ip/port with login credentials for a PCHK host. Consider to store your credentials in a secrets.yaml.

lcn:
  connections:
    - name: myhome
      host: 192.168.2.41
      port: 4114
      username: lcn
      password: lcn

  covers:
    - name: Living room cover
      address: myhome.s0.m7
      motor: motor1

  lights:
    - name: Bedroom light
      address: myhome.s0.m7
      output: output1
      dimmable: true
      transition: 5

  switches:
    - name: Sprinkler switch
      address: myhome.s0.m7
      output: relay1

Configuration Variables

connections

(map)(Required)List of your connections

host

(string)(Required)IP address of the LCN-PCHK host.

port

(integer)(Required)Port of the LCN-PCHK host.

username

(string)(Required)Login username for the LCN-PCHK host.

password

(string)(Required)Login password for the LCN-PCHK host.

name

(string)(Optional)Optional connection identifier. If omited, the connections will be named consecutively as pchk, pchk1, pchk2, …

Default value: pchk

sk_num_tries

(integer)(Optional)Segment coupler scans. Increase this number if you have at least one segment coupler in your system.

Default value: 0

dim_mode

(string)(Optional)Dimming mode for connected modules. The operation mode is programmed into the LCN modules by the LCN-PRO software and depends on their firmware. If you experience unexpected dimming behavior, the connection is probably in the wrong operation mode. Possible values: steps50, steps200

Default value: steps50

covers

(map)(Optional)List of your covers.

name

(string)(Required)Name of the cover.

address

(string)(Required)Address of the module/group.

motor

(string)(Required)Motor port (MOTOR_PORT).

lights

(map)(Required)List of your lights.

name

(string)(Required)Name of the light.

address

(string)(Required)Address of the module/group.

output

(string)(Required)Light source (OUTPUT_PORT, RELAY_PORT).

dimmable

(bool)(Optional)Enable the dimming feature for this light.

Default value: false

transition

(int)(Optional)Transition (ramp) time in seconds.

Default value: 0

switches

(map)(Optional)List of your switches.

name

(string)(Required)Name of the switch.

address

(string)(Required)Address of the module/group.

output

(string)(Required)Switch source (OUTPUT_PORT, RELAY_PORT).

LCN Addresses

LCN hardware devices connected to the LCN bus are called modules. LCN modules are addressed by their numeric id in the range (5..254).

Modules can be arranged in segments. Segments can be addressed by their numeric id (5..128) or 0 (= no segment exist) or 3 (= target all segments).

LCN Modules within the same segment can be grouped by their group id (5..254) or 3 (= target all groups.)

The LCN component allow the connection to more than one hardware coupler. In this case it has to be specified which hardware coupler should be used for addressing the specified module.

Whenever the address of a module or a group has to be specified, it can be addressed using one of the following syntaxes:

Example for modules:

connid.s000.m007
connid.s0.m7
s0.m7
0.7

Example for groups:

connid.s000.g007
connid.s0.g7
s0.g7
0.g7

Leading zeroes in the segment id or module/group id can be omitted. If the connection_id is omitted, the first connection defined in the configuration will be used.

LCN Constants

The platforms and service calls use several predefined constants as parameters.

Ports

Constant Values
OUTPUT_PORT output1, output2, output3, output4
RELAY_PORT relay1, relay2, relay3, relay4, relay5, relay6, relay7, relay8
MOTOR_PORT motor1, motor2, motor3, motor4

The MOTOR_PORT values specify which hardware relay configuration will be used:

Motor Relay on/off Relay up/down
motor1 relay1 relay2
motor2 relay3 relay4
motor3 relay5 relay6
motor4 relay7 relay8

Cover

The lcn cover platform allows the control of LCN relays which have been configured as motor controllers.

Light

The lcn light platform allows the control of the following LCN ports:

  • (Dimmable) output ports
  • Relays

Switch

The lcn switch platform allows the control of the following LCN ports:

  • Output ports
  • Relays