KNX - Send Message via button press

Hi guys,

I’m pretty new to Home Assistant. Atm I have a fhem server with smartvisu on top, but I want to setup a new HA server / visualisation from scratch.
Since a single tilt up / tilt down movement is not supported by the cover card at the moment, I try to find a workaround. I was thinking of adding a button and sending out a KNX message manually.

So what I was trying to was:

type: button
tap_action:
  action: call-service
  service: knx.send
  service-data:
    address: 6/0/1
    payload: 0

However I always get the following error message:
required key not provided @data['payload']

What am I missing here?
Any help would be appriciated! :slight_smile:

Thanks!
BR
Ben

Hi!
I think it’s data not service-data and should be indented below “service”

service: knx.send
  data:
    payload: 0

Hi Matthias,

thanks a lot for the reply.
I changed it to:

type: button
tap_action:
  action: call-service
  service: knx.send
  data:
    address: 6/0/1
    payload: 0

Now I am getting the error message:

required key not provided @data['address']

BR,
Ben

¯_(ツ)_/¯ have you tried to indent the data block one more?

Hi Matthias,

I tried this as well, if this is what you mean. :slight_smile:

type: button
tap_action:
  action: call-service
  service: knx.send
    data:
      address: 6/0/1
      payload: 0

He doesn’t seem to like it.

bad indentation of a mapping entry at line 5, column 9: data: ^

:frowning:

so I have tried this out and encountered the same problem until I have added a name attribute

      - type: button
        name: hello
        tap_action:
          action: call-service
          service: knx.send
          service_data:
            payload: 0
            address: 0/4/9

This works for me now.

Hi Matthias,

perfect, thanks a lot!! It works for me as well!
Since you seem to have a KNX system yourself, how did you solve the issue with the cover card not supporting single steps (up/down)?

BR,
Ben

I didn’t. Don’t have tiltable blinds. (And I don’t use HAs UI for anything so I haven’t even configured it at all).

You could write an issue at GitHub for this. It should print a reasonable error message when the name is missing. This is quite misleading.

Hi Matthias,

I see.
There is actually already an issue on Github. (#36875)
It is more or less a frontend issue - tilt up/down buttons are missing for the cover card.

However there hasn’t been any activity for a while now.
This is why I tried to solve it with a KNX.send button.
Thanks for the help again. :slight_smile:

BR,
Ben

I meant an issue for the wrong error message - ’ required key not provided ’ while it’s there.

I tried again, but failed to reproduce this. On my testinstance service calls to knx.send now seem to work without ‘name’ too… ¯_(ツ)_/¯

I have lamella blinds and the HA stop button works only with the close adjustment. I think this is because the HA stop button just sends the value 1. At KNX push buttons it is different, the open button does move / step = 0 and the close button does move / step = 1

Blockquote[quote=“Joca, post:11, topic:275114, full:true”]
I have lamella blinds and the HA stop button works only with the close adjustment. I think this is because the HA stop button just sends the value 1. At KNX push buttons it is different, the open button does move / step = 0 and the close button does move / step = 1
[/quote]

And this is exactly the problem with the cover card. How did you solve this issue in your dashboard then? Not having the option to slightly open the tilts (or lamella blinds what you called them) is no solution. I currently use single buttons in a grid and use the knx.send service to implement the complete tilt functionality. (Step up / Up / Stop / Down / Step down) - Stop wouldn’t be necessary, as you already indicated above, Stop is the same as Step down / Step up.

Indeed. Every actuator seems to behave differently here. If you have a dedicated “stop” communication object I recommend to use this. If not maybe you can change a setting in your actuators application to have it stop a (long) move on every step value (not just one in the opposite direction). Writing this, I wonder what type of actuator this is…

You could always do it with absolute values if your actuator supports it, but I guess something like KNX Cover short address tilt slats · Issue #36875 · home-assistant/core · GitHub would be a nice addition for HA. Maybe someone finds the time to implement it :wink:

I control with angle_address in HA that correspond to slat position in the knx actuator.

Example:

- name: Suite_EST
  move_long_address: '1/1/5'
  move_short_address: '1/1/4'
  position_address: '4/1/4'
  position_state_address: '4/1/5'
  angle_address: '4/5/4'
  angle_state_address: '4/5/5'
  travelling_time_down: 51
  travelling_time_up: 61

image

I have this communication objects in my actuator: