Hi Matthias,
I just tried your blueprint, which is a great idea but I have an issue, others might have this to.
I use Gira tastsensor 2 buttons, in the actual config they send value 12 for dimming up and value of 4 for dimming down.
In your template this is 9 and 1, maybe we can make this configurable ? Or is it something in my KNX config ?
Can you look up (in the manual and in ETS) which DPT is used by your switch?
There are multiple ways to dimm in KNX. The blueprint is currently tailored for DPT 3.007
From what I found, my switches use 4 Bit relative dimming object (0-100%), from my understanding this is DPT3.007.
So I looked a bit further and found following in a document from ABB:
Relative dimming
Dimming according to the KNX standard (EIS2) takes place via this 4-bit communication object. Start-stop dimming or steptype dimming can be selected.
0 = Stop
1 = 100% dimming darker
2 = 50% dimming darker
3 = 25% dimming darker
4 = 12.5% dimming darker
5 = 6.25% dimming darker
6 = 3.2% dimming darker
7 = 1.6% dimming darker
8 = Stop
9 = 100% dimming brighter
10 = 50% dimming brighter
11 = 25% dimming brighter
12 = 12.5% dimming brighter
13 = 6.25% dimming brighter
14 = 3.2% dimming brighter
15 = 1.6% dimming brighter
Object, relative dimming
No. Object name Data type
1 Relative dimming 4 Bit EIS2 / DPT 3.007
So finally I looked into the knx parameters of my switch, and indeed, my dimstep is configured to 12,5% per step. So I suppose yours is at 100% ?
So the most simple solution for a universal blueprint without changing KNX parameters would be:
Thanks for blueprint. My KNX setup is based Jung KNX hardware. Took me a while to realize my setup is using DTP 3.007 dimming. Updated to Home Assistant to core-2021.6.4, created automation using your blueprint for the first time and have the following results:
Lights On - works as expected.
Lights Off - turns off the light as expected, but then keeps repeating the cycle forever and jams the KNX bus with the same “OFF” command every 2-3 seconds. Used EMS to monitor activity on the bus. The only way to escape the situation is by stopping/reloading automation.
Dim-up/down doesn’t work and for some reason produces the following data type error each time:
Logger: homeassistant.helpers.script Source: helpers/script.py:650 First occurred: 5:50:03 PM (4 occurrences) Last logged: 5:50:04 PM
Error in ‘choose[0]’ evaluation: In ‘template’ condition: TypeError: ‘<=’ not supported between instances of ‘int’ and ‘tuple’
my MDT switches seem to require that the brightness value for the dim-state is also set to 0 in order for the state to be displayed correctly on the switches. If the dim value is not 0 but the switch is off, it is still displayed as ON in my switches. Do you see a way to somehow add this to the blueprint?
This blueprint only handled communication from Knx to HA, not the other way.
Feel free to extend (and publish) a version that handles bidirektional communication - it’s definitively possible. Or just use Knx expose
I am already doing/using that, but the “MDT Glastaster II Smart” still does show the light as ON for some reason. But if you say it should send the default value when the light is off, I need to investigate further as to what’s wrong in my setup
edit: just monitored the group messages on the bus, and when the light is turned off, there is no group message for the brightness. When I turn it on and change the brightness, the messages are sent to the bus, so the config in general is working. Only when OFF, the telegram for the brightness is missing on my end. I am mapping Hue bulbs to KNX.
I don’t see how this PR could affect this, as this PR only changes the behavior if no attribute is exposed. But let’s not hijack this thread any further with bug hunting. I’ll see what I can do in regards to extending the blueprint as a one-stop solution. I can create a github ticket for the expose issue if you want.
Hm maybe it was the wrong PR. There were some changes - that one was kind of the beginning of this.
Yes, please create an issue so we can track the fix for this.
Thanks for this blueprint!
I just made some modifications to be able to also send the state change of the light back to the KNX Bus.
Are you interested to add this too?