This block library is for the LCN Binding and enables the interaction with the LCN-Bus by the offered Thing actions.
Blocks
Hit Key
This block can hits a key of a key table in an LCN module.
It is useful to perform actions that the binding doesn`t support.
Dynamic Text
This block send custom texts to an LCN-GTxD display.
Note:
If your GTxD is configured in 3 row mode (button label on the upper and lower edge of the display) you can only use row 1-3.
Flicker Output
This Block let a dimmer output flash a given number of times.
Relay Timer
This block switches the selected relay on immediately and off again after the given time.
Flicker Output and Relay Timer i have only used it once to test.
Hit Key and Dynamic Text is in daily use and works perfectly.
Changelog
Version 1.0
- initial release
Resources
uid: LCN
tags: []
props:
parameters: []
parameterGroups: []
component: BlockLibrary
config:
name: LCN
slots:
blocks:
- component: BlockType
config:
args0:
- name: THING
check: thing
type: input_value
- name: TABLE
options:
- - A
- A
- - B
- B
- - C
- C
- - D
- D
type: field_dropdown
- name: KEY
options:
- - "1"
- "1"
- - "2"
- "2"
- - "3"
- "3"
- - "4"
- "4"
- - "5"
- "5"
- - "6"
- "6"
- - "7"
- "7"
- - "8"
- "8"
type: field_dropdown
- name: ACTION
options:
- - Hit
- HIT
- - Make
- MAKE
- - Break
- BREAK
type: field_dropdown
colour: ffd800
helpUrl: https://www.openhab.org/addons/bindings/lcn/#hit-key
message0: Sendkey to Module %1 Table %2 Key %3 Action %4
nextStatement: ""
previousStatement: ""
tooltip: >
Hits a key of a key table in an LCN module.
table - The module's key table: A, B, C or D
key - The number of the key within the key table: 1-8
action - The key's action: HIT (German: "kurz"), MAKE ("lang") or BREAK ("los")
type: sendKey
slots:
code:
- component: BlockCodeTemplate
config:
template: >
{{utility:things}}.getActions('lcn', {{input:THING}}).hitKey('{{field:TABLE}}', {{field:KEY}}, '{{field:ACTION}}');
toolbox:
- component: PresetInput
config:
name: THING
shadow: true
type: oh_thing
- component: BlockType
config:
args0:
- name: THING
check: thing
type: input_value
- name: ROW
options:
- - "1"
- "1"
- - "2"
- "2"
- - "3"
- "3"
- - "4"
- "4"
type: field_dropdown
- name: MESSAGE
check: String
type: input_value
colour: ffd800
helpUrl: https://www.openhab.org/addons/bindings/lcn/#dynamic-text
inputsInline: false
message0: Send Dynamic Text to Module %1 Row %2 Text %3
nextStatement: ""
previousStatement: ""
tooltip: >
Send dynamic text to LCN module with GTxD.
row - The number of the row in the display: 1-4
text - The text to be displayed (UTF-8)
type: sendDynamicText
slots:
code:
- component: BlockCodeTemplate
config:
template: >
{{utility:things}}.getActions('lcn', {{input:THING}}).sendDynamicText({{field:ROW}}, {{input:MESSAGE}});
toolbox:
- component: PresetInput
config:
name: THING
shadow: true
type: oh_thing
- component: PresetInput
config:
fields:
TEXT: Text for GTxD
name: MESSAGE
shadow: true
type: text
- component: BlockType
config:
args0:
- name: THING
check: thing
type: input_value
- name: Output
options:
- - "1"
- "1"
- - "2"
- "2"
- - "3"
- "3"
- - "4"
- "4"
type: field_dropdown
- name: Depth
options:
- - 25%
- "0"
- - 50%
- "1"
- - 100%
- "2"
type: field_dropdown
- name: Ramp
options:
- - 2sec
- "0"
- - 1sec
- "1"
- - 0.5sec
- "2"
type: field_dropdown
- name: Count
options:
- - "1"
- "1"
- - "2"
- "2"
- - "3"
- "3"
- - "4"
- "4"
- - "5"
- "5"
- - "6"
- "6"
- - "7"
- "7"
- - "8"
- "8"
- - "9"
- "9"
- - "10"
- "10"
- - "11"
- "11"
- - "12"
- "12"
- - "13"
- "13"
- - "14"
- "14"
- - "15"
- "15"
type: field_dropdown
colour: ffd800
helpUrl: https://www.openhab.org/addons/bindings/lcn/#flicker-output
inputsInline: false
message0: Flicker output %2 depth %3 ramp %4 count %5 to Module %1
nextStatement: ""
previousStatement: ""
tooltip: >
output flicker to LCN module.
output - The dimmer output number: 1-4
depth - The depth of the flickering: 0-2 (0=25% 1=50% 2=100% Example: When the output is fully on (100%), and 0 is selected, flashes will dim from 100% to 75% and back)
ramp - The duration/ramp of one flash: 0-2 (0=2sec 1=1sec 2=0.5sec)
count - The number of flashes: 1-15
type: outputFlicker
slots:
code:
- component: BlockCodeTemplate
config:
template: >
{{utility:things}}.getActions('lcn', {{input:THING}}).flickerOutput({{field:Output}}, {{field:Depth}}, {{field:Ramp}}, {{field:Count}});
toolbox:
- component: PresetInput
config:
name: THING
shadow: true
type: oh_thing
- component: BlockType
config:
args0:
- name: THING
check: thing
type: input_value
- name: RelayNumber
options:
- - "1"
- "1"
- - "2"
- "2"
- - "3"
- "3"
- - "4"
- "4"
- - "5"
- "5"
- - "6"
- "6"
- - "7"
- "7"
- - "8"
- "8"
type: field_dropdown
- max: 240000
min: 30
name: Duration
precision: 1
type: field_number
value: 30
colour: ffd800
helpUrl: https://www.openhab.org/addons/bindings/lcn/#relay-timer
inputsInline: true
message0: Switch relay %2 ON from Module %1 for %3 ms
nextStatement: ""
previousStatement: ""
tooltip: >
The command switches the given relay immediately to on and after a given time back to off.
relayNumber - The relay number: 1-8
duration - Timer duration in milliseconds: 30-240.000 ms
type: relayTimer
slots:
code:
- component: BlockCodeTemplate
config:
template: >
{{utility:things}}.getActions('lcn', {{input:THING}}).startRelayTimer({{field:RelayNumber}}, {{field:Duration}});
toolbox:
- component: PresetInput
config:
name: THING
shadow: true
type: oh_thing
utilities:
- component: UtilityJavaType
config:
javaClass: org.openhab.core.model.script.actions.Things
name: things