Set knx electrical system with home assistant

Hello, this is my first topic and i am a total noob so sorry if i misunderstood something, i tried to search in variuous topics but still i have some doubts.
In my new house i’d like to ask to electrician to buils a knx system with some devices (lights, fan timer-electric sockets…) and i’d like to control them with home assistant.
What i don’t get is how programming with ets by the electrician and my subsequent programming with home assistant can coexist…
I mean, electrician program all my devices with address, and what each actuator does, then i connect home assistant with knx-ip device and i do my program, maybe want to change what some device will do… so this way i overwrite the ets plan on my knx devices? or with home assistant i only do automations and scenes without uploading nothing new via knx bus on knx devices.
I am so confused on this: all tutorials i saw said about connect home assistant then use same actuators as you do on phisical actuator in the house, but nothing more, no re-engineer device programs done with ets by electrician.
Is that right?
thanks a lot and sorry for bothering

Hey! Home Assistant (HA) can interact with KNX installation in two ways. As

  1. A visualization device and as
  2. A sensor

Of these two HA can only act upon KNX installation only as sensor by sending commands to KNX bus. Visualization is passive (mostly) monitoring of KNX bus for events that interests HA entities for visualizing them.

At this moment HA has no (and most likely will never have) ability to program KNX devices. Programming of KNX devices is done and will be done by ETS or a similar piece of software that KNX organization is/will be providing.

Now, where care should be taken to is automation programming in both HA and KNX devices to avoid interfering while acting on the same event. I would suggest to program KNX to do the basics, such as turning lights on and,off, basic controlling heating/cooling system & etc. - things that you need to work without properly functioning HA or no HA at all. Without programming any sophisticated routines in KNX (as they are sometimes difficult or even impossible to be modified without ETS).

And then do more sophisticated things in HA. For that you will absolutely need to have at least list of group addresses and their functions.

And as general rule you should have a hold of KNX project configuration that is done by ETS after your electrician finishes programming your KNX installation. Just in case you would need to modify KNX devices by yourself or by another KNX specialist.


@lapins01 thank you so much for the precious clarification.
I got your point so i ask more specifically for the cases i’d like to implement in my house

1 in all the rooms i wanna to set LED ligths with possibility to be dimmered and maybe change colors and i want these to be controlled in 3 ways:

  • by a phisical switch with on/off and press to dimmering
  • by a motion sensor when someone enters in the room and exit (maybe pressing the swith can overwrite the sensor cause maybe someone just sitting and reading a book is not enough for motion sensor?)
  • by another phisical swith on entrance that closes all lights and windows and curtains when i exit home

2 like scenario 1 for some electric device like curtains or windows: a switch in the room that command the opening/closing percentage and the general switch on entrance that closes all

3 some electric socket on balcony commanded by a phisical switch in the house + a command by some external sensor (rain and/or humidity) for some irrigation system (a system like start the water punp une minute everyday but don’t start at all if that day is raining + manual start) rather than external balcony lights

4 some sort of load control system that can send off command in sequence to sockets (maybe this sequence can change in time)

so for these scenarios it seems to me i have to ask electrician to program only knx phisical switch/dimmer to act the relatives actuator/lamps and knx sensor to just send telegrams on knx bus without a specific recipient (or is it needed?) so i can use home assistant to complete the settings with automation for moovement sensors or rain sensor etc.
Have no idef for load control system or some other thing like theft protection or cooling system.

Can you fix my reasoning? I think my confusion is clearing but not so sure :slight_smile:

You are planning KNX to be your house’s backbone system for controlling lights, power outlets, etc. Similarly I am doing my home renovation and implementing KNX and HA (btw, I changed my user name from “lapins01” to current).

For me KNX has to be able to handle all of the essential needs without HA or any other external actor. So I am designing my KNX installation to be able to handle my basic needs without HA. I will give you a few examples of why I design KNX in such way.

  1. Speaking about HA, it is a system that developing quite rapidly and with new HA versions come not only new and nice features, but breaking changes as well. For example, with the latest version to date came these breaking changes: 2021.7: A new entity, trigger IDs and script debugging - Home Assistant. That means that after I upgrade to a newer HA version some KNX integration features might stop working and I would need to change my HA KNX integration to make it work again.

  2. Network loss because of any reason - power outage, network switch break. Remember, for KNX and HA integration you need KNX/IP interface to connect HA host (KNX - Home Assistant). KNX/IP interfaces usually come with wire connection and for that you need Ethernet network switch usually (can be in a form of integrated router and access point).

  3. HA host loss - e.g. SD card can die on Raspbery Pi that runs HA, or virtual machine could die (in my case)

  4. I plan to use KNX movement/presence sensors for security system integrated with KNX installation). Consider electric grid power loss during longer time away - it’s way easier to keep KNX installation and security system running on UPS power for longer than additionally with HA host and network switch.

These are main considerations I use to design and implement KNX and integrate it to HA in my home.

So in my installation KNX will handle all light control, switching, heating ventilation using physical interfaces (e.g. wall switches) in my house. HA will work mainly as a remote control and monitoring interface. Also it will do all more complex automations, e.g. time or sun related wind blind control, security system arming/disarming on leaving/coming back home, etc.

1 Like

ok thanks, so your advice is to program directly knx switch and knx sensors to send telegrams to proper receivers and use HA for remote control/vocal assistant and complex scenes, like time based trigger or wheather trigger?

My idea to use a sort of master switch to overwrite sensor commands is a good/work idea?
i mean, as example, moovement sensor activate lights when someone enter in the room but if i want to mantain lights open and read a book, with master switch i interrupt moovement sensor working in some way…
same for irrigation system: i can program (this time with HA) the pump to start 1 minute everyday but rain sensor can stop this for the day it is raining.
I am not sure this is even possible to set.

Yes, I think KNX should handle as much workload as possible, so your sensor devices should send notifications on events such as button press and actuators should react to these button presses accordingly in KNX without need to use HA. KNX devices are expensive and they should work for what we pay for them.

You also can set currently unused KNX sensor buttons to send telegrams to KNX bus to have an ability to implement custom functions in HA later.

Regarding your question about activating light by movement and by switch:

  • Activation of light by movement in KNX is usually called “Staircase function”. And that is a feature that a particular KNX dimming or switching actuator model might have or might have not. Usually dimming and switching actuators have this function.

  • Whether it is possible or not to combine both “Staircase function” and manual switching using wall switch/button (you call it master switch) using the same actuator output - I am not sure, you should consult your KNX system installer that. But in general, you can always use two separate actuator outputs to power the same light.

Regarding your question about irrigation idle on rainy day:

  • With KNX I do not think that is possible to get weather forecasts at all. The only thing I think you can get from KNX weather station (that has rain sensor) is whether it is currently raining or not. But no forecast.

  • On the other hand in HA, with at least some weather providers it should be possible to know forecast and use it for automations. I didn’t do it myself yet but in this forum you can find how people are pulling out forecast attributes and use them for automations, e.g. Rain forecast automation - #11 by Amaia_Espejo. And as author of that thread put - that might require some “witchcraft” :wink:

Ok so i will ask to my technician when the time to set up the plan will come up and i will try to implement this idea with knx bus doing all the stuff doable with phisical switch and actuators then trying to use HA as remote control + timer and wheather scenes related.

What about anti theft system? can i share sensor statement by anty-theft system on knx bus? I mean is good anty theft system will work alone but can be useful having a scene that sends me a message when i am out of home if i didn’t remember to close a window (so i didn’t remember to insert alarm too) .

@marco.b, consult as much of different information sources as possible. Here, your KNX installer, Youtube videos, manuals of particular KNX devices, online forums, etc. From everywhere you can get ideas and sometimes even ready solutions.

Regarding home security/alarm systems (you call them anti theft) integration:

  • Integration between different systems depend on an availability of common interfaces on systems integrated. Some systems integrate well, some might be integrated through a third system, some can’t simply because have no interface suitable for integration.

  • Some KNX device manufacturers provide native KNX alarm systems , like ABB (

  • Some alarm system have integration interfaces provided by third party manufacturer, like Paradox and ELAUSYS (Paradox KNX Interface – ELAUSYS)

  • HA has some integrations listed under Alarm section of Integrations (Integrations - Home Assistant). Don’t be overwhelmed here with a number of names - not all of them are home security systems. Among these integrations you will find

  • HA native alarm panel called “Manual” (Manual - Home Assistant). With it you can use HA to act as a security system. But please bear mind mind that you will need to do all the automations to get this alarm working. Btw, I am using this alarm panel to get notification to HA Android app on my mobile phone when motion is detected by my KNX motion detector.

Now, don’t be overwhelmed by number of existing possibilities, because only a very few might be suitable for your particular situation. HA is DIY thing and you have do lots of research yourself to find things that would stick together well.

Thanks a lot for routes, I will use these weeks for doing as much research as I can starting from directions you give me. Thank you so much.