Hey,
in my new house i must install Somfy iO-shutters, i was given no choice
I connect them with a KLF200 an now i can control them via HA.
Now i want to control the covers with a KNX-Switch .
And now is the question, how can i realize that?
I installed the KNX-Integration and HA ist talking to the KNX-Bus and the KNX-Bus is talking to HA.
But now I don’t know what to do next?
Can i solve it with a yaml.file or an automation?
I would really be very happy if you could help me
Greetings
That’s how the shutters / covers will be defined
farmio
(Matthias Alphart)
September 20, 2023, 3:55pm
3
Hi !
You can do that with an automation using a device trigger (KNX Interface device) (or a knx_event
event) with the Group address and payload you like to call the cover.open_cover
or cover.close_cover
service (or maybe a they have device actions, I don’t know).
Here would be a blueprint for that Cover Blueprint how to make destination in KNX work with appended text? and here is another example using knx_event KNX: Expose cover to KNX - #4 by jogie
Thanks for your fast reply @farmio
Oh that’s very difficult for me, i’m new @HA
I tried NodeRed, iOBroker and so on, but i with HA i’m feeling good at the moment and i’m in good spirits that it will work with the KNX-Switch
From the second link:
I have to put this in a knx.yaml:
knx:
event:
- address:
- "0/4/20" # GA for cover going up / down or stop
expose:
- type: percent
entity_id: sensor.cover_04_31_rolladen_fensterlinks_position_invert
address: "0/4/21" # GA for cover state
default: 0
This in the automations.yaml:
- id: 'automation.04_rollo_links_ab'
alias: Steuere Keller Rollo Fenster links
description: ''
trigger:
- platform: event
event_type: knx_event
event_data: {}
condition:
- condition: template
value_template: '{{ trigger.event.data.destination == ''0/4/20'' and trigger.event.data.data == 1 }}'
action:
- service: cover.stop_cover
data: {}
target:
entity_id: cover.04_31_rolladen_fensterlinks
- service: cover.close_cover
data: {}
target:
entity_id: cover.04_31_rolladen_fensterlinks
mode: single
- id: 'automation.04_rollo_links_auf'
alias: Steuere Keller Rollo Fenster links
description: ''
trigger:
- platform: event
event_type: knx_event
event_data: {}
condition:
- condition: template
value_template: '{{ trigger.event.data.destination == ''0/4/20'' and trigger.event.data.data == 0 }}'
action:
- service: cover.stop_cover
data: {}
target:
entity_id: cover.04_31_rolladen_fensterlinks
- service: cover.open_cover
data: {}
target:
entity_id: cover.04_31_rolladen_fensterlinks
mode: single
And where i have to put this?
- sensor:
- name: cover_04_31_rolladen_fensterlinks_position_invert
state: "{{ 100 - (state_attr('cover.04_31_rolladen_fensterlinks', 'current_position') | int) }}"
Thanks in advance
farmio
(Matthias Alphart)
September 20, 2023, 5:59pm
5
That’s a template sensor. You can configure these from the UI nowadays. See
Hey @farmio ,
i got these errors, also if i put in my GA’s and entity_id’s
farmio
(Matthias Alphart)
September 22, 2023, 3:27pm
7
These are indentation errors. Remove 2 whitespaces.
Or do the tests in the triggers event_data
, instead of adding a condition.
Or, better yet, use the UI automation builder.
I tried it with the UI automation builder but nothing happend
If i execute the automation from the UI, the shutter move down. But if i push the button on the switch, nothing happend
This is my automation with UI automation builder:
alias: Neue Automatisierung
description: ""
trigger:
- platform: device
domain: knx
device_id: c1b43dda4aa46bdf782d5c3d388476b1
type: telegram
destination:
- 1/6/10
condition: []
action:
- service: cover.close_cover
data: {}
target:
entity_id: cover.kind_2_links
mode: single
And if i put the switch, this will be shown in KNX-Group Monitor, but the shutter doesn’t move
farmio
(Matthias Alphart)
September 22, 2023, 6:51pm
9
this looks fine. Have a look at the automation debugger - maybe you’ll find something there.
Or the logs…
Heyho @farmio ,
i made it with:
knx.yaml:
event:
- address:
- "1/6/10" # GA for cover going up / down or stop
expose:
- type: percent
entity_id: sensor.cover_04_31_rolladen_fensterlinks_position_invert
address: "1/6/11" # GA for cover state
default: 0
and automations.yaml:
- id: "automation.04_rollo_kind 2_links_ab"
alias: Steuere Kind 2 Rollo Fenster links
description: ""
trigger:
- platform: event
event_type: knx_event
event_data: {}
condition:
- condition: template
value_template: "{{ trigger.event.data.destination == '1/6/10' and trigger.event.data.data== 1 }}"
action:
- service: cover.stop_cover
data: {}
target:
entity_id: cover.kind_2_links
- service: cover.close_cover
data: {}
target:
entity_id: cover.kind_2_links
mode: single
- id: "automation.04_rollo_links_auf"
alias: Steuere Keller Rollo Fenster links
description: ""
trigger:
- platform: event
event_type: knx_event
event_data: {}
condition:
- condition: template
value_template: "{{ trigger.event.data.destination == '1/6/10' and trigger.event.data.data== 0 }}"
action:
- service: cover.stop_cover
data: {}
target:
entity_id: cover.kind_2_links
- service: cover.open_cover
data: {}
target:
entity_id: cover.kind_2_links
mode: single
Now my shutters went up and down
But how can i stop them, if i push the switch again. At the Moment they only went completely up or completely down?
And for the Status / Sensor, what do I have to choose here?
Hey @farmio ,
i’m sure you just missed it
Can you please help me with the “Stop-Function” and the Status / Sensor?
Thank you very much in advance
farmio
(Matthias Alphart)
September 29, 2023, 9:00am
12
Sorry, I can’t help you there. You’ll have to try what works best with your specific switches and shutters.
For the status, I don’t know what you are trying to accomplish.