KNX Cookbook

You could try

        state: "{{ 100 - (states('sensor.rolladenposition_kuche') | int(0)) }}"

You may also use address: i-rolladenpos_kuche_percent in the expose and for position_state_address. The i- with some string appended denotes an internal GA - this is only used internally and never sent to the bus.

Other than that - the value returned from position_state_address has to match the value sent from position_address. So if you send 0% to the actuator it shall, at the end of travel return 0 on the state.

@airmax please tell me the manufacturer and model of this device so I never ever fall into the trap of buying a device from them :woozy_face:

1 Like

Hi All!

Thanks for all your contribution, this is soo helpfoul,
Im quite new to both KNX and HA but Im on my way understanding both :slight_smile:
Im trying to set up some minor functionality between HA and my KNX (Wiser KNX)

I have started to add in configuration yaml, the following
knx: !include /config/knx.yaml
and in the knx.yaml, I started to set up some minor things.

First I started with reading a temperature from KNX and it worked fine, but then I tried to add a switch. But for some reason that did not work at all?

  • Can any of you sharp minds see what is going wrong?
    I get error message “Invalid config for [knx]: [Switch] is an invalid option for [knx]. Check: knx->knx->Switch. (See /config/configuration.yaml, line 31).” when checking the configuration?
    ‘—knx.yaml----’
    sensor:
    ‘- name: “Badrum temp”’
    state_address: “2/1/21”
    type: temperature
    sync_state: every 30

    Switch:
    ’ - name: “Fasadbelysning Garage”’
    address: “5/0/11”
    state_address: “5/0/12”

Best regards
Lasse

Hi :wave:!

You should use lowercase switch:

Please use code tags for yaml ```

Hi Farmio!

But f* me, tanks sooo much for you Sharp eye :wink:
The need to take care of the upper and lower case in yaml is killing me.

Thank you so much
Best regards
Lasse

Hi Farmio!

Let me see if you can solve my next question. I got the Switch and sensor working fine. So my next step is to see if I can control my floor heating. I got 6 group addresses that are controlling 12 floor heating valves/pipes. In addition to this I have one group address connected to the 6 controllers where I can switch HVAC mode on all 6 at once. I have HVAC mode (Comfort/night/eco/auto) with different temperature settings on each address. SO now I want one controller in HA to switch HVAC mode, from Comfort to Eco and back…
I have one central group address and I have no temperature addresses for the central address… I can’t get it to work in HA?
I have tried the following in my knx.yaml file

climate:

  • name: “Central floor heating”
    operation_mode_address: ‘0/5/30’
    operation_mode_status_address: ‘0/5/30’

Any ideas?

I’m not interested at the moment to control every room, only to change HVAC mode.

Best regards
Lasse

You can’t use a climate entity without the required keys - which are temperature things mostly. Its main purpose is changing temperatures.
Please have a look at the documentation https://www.home-assistant.io/integrations/knx/#climate

You can use the same mode address in multiple climate entities - so changing ones mode would change all while eg a target temperature change only counts for one room. Thats perfectly fine.

If you want a pure mode selector, use a select entity.

Please always use code tags for yaml ```. See https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

1 Like

Thanks Farmio!

Was struggeling with getting a good format on the code, but I thought you were refering to how I was using " in my code :slight_smile:
I understood that the controller needed temperature and thats why I asked if there were any other way to do this, You are reffering to select entity.
And Im quite new to both KNX and HA, but Im learning fast :slight_smile: can you perhaps send me in the right direction to ware I can find some referens material? Cause im not sure what to do with select entity…

Thanks for your swift support
Lasse

The official documentation is probably the best reference 🤷
https://www.home-assistant.io/integrations/knx/#select

Thanks Farmio!

That worked perfect, I must say that Im impressed by the KNX integration. It works like a charm :slight_smile:
This is now my knx.yaml

sensor:
- name: 'Bathroom temp'
  state_address: '2/1/21'
  type: temperature
  sync_state: every 30

switch:
- name: 'Outdoor lights House'
  address: '5/0/11'
  state_address: '5/0/12'

- name: 'Outdoor lights Garage'
  address: '5/0/09'
  state_address: '5/0/10'
  
select:
- name: 'Central floor heating'
  address: '0/5/30'
  state_address: '0/5/30'
  payload_length: 1
  options:
    - option: 'Auto'
      payload: 0
    - option: 'Comfort'
      payload: 1
    - option: 'Night'
      payload: 2
    - option: 'Eco'
      payload: 3
    - option: 'Off/FrostProtect'
      payload: 4

Super fast and insightful advice from you

best regards
Lasse

2 Likes

Fully agree. KNX integration is probably one of the least painful. I’ve set it up 2 years ago and never touched again. It just works!

1 Like

Yes. Very stable and little to no breaking change. If I am correct, there was (only) one in recent 24 months. Big kudos to the developers here. Hat tip. :+1:

1 Like

In my 4th and final step I defined a cover entity. The reason for my previous steps was, that my position_state_address is not of required type DPT5.001.

No I haven’t seen that, thanks for pointing it out. That makes it a bit less painful.

Good to know, I changed my code to use an internal address

Fortunately, this device is no longer sold. It is: Somfy EIB Interface 510i

1 Like

A question regarding the documentation, am I missing something, why is there an invert_position for cover if 0% as closed is also standard in Home Assistant? Maybe invert is meant the other way around?

Home Assistant defines 0% as closed and 100% as fully open in regards to covers

invert_position: Set this to true if your actuator reports fully closed position as 0% in KNX.

Because knx standard is the other way around and there is already inversion done internally. So if your Knx actuator doesn’t apply knx standards you can double-invert :upside_down_face::grimacing:

Hello,
I have just integrated my KNX system into Home Assistant and noticed that the status of the sensors etc. is constantly flapping. Is there a way to work with higher timeouts? Just in history, I have so 100te of entries only due to the flapping.

Hi :wave:!
It will change its state from ON to OFF whenever the Knx sensor sends an according telegram.
Where would you need a timeout?

Hi,
no there is only one change from OFF to ON back to OFF around 14:15.
All other points are OFF to Not available back to OFF.

“Not available” means the connection to your Knx IP interface is lost. You should investigate why and fix that. HA logs may help.
On a healthy installation this happens next to never.

I enabled the Logging and will check if there is anything.

Nevertheless, I found already two things in the Log that I don’t know if it’s possible to fix.

My Elsner Suntracer SL sends the Air Pressure as DPT 14.058 and not 9.006 but the weather function only accepts the values only as 9.006. Is there a way to set the DPT?

My Enertex Bayern LED Dimmsequenzer 20/5A has no possibility to send the color temperature as 7.600 instead is a percentage value vom 0 - 100% (5.001)