KNX Cookbook

This is all very hard to tell without knowing any of your automations.

  1. I would try to monitor the KNX bus with ETS to check whether the expected updates appear somehow on the bus. To ease that I would temporarily increase the update rate.
    But actually: Why do you feed the time from HA to KNX at all? Your KNX gateway should well be able to poll a time server on the web without the help of HA. KNX should always be self sufficient and able to fully work without HA. HA should only create convenience on top.

  2. Same as 1: Use the ETS monitoring / debugging to understand what happens on the bus.

  3. Impossible to tell without seeing your YAML automations. Looks to me like your logic is oscillating. Have you checked your logbook for other on/off/on/off events?

1 Like

Only the newer gateways are able to do this. I also use HA to send time to KNX.

To 1: Actually my situation is the same as DessertBesom - my IP-Interface sadly has not the ability to do so. Since it ist not really a relevant information that’s ok for me (besides the time display on nearly every switch in our household)
The expose is actually working one time after a restart so how could changing the update interval change anything for that? (+ how could I do so to try)

To 2: This is not a problem on the KNX-bus. In ETS everything is working fine. But maybe I must describe it a little better.
Actually I had an actuator with an address 2/4/1 which is defined as switch with the name “Christmas.lights”
Everything working fine in Home Assistant :slightly_smiling_face: :
Now I decided to change something
New actuator with address 2/4/2 should now be “Christmas.lights”
Old actuator with address 2/4/1 is now “desk.lamp”

I change the YAML and reboot - but it’s keeping the old names on the UI (and Nodered
) - like there is some caching.

To 3:
Actually there is not really so much logic yet. All the things are in node-red and it seems that “Output only on state change” triggers the action - where actually there shouldn’t be a state change at all.

see KNX: Date/Time update (1h) not working anymore · Issue #61001 · home-assistant/core · GitHub
Please note that the Forum isn’t an issue tracker - the GH issue tracker is. If you encouter bugs please open an issue at Github and fill the issue template with as many information as possible.

As a general rule of thumb: don’t rearrange GAs, give them a reasonable, searchable name and be done with it. I know some have the urge to keep some kind of scheamtics in their GA numbering in the end there is very little gain for the possible hassle it can produce.

it’s not a histroy, its HAs EntityRegistry. The KNX integration uses significant GAs of entities as unique_id to identify its entities globally in HA. This is needed to be able to rename entities and assign areas etc.
You changed a significant GA so a new unique_id (and entity) is created - leaving the old as orphan in the EntityRegistry. You can manually delete it from UI.
When you create a new one without delelting - having the same significant GAs it basically replaces the old, and the friendly_name, area assignment etc. is preserved in the EntityRegistry.

PS: you are free to use spaces and upper case characters, even special characters (and emojis I think) in your yamls name keys - no need for special custom dot-notation. But this is only used for the default friendly_name anyway so not that important.

Just change it in UI then.

Not possible for time exposure - thats a fixed interval.

Involving Node-Red doesn’t make finding problems easier :man_shrugging: Maybe the entities change their state from something to unavailable and back due to disconnects of your KNX tunnelling device. Automations (and I guess node-red things) should be set up to be resilent for these state changes.

1 Like

Hi Matthias & Joerg, thanks for pointing me in the proper direction! Everything sounds reasonable and I will try starting fixing things tomorrow!

Hi.

I have an old KNX installation and when i add “knx:” to configuration file i get “No Gateways found”.

This is my installation:

Is it possible to add it to HA? Do i have a gateway?

I don’t see one.

Do you have the project file of your installation? Is the installer still around?

A gateway can quickly be added - it’s about 150€ hardware (and needs a network cable and ~2TE space).

No and no.

But i do have this on my living room:

Aha. Does it have a name? What is an “Endereceo IP” and what device is there?
Does it control knx devices?

I donÂŽt know the name or the device. It does controls all the knx devices.

Info on screen is:

IP Adress
Subnetwork mask
Gateway (my router)
DNS Server

You could try to paste the IP address in your browser and see if perhaps there is a login mask appearing that provides some more info what a device we are talking about here.

I guess the most important is to get the ETS project, not sure if it is possible to discover the data about devices and their configuration from the bus if you don’t have the project.

KNX: Syncing status of single switch and group switch

Hello,
I am new to HA and this forum. I am running an KNX installation with most of its functions so far without automation. KNX on HA I got running and all my existing KNX group addresses are integrated.

My window shutters do not have any position sensor nor are able to expose its status open or closed to the KNX bus. Each shutter has its physical switch with its own group address. Additionally I have physical switches and shutters grouped together by a separate group address to be able to operate a group of shouters by a single switch. This all is running fine with the physical switches. There is no status indication.

Now in HA I have the issue that I do not get it set-up in the way that HA shows a correct status of the individual shutters. It works when I operate a single shutter either by physical switch or by HA. But If I operate by switch of the group the status in HA is not changing. Acc. my understanding the KNX integration provides passive addresses for this purpose. But somehow not working so far:

Any idea what is wrong?

knx:
  cover:
# shutter single
    - name: "shutter 1"
      move_long_address: "1/2/4"
      move_short_address: "1/2/5"
      device_class: shutter
    - name: "shutter 2"
      move_long_address: "1/2/6"
      move_short_address: "1/2/7"
      device_class: shutter
#
# shutter - groups
    - name: "shutter group A"
      move_long_address:
        - "1/2/24"                  # address that will be send to
        - "1/2/4"                   # passive address shutter 1
        - "1/2/6"                   # passive address shutter 2
      move_short_address:
        - "1/2/25"                  # address that will be send to
        - "1/2/5"                   # passive address shutter 1
        - "1/2/7"                   # passive address shutter 2
      device_class: shutter

Just like in ETS, you would have to assign the group-group-address to every channel you want to control with the group. There is no link between your “shutter 1” entity and the “shutter group A” entity.

2 Likes

Thank you.
When reading your explanation it sounds logic to me. I did a quick test it it looks like it is working as expected.

2 Likes

After further testing, still I am not where I want to be.

Status light no is synchronising between single cover and group. Also standard behaviour that the group is set to “open” when one single cover is opened is as I want to have it.

But now the new issue is the switch behaviour to disable “open” or “close” function once the function is called. If I open or close a single cover (green marked button) I am not able any more to use the group button (red marked button) to repeat the command in the same direction for all other group members.

Screenshot

You should probably use a group rather then a knx entity for this.
Or just configure the group-group-addresses (not the single-GAs) for your group and use customize to set its assumed_state: True - but all 3 buttons will always be active then.

If anyone starts a home assistant project with KNX and you have the ETS project exported as .knxproj file, I have writtent his script which extract group object information into yaml.

→ https://github.com/laurent-martin/ets-to-homeassistant

If the ETS project makes use of “Functions”, the script will use them as objects in home assistant. (for example a dimmable light, or a cover, etc
 has multiple KNX group addresses).

In addition, it is possible to write some code to modify the behaviour of the result. So that the ETS project can be used as the source of truth and after modification, the new generated configuration can simply replace the old one.

Cheers

4 Likes

Wouldn’t a Cover Group be advantageous here?

2 Likes

The KNX entities of both single cover and group of cover somehow I must use as they are used by the KNX system. The central physical switches to operate a group of covers for me is an essential function. And essential functions acc. my philosophy needs to stay on KNX level. Now I am looking how to build HA on top of this for comfort and visualisation. But for sure, if changes on the KNX programming are helpful to realise this I can do so. The KNX project is in my hands.