KNX Cookbook

Do all 14 react to state changes from the bus?
Do all 14 vanish when you remove/comment out 1 sensor config? Do they reappear when you put it back in place?

Yes, on all three questions.

They do all change state together (in packs of 14) to open/closed or on/off,ā€¦

When I remove 1 sensor out of the config they all get removed but they also all shown up again when I add 1 entry in my knx_binary_sensor.yaml again.

Strange. Maybe there is some kind of problem with importing the extra yaml file (!import ...) :thinking:
Do you, by accident, have exactly 14 binary sensors defined? The number 14 must origin somewhereā€¦

Yeah, Iā€™m also looking where that 14 can come fromā€¦ Nothing in my knx settings that would made this logic and also Iā€™ve a lot more then 14 binary sensors in my knx_binary_sensor.yaml .

Thanx for thinking together with me, but I think itā€™s not too bad, i can move on with this. And if I ever find whatā€™s causing this strange behaviour Iā€™ll post it in here of course.

1 Like

Hey again, I cannot figure out what I am doing wrong. I have a switch, which is supposed to turn off every light in my flat using an automation.

In ETS it is a switch which only sends ā€œOffā€.

28-02-_2021_09-31-15

Each time the switch is pressed I receive the following payload in HA.

[xknx.telegram] <Telegram direction="Incoming" source_address="x.y.z" destination_address="10/1/200" payload="<GroupValueWrite value="<DPTBinary value="0" />"

This is the set up of the GA in HA:

  binary_sensor:
    - name: gebaeude_zentral_aus_switch
      state_address: "10/1/200"
      sync_state: false

This is the setup of the automation:

- id: light_knx_alles_aus
  alias: Alles aus
  initial_state: true
  trigger:
    - platform: state
      entity_id: binary_sensor.gebaeude_zentral_aus_switch
  condition: 
    - condition: template
      value_template: '{{ (trigger.to_state.state == "off") }}'
  action:
    - service: light.turn_off
      entity_id: group.all_lights

The odd thing is now, that the automation only works once the first time after a HA-reboot. When i push the switch later on, still the Binary payload of 0 is received by HA, but the information is not triggered.

Any help would be highly appreciated.
Thank you!
Stefan

The entity state doesnā€™t change on 2nd telegram. 2 Options:

  • add ignore_internal_state: true to the binary_sensor (might work, youā€™ll need to try)
  • Add the GA to event_filter: and use a knx_event as trigger instead of a binary sensor. (Definitely works)

Thank you @farmio, ignore_internal_state worked!

Really oddā€¦ Iā€™ve had some strange issues with zwave integration some time back and it took me a while to find the root cause. And the root cause was some messed up privileges to the zwave config files. Instead the homeassistant user it was the root that owned the files - once Iā€™ve fixed it all problems went away. Maybe worth checking that for the knx files (although I donā€™t know which ones would that be).

Hello Everyone,
I have a quick question. Can we have more than one KNX instance in the same HA? Because i have one for the lights and a independent one for the GTC (heating control)

Best Regards

What do you mean by ā€œinstanceā€? You can have many, as many as you want, KNX devices in HA.

Devices i know . thank you

What i mean, can i have 2 independent IPs ?

Ah, clear. I would assume that you can only have one KNX IP gateway configured in HA but if you have two of them at your home, I would suggest configuring proper routing between the two sections of your KNX bus and then HA will be able to reach all KNX group addresses via single gateway. But donā€™t ask me how to configure the IP tunnelling - I just know this is possible but not sure how. Check the KNX/ETS manuals and guides.
Some basics described here:
https://www.ivoryegg.co.uk/essential_guides/a-guide-to-using-knx-over-ip

I have read a bit more carefully the KNX integration documentation and seems that you should be able to use multiple KNX interfaces by configuring it with the ā€œroutingā€ option:

knx:
  routing:
     local_ip: "192.168.2.109"

Explicit connection via KNX/IP routing. This requires multicast communication to work in your environment

check it out:

Amazing ! Thank you so much!

Well, if you want to know the truth! are you ready for this amazing configuration?

my heating system uses its independent comunication (Uponor), then converted to KNX, and then the company that made the hole system uses BACNET, so it got converted to bacnetā€¦ this is so stupidā€¦
And so i want the address that uponor gaveā€¦
But tomorrow ill give it a go! thank you

Hello. Need some help with RGB. Works and send colors with a 3 byte value. But how do I easily enter the colors. Red, Green and Blue.

# Loft RGB
    - name: 'RGB loftbod'
      address: '1/0/20'      
      state_address: '1/0/25'
      brightness_address: '1/0/23'
      brightness_state_address: '1/0/24'
      color_address: '1/0/29'
      color_state_address: '1/0/30'
#      individual_colors:
#        red:
#          brightness_address: '1/0/26'
#        green:
#          brightness_address: '1/0/27'
#        blue:
#          brightness_address: '1/0/28'

How do I include the individual colours rigth? I get an error on every thing I have tride.

Thanks

Did you check whether individual_colors can be combined with brightness + color? I have a feeling that you are only allowed to use one or the other but not both at the same time.

I can confirm that we can have more than one IP on the same HA! i didnt even had to put the ips addresses!

a simple knx on configuration.yaml is enough

2 Likes

Good to know in case I decide to expand my KNX installation in another part of the house

1 Like

I have having trouble (noob) with the climate configurationā€¦ if someone could help me, please

# Example configuration.yaml entry
knx:
  climate:
    - name: HASS-Kitchen.Temperature
      temperature_address: "5/1/1"
      setpoint_shift_address: "5/1/2"
      setpoint_shift_state_address: "5/1/3"
      target_temperature_state_address: "5/1/4"
      operation_mode_address: "5/1/5"
      operation_mode_state_address: "5/1/6"

this the example, and i only have these options for this particular climate.
climate1 Climate2

with this system i have only option to see the temperature and set a diferent temperatureā€¦ but i cant figure out how to set the temperature. once i try to set it up, it goes back to the original one.

ive tried this

  climate:
    - name: Gaveas2 AC Sala
      temperature_address: "0/1/1"
      setpoint_shift_address: "0/1/2"
      setpoint_shift_state_address: "0/1/2"
      target_temperature_address: "0/1/3"
      

I think this worked!!!

 climate:
   - name: Gaveas2 AC Sala
     temperature_address: "0/1/1"
     target_temperature_address: "0/1/2"
     target_temperature_state_address: "0/1/2"