KNX Cookbook

No :rofl: tunneling is just fine - even much more tested and has proper failure feedback. Stay with tunneling if it works for you.

Routing should imho only be preferred on very big installations (having multiple routers) or when no more tunneling endpoints are free.

1 Like

Hello :slight_smile: hoping someone can help:
I have a KNX button which I would like to use to toggle my garage door (garage door (non-KNX) is integrated into HA and works fine with HA). The plan is for me to be able to push the KNX button, which will tell HA to open or close the garage door (toggle).
I have ETS.
I am wondering how to setup ETS and HA for this? should I set the button to send a value? or be a switch? thanks for any help!

Id use a knx_event for that in an automation calling cover.toggle (or whatever it is called) service.
In knx define a GA the switch sends a 1 on press.

what should i put in my in the config.yaml under KNX? something like this?

i have set the button to send a 1bit value of 1 to group address 1/2/0

    - name: "Garage Door button"
      address: "1/2/0"

No. Events don’t have a name key. See KNX - Home Assistant
They are matched by GA in the event_data -> destination field in an automation.

1 Like

Thanks a lot! I am getting there :slight_smile:
I am able to get the event to show up in HA when I push the button:

   - 1
 destination: 1/2/0
 direction: Incoming
 value: null
 source: 1.1.32
 telegramtype: GroupValueWrite
origin: LOCAL
time_fired: "2022-10-04T20:04:42.181614+00:00"
 parent_id: null
 user_id: null 

However not having success with the automation:

- id: '1664913676091'
  alias: Toggle Garage with KNX button
  description: ''
    platform: event
    event_type: knx_event
      address: '1/2/0'
      condition: template
      value_template: '{{[0] == 1 }}'
  - service: light.toggle
    data: {}
      entity_id: light.1st_floor_hue_go_1
  mode: single

I took inspiration for the automation from : Trigger automation with KNX Scene Event - #2 by 123

(I am using the hue go light to test rather than having the garage door open and close, once that works I will switch it to the cover.toggle)

any suggestions?

you seem to send an interger “1” instead of a DPT1 binary “1”. Its ok but unusual. If you use a binary payload you don’t need [0] at[0].

Other than that, if you have only one payload to check against you can use

    platform: event
    event_type: knx_event
      destination: '1/2/0'
      data: 1 # or [1] if you use integer payloads

Or even omit data: because there is not going to be a 0 sent to anyway…
Maybe include direction: Incoming

condition is indented too much. It should be on the same level as trigger. You can remove it entirely if you use data key in event_data.

Edit: wrong key in trigger. address should be destination.

I’m using Node-Red and the KNX-ultimate node. I think it’s quite a powerful combo for people that can’t really YAML.

I am trying to get my energy dashboard to work with a knx energy meter but whatever I try it is always showing 0.
For example I tried to configure the following:

  - name: "Total Active Energy"
    state_address: "0/5/4"
    type: active_energy
#    state_class: measurement
    state_class: total_increasing

I can see the sensor and it has an increasing value. So everything looks fine but not in the energy dashboard:

Is there a solution for my problem?

wait. Data for the energy dashboard is created once an hour (long term statistics).

I’m waiting for weeks :slight_smile: and I did try several configuration.

Yeah, that might be the problem.
Are the states of the sensor correct? See `/developer-tools/state
Bildschirmfoto 2022-10-08 um 21.41.05
Try removing the sensor entirely and readd it then.

1 Like

It looks fine

state_class: measurement
source: 1.1.24
unit_of_measurement: Wh
device_class: energy
friendly_name: Total Active Energy
last_reset: 1970-01-01T00:00:00+00:00

I will try your solution with removing the sensor and readding it. I am still wondering what the correct state_class is. Is it measurement or total_increasing?

Nope, thats wrong. It should be total_increasing.

1 Like

You are right. I still had my global customize active which did overwrite it. Now it is working.
This problem was driving me nuts. Thanks for your help :grinning:

1 Like

Hi @Jpsy ,
I have some kind of the same question.
My house is full with Gira RF Wall Switches.
I would love the wall switches to trigger my Home Assistant environment. No need for the reverse way.
What would I need to make this happen

  • RF Line Coupler?
  • KNX IP Router or just KNX IP Interface?
    The company who installed my Gira system does not exist any more.
    Would I need ETS (how to get it) or can I manage without it?


KNX interface should be good enough. KNX router is needed if you want to couple two KNX buses over IP.
Regarding the ETS it will be difficult if you don’t have the project. ETS free version supports up to 5 devices only. Than there is the next up which is around 200 EUR although there might be some good promos e.g. some time ago there was a limited time offer for newly registered users for ETS Home or Lite.
Not sure if you can reverse engineer your system though. With demo ETS version you can monitor your KNX system and this might be good enough to get required info for HA integration.

Hassio to connect with Gira KNX RF :eyes:

Are there any examples of how the “New entity: text” can be used in combination with KNX?

If you have some kind of display next to your front door, you could leave some nice message for your loved ones from time to time :wink:
Other than that, I have no idea 🤷 but I’m sure someone will find a good use for it.

Has anyone tried secure routing yet?

Or are there any problems with the new ConfigFlow and OptionFlow (“Configure” button on HAs integrations panel)? Like eg. “Automatic” connection mode suddenly not available?