KNX Cookbook (legacy)

Great, thanks! Indeed there is lots of videos on youtube :slight_smile: So this is another journey ahead but seems not very complicated.

I have a question regarding the sensor. I find it cumbersome that for almost every sensor you need to add a template sensor for three things:

  • Limit precision
  • Set an icon
  • Add/change the units

Is there any chance this could be added to the integration and how would I go about requesting this?

Thomas

For the unit just configure the appropriate value type (see list in Knx sensor docs https://www.home-assistant.io/integrations/sensor.knx ).
The icons can be changed by costumizing the entity directly (some are set with value type through device_class too). https://www.home-assistant.io/docs/configuration/customizing-devices/

Unfortunately that is not quite true. There are several data types in KNX which are not supported by the integration, and for them Iā€™m not sure how to add the unit otherwise.

Yes, but I prefer keeping everything together. I have a lot of integrations and having settings all over the place makes it very difficult to manage.

But I should have specified that my main problem is the precision. I have several sensors with up to 10 digits after the decimal sign which messes up the UI.

Thomas

The next version of xknx will bring a lot more types. https://github.com/XKNX/xknx/pull/255

For precision I have no idea. Eg temperature (dpt9) has up to 2 digits after . in my installation. Never seen 3 or more

It seems to happen with the floating point values where the lack of rounding can introduce unwanted decimals.

Thomas

ā€œAny idea why KNX lights etc donā€™t show up in ā€œEntitiesā€ of HA?ā€
This was fixed in 0.106:


Section: " Entities configuration panel now shows all entities"

Hi. Thanks for the very helpful information. I am beyond a novice on the KNX systemā€“ours was set up by an integrator. Iā€™m looking to install Home Assistant using a newly purchased GIRA KNX IP router 216700, and was trying to understand how I am meant to generate the yaml file for our setup. Is there any way to automate the conversion of the existing setup (is that an ETS database?) to the correctly formatted and fully-specified yaml?

Thanks

Iā€™m afraid youā€™ll have to do this yourself.
The group addresses canā€™t be grouped to HA devices if your integrator didnā€™t use ā€œfunctionsā€ in your etsproj file. This is a quite new functionality meant for ETS-Inside so I guess itā€™s not that common.

Iā€™d just have a read on the Knx integration docs and copy&paste from there. (I would not use xknx.yaml configuration but thatā€™s my personal preference - functionality is the same despite docs saying itā€™s better for big installations)

MAybe as some inspiration and help, my KNX/Homeassistant is documented at:

1 Like

Very nice @moe! I will send you a PM with some questions and suggestions for additional info.

1 Like

@Jpsy Thanks for the feedback. Added a specific lovelace section and some more explanations.

:slight_smile:

1 Like

Thanks for this thread. Iā€™m installing kxn in my new home and this will prove super helpful

1 Like

Hi there,
Finally I have my KNX controllers for AC set up (Mitsubishi devices). I was able to configure the KNX Climate device in HA, signals are properly being sent to AC KNX units (see it in the monitoring) but some features donā€™t work. E.g. I cen set and read the setpoint temperature, I can control the unit e.g. set mode to Auto, Cool, Heat or Power off but only Heat and Power off are properly read in HA.
Another issue is that I canā€™t turn AC on in any other way than setting it to Heat mode. Clicking the Power On button actually results in sending a power off telegram to the On/Off control address.
Anybody has experience with KNX Climate device in HA? Any help would be welcome!
Cheers!
Adam
Here is my config:

  - platform: knx
    name: Klima Asia
    temperature_address: '1/1/74'
    target_temperature_address: '1/1/27'
    target_temperature_state_address: '1/1/73'
    on_off_address: '1/1/0'
    on_off_state_address: '1/1/46'
    controller_mode_address: '1/1/1'
    controller_mode_state_address: '1/1/47'
    min_temp: 16.0
    max_temp: 26.0

below is the log from ETS, as you can see control and status values are correct and on correct addresses. Also the AC unit reacts as expected, i.e. switches to the selected mode, but HA does not update its status properly.

Hi @adorobis,
can you trigger the required functions directly with a KNX switch on the bus?
If so, you can solve your problem like this:
Watch the telegrams on the bus with ETSā€™ monitor tool while you activate/deactivate the desired function. Then emit exactly that telegram through the knx.send service of HA.
I did not find the time yet to explain the details of this service, but I already wrote some basics in this answer above.
Cheers, Jƶrg

Yes, I can. Actually also the KNX Climate device works mostly ok, that is it switches ac mode properly. The problem is that the mode is not properly read back by HA.

I checked your YAML and your KNX monitoring log and it all seems very correct to me. Your setup contains the GAs that are used on the bus to trigger actions and to receive status information. I am not sure, if this is a bug. Also it looks like the KNX integration does not officially support climate devices. They are not listed in the KNX integration description.
If everything else works, here is the next step that I would try: I would set up a separate KNX sensor listening to the controller_mode_state_address. If this sensors works and receives the state changes I would try to use an automation to copy these changes into the climate device.

1 Like

Well, the official HA KNX integration lists Climate device as well

That is my plan, just have to find a free evening but I was hoping that the KNX integration would work out of the box for key features. Of course some are not supported like fan modes etc.

Oh, interesting! Climate is in fact not listed in the device type list of the KNX integrationā€™s main page: KNX - Home Assistant

For some reason itā€™s called ā€œThermostatā€ there.
@adorobis are you on 0.110 beta? There have been bugfixes for climate recently but Iā€™m not sure what they really do as I donā€™t use climate modes at all.