KNX feedback status update

Added by linuxmate almost 4 years ago

please I need help about the KNX feedback status update: I tried various configurations with eibd and Domotiga but I have seen that in Domotiga is impossible having the correct feedback status update in a KNX device: if a command is launched out of Domotiga (for example with a KNX device) is pratically impossible that the relative value changes the status.
I have seen in an commercial professional supervisor, based on linux that use eibd, a command very similar to the eibd "groupsocketlisten" launched as a process that listen continuously the trasmissions on bus. If a feedback group address changes the system updates the relative status value in the database.
Unfortunately I am not able to do it: is someone able to implement this feature in Domotiga? Would be very nice to have it.

Thanky very much

Replies (44)

RE: KNX feedback status update - Added by msp1974 about 1 month ago


Yes the on/off is value1 and the dim % in value 2. The control panel in Domotiga uses the button and slider in the same way as before but updates the values on the device differently. I have not tested this with Domotyii as to whether it works ok. If you could help with that. It maybe the dimming control function will not work and needs amending to support this new functionality.

When a status update is received by Domotiga from KNX, if it is set as a multi value dimming device, it will put the on/off status in value1 and dim status in value 2.

It does not need any change to the KNX module or device config other than selecting 'Use different values for on/off and dim' in the specific device options.

Not sure I understand what you mean by the 1 bit on/off feedback status unless I have answered this in the above.

RE: KNX feedback status update - Added by linuxmate about 1 month ago

on saturday I will do deep testing.

About the 1 bit on/off status item, thanks to your double-value implementation, is now necessary have also an additional 1 bit KNX group address to report from KNX bus to Domotiga the on/off real feeback device status, or you could read "On" if you set dimmer near to 0% or if the KNX device has multiple switch addresses and if is switched off from a command sent to other group address (tipically general-off switch command).

For example, you can look at this KNX ETS group addresses of a dimming device configuration:
- 0/0/35 switch on-off command (1 bit) (write) ## Note: The device maybe linked in ETS programming to other GA for supplementary switching control functions (example: + 0/7/0)
- 0/1/35 status on-off (1 bit) (read)
- 0/2/35 relative dimming command (4 bit) (write/read) ## Not useful in supervisioning, if you have absolute % dimming control and feedback.
- 0/3/35 absolute value direct control % (1 byte) (write)
- 0/4/35 status feedback value % (1 byte) (read)

In Domotiga "KNX basic dimmer", I have before this configuration, according to previous instructions:

Now you could have in Domotiga the seguent configuration:

Let me know if you need additional explanations about the item.

RE: KNX feedback status update - Added by linuxmate about 1 month ago

are you sure that your new CKNX.class file is loaded on the seguent address, like before?

I did not notice any difference respect previous versione after wget and compiling:
- no additional device option "Use different values for on/off and dim"
- no value2
- DPT17 like before

I confirm the necessity to add the 1bit status with double values: the best will be use value n.1 for 1bit GA command and status (for example, llonkig to my previous post... 0/0/35 and 0/1/35) and value n.2 for dimming functions (for example [0/2/35]|0/3/35|0/4/35).


RE: KNX feedback status update - Added by msp1974 about 1 month ago


Sorry for the delay in replying.

There are a number of file changes needed to support multi value dimming, ironically, the CKNX file is not one of them (as you are seeing). You need to clone my beta branch ie

git clone --single-branch --branch beta

Still struggling to understand the 1 bit status. If Domotiga sends the command today and also updates the value with either a dim value or the on/off status (think this was part of your issue that the on/off status message comes after the dim value and therefore overwrites it), then this will work as is with the on/off status message being updated into value 1 and the dim status message being updated in value 2, with only the selection of use seperate values for on/off and dim selected on the device. I think this is where my understanding of KNX limits me.

If you can test it from my beta branch and let me know what does and doesn't work then we can go from there.


RE: KNX feedback status update - Added by msp1974 about 1 month ago

Sorry should also have said on the 1 bit status point.

When domotiga receives a KNX message it extracts the group address and looks for a device with that group address against it. Ie for group address '0/0/35' it looks for this 'string' in a device address. The device address is technically '0/0/35|0/2/35|0/3/35|0/4/35', therefore is matches that the message address is in the device address. It determines whether this is an on/off status message or dim value message based on the length of the message and the 10th value in the message being either 80 or 81. 81 for off, 80 for on with the 11th value being the dim value.

If the on/off status feedback address is 0/1/35 then if this is within the device address it will update into value 1 of the device.

However, when controlling devices, Domotiga splits this device address into the individual values and sends on/off commands to the first one and dim commands to the 3rd one. If the correct GA are not in these slots it will not work. Not sure what happens if you put this 1 bit status address at the end of the list. In theory this should work.


RE: KNX feedback status update - Added by linuxmate 29 days ago

I have installed your beta version, and these are the results of my tests:
- You can see the new "use different values..." option but only into DomotiGa desktop client interface, and NOT into domotyii web-interface (very important having it also here).
- Now you can see into value 2 the on/off value and into value 1 dim% (inverted as expected!): it is important having instead on/off value reported to the first value, because is prioritary to dim, right this last one in value 2.
- If I give "On" command, the slider go to 100%, like before, but is not correct because the slider should be now indipendent from on/off commands: if not is absolutely useless having two separate values!
- If I give "Off" command, the slider try to go 0% , not correct because the slider should be indipendent from on/off commands, but the slider take an idle unreal state (for example: dim6, dim3, dim2 ecc...)
- I tried to add at the end of groups addresses the additional 1-bit on/off KNX GA status... and seems to be ok! The state is read and reported to correct value
- DPT17 and DPT 5.001 are not still working, like before

Now I have a very important question...
You didn't tell me that with this beta was necessary a database update from x025 to x026 version... I forgot to backup my previuous database (my latest backup was 2 weeks ago), and now I have the x026 version on my main domotiga house system!
I hope I will not have problems in the future with my database to return to main official domotiga version!!
How can I do, If I want go back to the original x025 database? (to avoid me data-loss and back-compatility problems to main distro).


RE: KNX feedback status update - Added by msp1974 28 days ago


I am confused about the values being updated. The on/off should go into value 1 and the dim into value 2. I need to look at how this can happen. I created a mocked up tool to send and receive KNX commands to test this with and all worked as expected. In fact all the issues you have listed (except DomotYii) should all work as you expect. Did you do a compile after you cloned? I forgot to tell you to do this - sorry.

The DPT17 and 5.001 are part of the KNX plugin and I have not updated that into my beta yet until this is working.

The db update that moved it to x026 is from the main beta. There are only a very small number of changes in this.
1) Adding the protocol for Energenie 5 devices
2) Adding the db column to support this functionality
3) The change to update the version table to show 1.0.26

If you look at the upgrade directory for the 1.0.25to1.0.26.sql file this shows these changes and can all be backed out very easily by hand if needed and you can probably not worry about 1 on the list as it will not affect anything. The offical repo will be at 1.0.26 soon as Alex says he will be promoting beta to this.

Let me know if compiling fixes it using the wrong values and on/off and slider issues. Can you also tell me if you untick use different values whether it works as normal.

The domotyii, I will work on making compatible.


RE: KNX feedback status update - Added by linuxmate 27 days ago

actually, after compiling, the behaviour is very different... but more problematic:
- on/off is now recorded to value 1 and dim% to value 2, even if 0% is interpreted as "Off"
- if you give "On" telegram often the slide bar go to On (max), but is not correct: the slider should be indipendent
- if you give "Off" telegram the value 1 and the slide bar never go to Off: the only way to set it Off is send 0% to GA of dimming feedback
- if you give any % values the slide go to % right position, but 0% set value "Off"
- if you try to set the slider to minimum (0) it takes instead an idle state (dim3, dim6, ecc...)
- in domotyii is even worst, because the slide bar appears linked only to value 1, and so is not possible view the % state: you can move the slider, it sends value but after go to On (max)
- note: I have noticed, even before, that the % idle state on slider happens also to the one-value dimming command: if you give the switch Off command, but after doesn't arrive the 0% value, the device seems to be ever On and takes an idle low % value. To avoid problems, also with single value dimmer, is important understand why the slider works in this strange way.

Sincerely, if you think the double-value support job is too hard to do, caused by Domotiga system and Domotyii incompatibility, you can choose to suspend the experiment: this maybe a great improvement to give to Domotiga 100% compatibility for KNX world, with advanced dimming and blinds controls, but only if this tuning is really possible and no too problematic: let me know how do you think about.

In any case I think is more important, before, to implement the other missing DPT into KNX module: If you have all the single functions working well, you can also choose to use their separately, for specific and other generic uses.


RE: KNX feedback status update - Added by linuxmate 26 days ago

I have done other tests to find the cause of the strange slider idle state... and I report here the behaviour (single-value basic dimmer):

Starting point: Device Dimmer Off
- switch On telegram (command or feedback) --> Device On (value On)
- dimming % telegram (command or feedback) --> Device go to correct % (value dim%)
- Switch Off telegram (command or feedback) --> Device slider is manteined to % (no value rewrite in Off) until is received expected dim
- After switching off the lamp, this one sends the Off telegram, but if domotiga don't receive also the 0
value, the slider go into unconsistent idle state
- Whein idle state condition, if you try to set slider to 0%, doesn't work: It takes an unconsistent random dim3, dim6, ecc... value: in this state the only way to switch off the slider is only send forced 0% value to device.

I think if you try to resolve this bug, almost all the main disfunctions on dimming devices, will be resolved also keeping for now the single-value dimming basic command.


RE: KNX feedback status update - Added by msp1974 24 days ago


Ok, I have been looking at this again. I think the issue is my confusion over how you expect the 2 value dimmer to work.

Can you tell me which of the following 2 options is correct - or if neither and what should be the logic

switch on telegram - device ON, slider - no change
switch off telegram - device OFF, slider - no change
dimming % telegram - device - no change, slider to dim %

switch on telegram - device ON, slider - no change
switch off telegram - device OFF, slider - 0%
dimming telegram - device - no change - slider to dim %

I have also looked at the issues you have mentioned above and I do see more issues in the KNX plugin.
It seems to be holding on to the dim value if sent prior to an on/off telegram. I have fixed this.
Can you tell me what version of gambas you are running as I cannot seem to recreate some of the slider issues you are mentioning in idle state. I am running 3.9.2. Also have you got a set of actions to recreate this I can try?
DPT5.001 - think I have fixed - will issue commands if set as single value dimmer and decode correctly. Question - when the telegram is received it interprets the value as just a number. When you send the command with the slider, it updates value 1 with 'Dim xx'. What should it do?
DPT17.001 - fixed

Option 1 above is currently on my beta branch along with the KNX fixes if you want to update it and try it and let me know if I am understanding the functionality.

The 2 value functionality is really ok to do once I understand how you expect it to work.

Obviously, once we have this sorted we can then port to Domotyii also so that this works the same.


RE: KNX feedback status update - Added by msp1974 24 days ago


I have now updated DomotiYii to support multi value dimming too. You will need to clone from my repository (beta branch)

git clone --single-branch -branch beta

You may have to follow the install instructions at but use my repo instead of the official.

Once we know this is all working, I will make a pull request to Alex to update into the main distro.


RE: KNX feedback status update - Added by linuxmate 22 days ago

great! they are very near to the end! Very good job!

About your question, in case of two values dimmer device, the right option is n.1: on/off and slider fully separated.

My Gambas version: 3.8.2 (no other pkg updates available on apt repository because I have my old Wheezy, that I don't want to change for now).

After new git clone, compiling and variuos hours of testings with ETS and Domotiga, I will report here the results:

1) Now I have not noticed the "idle" state on slider: OK!

2) Domotyii web interface:

- NO "double value" option available yet into device configuration option section
- OK dimming slider into Domotyii normal web interface (but NO mobile)
- Only in Domotyii mobile version the slider is not linked to Value 2 (dim), but into Value 1 (On-->max, Off-->min)

3) Now there is a new little rounding problem: when you set the slider to x% value, is sent the same value on the KNX bus, but very often when you left the cursor on the bar, is setted on the slider the value but -1 (and so Echo/Alexa give errors).
This behaviour happens in both single and double value dimmer device (note for Alexie: important to keep in master branch both option: single and double dimming device).

4) DPT 17.001: now the value is shown, but unfortunately all the scene numbers are interpreted as DPT scene value but #-1, for example:
KNX | Domotiga
1 --> 0
2 --> 1
3 --> 2
4 --> 3
5 --> 4

5) DPT 5.001: Is almost ok!
I have noticed that when you set "device can be dimmed" option it works but in Domotyii web interface, when you send or receive a value the box is shown "foggy" until you reload the web page.
You can see also On/Off buttons, but they don't work: if possibile will be the best remove it in this device, and let only slider bar.
Ok also for the very important domotiga "action" setting possibility: now, only if you set "device can be dimmed" option, 5.001 device is able also to send value from domotiga action: very good!

Now you can do the same thing (double value option) on the very similar KNX basic shutter device

And finally... I suggest you also other very, very important missing DPT to implement in KNX module...

DPT 20.102 HVAC MODE (R + W): for sending and receiving HVAC operating status and feedbak to/from KNX thermostat
- 0 = auto
- 1 = comfort
- 2 = standby
- 3 = economy
- 4 = building protection
(the ideal is a multiple-choice command for sending but eventually for now also the basic support to "action" write and the possibility to see the operating state is ok).

DPT 9.001 Temperature: The reading data is actually perfect, but only read.
Is necessary give also the possibility to send the temperature value: ideal for example to set an action in domotiga for value sending


RE: KNX feedback status update - Added by linuxmate 21 days ago

I confirm that the double-value dimmer device works very well, except the previous issues report about domotyii and % values (and %value with Alexa... but very well now on/off control! with KNX and Alexa).

I have also seen that if you have a normal (single value) dimmer device and you add the separate double value option, until the value data is recorded, in Domotyii is impossible view all the control box page and the control table section, and is shown an error: probably because in this case is not found a value and table, not created yet: I give you this report because in normal dimmer device, it doesn't happen, you can see the control even if there are no values available yet. After, when the device is seen and values recorded the first time, is all ok.
Very good the double value visualization in domotyii, except only in mobile layout where the slider is linked to value 2, only for feeback value status: infact if you move the slider and left it the % value is sent, but immediately after the slider goes to maximum (on position).


RE: KNX feedback status update - Added by msp1974 17 days ago


Ok have been busy this week on these issues. I will go through them in order.

1) Domotiyii web interface

double value option missing - fixed
domotiyii mobile not supporting double value - fixed
error if value 2 does not exist when displaying control box page on a multi dim device - fixed

2) Alexa integration and feedback issues
Rounding issue when setting dim value - fixed

3) DPT 17
Scene number is decremented by 1 - fixed

4) DPT 5.001
Domotiyii web interface value box goes foggy when setting value by slider - cannot recreate. Need to look at this more.
On/off buttons need removing - cannot do. This is a big change in Domotiga and Domotiyii
Action does not work unless device set to be dimmable - fixed - see notes at end

5) DPT 9.001
sending temperature control value not working - fixed - see notes at end

6) DPT 20.102 HVAC control
sending and receiving not implemented - fixed - see notes at end
multi choice value selector required - cannot do. This is a big change in DomotiGa and Domotiyii

7) KNX Basic Shutter and KNX Blinds devices
multi value dim support - I think this should work already. Have you tested it and found an issue?


Domotiga only sends a command through the KNX plugin on a value change if that device is set to switchable or dimmable. In order to send commands on value change (ie through an action) I have made a change so that you can set the device value to controllable in the device value options. Ie

edit device -> values -> double click the value you want to be controllable -> options -> select controllable

This will then call the plugin and send the value command when changed through an action, json set.device call (this is what domo-hue-bridge uses) etc

Hopefully this is now a big step forward and DomotiGa works well with you KNX environment. If you can test these fixes and give me feedback.


RE: KNX feedback status update - Added by linuxmate 16 days ago

very good! I am very happy to say you that now is almost working perfectly!

After new deep testing with ETS, I can give you the following report:

1) Domotiyii web interface --> All OK!

2) Alexa integration and feedback issues --> All OK!

3) DPT 17 --> All OK!

4) DPT 5.001
- Domotiyii web interface value box goes foggy when setting value by slider --> The issue persists, but is not very important, only annoying.
If you go in domotyii to the Control Box section and you send a 5.001 % value with the slider, the box appears always "foggy" until you reload the page, or until it receives after a feedback value (maybe is the issue? Remember, only in this case, for generic uses, you could not having the necessity of having after the feeback, but is optional)

- On/off buttons need removing - cannot do. This is a big change in Domotiga and Domotiyii --> OK, no problem!

- Action does not work unless device set to be dimmable --> All OK!

5) DPT 9.001
sending temperature control value not working --> Unfortunately, if you try to send with a setted action a temp value, this one is recorded in the Domotiga value, but on the KNX bus the telegram is sent empty, with no recognized valid 9.001 value

6) DPT 20.102 HVAC control
- sending and receiving --> All OK! (also with additional GA feedback, very good!)
- multi choice value selector required - cannot do. This is a big change in DomotiGa and Domotiyii --> ...
If possible I had an idea as a compromise solution: now, if you set the device as switchable, with On and Off buttons now you can send only the 0 (Auto) value, right sent on the bus and recorded in Domotiga: will be very useful the possibility to send as On --> Comfort value and Off --> Standby value.
In this way you could set as switch the KNX thermostat in the two main important and useful operating states, instead the others maybe called with an action, if necessary (for example useful in vacation or other limited uses, not with daily use and control)

7) KNX Basic Shutter and KNX Blinds devices --> All OK! (never tested before)

Very useful the possibility to set into the value option, a way to control it: you had a very goog idea!


RE: KNX feedback status update - Added by msp1974 16 days ago


This is good. I think I am understanding this more now.

1) DPT5.001
I still cannot seem to make this happen and it does not rely on receiving a status message only being able to send to the KNX server. However, it is a little different to some other so I have made a change for it to update the value with a Dim prefix when set as a dimable device. It will not show a Dim prefix if used only as a status/action command device. See if this makes any difference.

2) DPT9.001
I found an error in the telegram being sent. My error - sorry. Should be ok now.

3) DPT 20.102
If you now use an on/off control it will issue a Comfort/Standby command.


RE: KNX feedback status update - Added by linuxmate 15 days ago

Mark, great!

This is the new testing report:

1) DPT5.001 --> OK, problem solved!

2) DPT9.001 --> OK, problem solved!
Note: during tests I had another idea (I hope you don't hate me for this... we are working for real KNX domotiga support improvement, for all the users of Domotiga community...)
Why don't add also the possibility to use it as a dimmer? In this case you could set the temperature of the set-point as if it were a dimming slider of a lamp... will be very useful! (only single value "dimmer", with the feedback possibility to receive back from another GA the setted value on the thermostat)

3) DPT 20.102 --> Ok, very good!

Bye, Thanks

RE: KNX feedback status update - Added by msp1974 15 days ago


I had this thought also but haven't had a chance to investigate it. Obviously the dimmer slider sets a value between 0 and 100. What would you think would be the right value range for a temp setting slider? Not sure how easy this will be but I will have a look. Would also need to think how this will work with domo-hue-bridge.

I also have outstanding to be able to have custom values for on/off. So if you are using the blinds control it would show the values as up/down and shutters as open/closed instead. I have a rough version of this but needs more work. Do you think a good idea? This would also allow the HVAC to show properly with on/off too and other DPT1.xx devices.

Glad this is now all working well.


RE: KNX feedback status update - Added by linuxmate 13 days ago

in a simple "manual" temperature control made with fake-dimmer, the integer °C value maybe reasonable, even if the scale 0-100 seems to be a bit large... but if the user has the necessity to set a decimal value, can do it simpy with setting of an action control. Moreover, in a generic temperature control device is also good: for example if you want use it for set the hot water temperature in a boyler...

There is no necessity to control it with Alexa! (I think is very "dangerous" and not useful control temperature as it were a light).

I think is a great idea having custom values for commands, but is not urgent and not good if there is for you too many job to do: the really important and missing things in Domotiga KNX module is now done.

You can begin to tell to Alexie that your beta-branch (domotiga + domotiyii) will be very soon ready to go to the official next release... if possible I would like to be mentioned as a KNX consultant contributor.