How to handle the KNX Active/Passive State Object

Hello

I’am using KNX Binding and I have a question about the state object/telegram. The KNX actors are able to send status telegrams in two different modes passive/active. In active Mode the actor sends a telegram when ever the actor change his state. In passive Mode the actor sends the status telegram only if it is requested. The actor can only use one off these modes. The Problem with this state telegram is that the switches in the UI doesn’t match the actual state of the actor. If the mode is passive the switches show the right state if I load the page(room) but if I change the actor state with the hardware switch (not inside openHAB) the state in the openHAB does not change. This means if the page is loaded the state is requestet but after the page load it is not requested any more. If the mode is active the state does not match the actual state (on page load) but if I change the state with the hardware switch the state in the UI interface changes and reflects the actual state. So I think I have to option:

  1. Use Passive Mode
    On Page load I have the right state but I have to reload to reflect the actual state

  2. Use Active Mode
    I dont’t have the right state on page load but I can see the changes

Is there a way to archive both goals?

THX

Michael

It’s possible to set autorefresh per item, so you could use the passive mode, but I’m more interested in the claim that a GA is either active or passive, because knx is working fine with openHAB, I see every state from openHAB start, or at least almost :wink: because sometimes the first readrequest isn’t answered fast enough for every item.

But the point is, I get the correct state with read request from openHAB and also when I use a knx Button. I therefor use 2 GA, as mentioned in the wiki for knx binding.

Switch MySwitch {knx="1/1/1,<1/1/2"}

In this case, 1/1/1 is the GA which is transmitted from the knx Switches, and 1/1/2 is the status object from the actor (this is the second GA on every switch, so the switches have always the correct state. In fact, this GA is readable and active anyway.

Hello Udo,

thank you for your reply. I change the the actors settings to use passive status objects and every think worked fine. At least for normal actor (Schaltaktor). If I use the KNX switch the UI is updated correctly.
My item configuration looks like this.

Switch EG_Office_clining_light  "Decke"     (EG_Office,light)     { knx="0/1/6+<0/1/7"}``` 

I still have trouble with my Dim actors. In my Kitchen I have two lights connected to the dim actors. Most of the time I just switch these lights on/off. I seldom use the dim function. Unfortunately the Dim UI component does not include a switch function. I could send a 0% or 100% dim value but this leads to the effect that the lights turn on/off very very slowly. To turn the lights on/off the Dim actor has it on GA. So my idea was to use additional switches to turn the lights just on and off. My configuration looks like this:

```/* ------------EG Küche--------------- */
Switch EG_Kitchen_clining_light_Switch "Arbeitsplatte" (EG_Kitchen) { knx="0/1/27+<0/1/32" }
Switch EG_Kitchen_table_light_Switch   "Tisch"         (EG_Kitchen) { knx="0/1/10+<0/1/11" }

Dimmer  EG_Kitchen_clining_light_Dim "Decke [%s]" (EG_Kitchen) { knx="0/1/27+0/1/32, 0/1/28, 0/1/33+0/1/34" }
Dimmer  EG_Kitchen_table_light_Dim   "Tisch [%s]" (EG_Kitchen) { knx="0/1/10+0/1/11, 0/1/18, 0/1/35+0/1/36" } ```

With this configuration the state of the switches aren't reflecting the correct state of the lights. If I first enter the room in the UI every think is in sync. But when I use the KNX switch, the changes are not reflected in the UI. I don't understand why this happens, because with a normal switch actor it works fine. I think the problem could be the implementation of the Dimmer in the UI. Any idea what could be the Problem?

THX

Michael

You shouldn’t use one GA in more than one Item.
But you can setup a Rule to send ON/OFF to the Dimmer Item from a proxy Item. I don’t know if this will help, since my dimmers don’t allow switching at all but dimming the light all the time, except if I send a Scene to the dimmer which is defined with 0-Crossfade. If the ON/OFF-Command helps, you have to build 2 Rules, one to send the ON/OFF-Command if the Switch is toggled, another rule to update the Switch to show the correct State depending on Dimming Status.

Hi Udo.
Do you have any advice for the situation where I have wall push buttons, dimming actuators, openhab and (interim) easyKNX? I find if I set the dimmer status to active, openhab doesn’t see them and update them except after an action. But if I set the dimmer status to passive, then the wall switches don’t show the status if i just use the dimming from EasyKNX. They only work if I use the switch function in easyKNX rather than dimming. Any way to get wall switch statuses to register turning on/off without hurting openhab? without using a proxy or other service as that’s one more challenge to set up? (unless there’s an easy link?)

I think, I don’t get the point…

A dimmer has at least

  • ON/OFF Control
  • ON/OFF Status
  • Dim level Control
  • Dim level Status
  • Dim UP/DOWN Control

Each of them should be set to a unique GA. If using knx groups for controlling more than one Dimmer from a wall switch, you can add one or more GA as secondary GA to the control Communication Objects (NOT! the Status Objects)
In question of the Wall Switch, simply add the Status GA as secondary GA to the switch.
In question of openHAB, use the OH2 knx addon and set only ON/OFF control, Dim level conrol and Dim level status, no other GA needed. In textual configuration it’s something like this:

Type dimmer : ch1 "Dimmer Channel 1" [ switch="1/1/1", position="1/1/2+<1/1/3" ]

where 1/1/1 is Switch control, 1/1/2 is DPT5.001 dim level control and 1/1/3 is 5.001 dim level status.

In question of easyKNX, I have no idea, but I’m pretty sure it is something similar.

Please be aware, that there is a special parameter for Items, this is autoupdate=“false”. It will prevent openHAB from changing the status of an Item because of a sent command from openHAB.
I have absolutely no problems with dimmer status in openHAB, whether it may set through the wall switch or the openHAB UI.

Hi. Thanks. The config you’ve put is what I have except I need to remove the switch status listening GA and the relative dimming GA which is useless.

And I’m only using one thing and one item per dimmer channel.

I now see two problems. I’ll go in and make the changes you suggest. The problems I have, meanwhile, are:

  1. Problem (A) - an issue with openhab but not easyKNX (a simple iOS app to control KNX without a server - just sends telegrams direct)

The openhab status indications are just wrong. Like widely wrong. No correlation with reality. Pure switches as well on switching actuatoators.

My KNX device status report is set to passive status. If I have it set this way, at least the wall switches respond to switch telegrams as well and show on/off correctly. If I have the dimmers and switches set to active status, then the wall switch status lights don’t notice openhab-originating commands and are wrong even in response to use of the pure switch control.

In EasyKNX I had to set a ‘force update’ setting and it works beautifully. As soon as I open it, the statuses are all accurate. So something is happening differently in openHab. It’s in W10 and an earlier post made me wonder if I need to open a firewall port or something? Or set refreshing differently to defaults?

Any thoughts on what could be wrong?

  1. When I use a dimming slider, to turn ON a dimmer from openhab, it doesn’t update the core switch status. The Dimmer is set to ‘Turn lights ON and OFF using dimming’ but nothing changes in the switch status GA by the looks of things, so the wall switch indications are all wrong. A workaround is to disable switch control with the dimmer and require a separate push for the switch. But is there an easier way to do this?

Thanks for any help. Really appreciate it.

Also Udo - I just realised I have readInterval at zero on my things. I swapped it to 300. That should fix problem (1) partially. Is there now any way to trigger a refresh when the the sitemap is visited?

Also hoping for any help on the dimmer issue (2)

Update: I found the problem with status in openhab: I had to set fetch to false because somehow that was preventing getting status. Not sure why but it works very well now.

Only problem now is getting the wall switches to show on when the dimmer is on.

As said before… :wink: the correct way to configure the wall switches is to set the command GA as first GA, the status GA (for switch status of the actuator) as a second GA in the switch.
Given 1/1/1 as ON/OFF command, 1/1/2 as dim level command, 1/1/3 as dim level status, 1/1/4 as ON/OFF status and 1/1/5 as up/down, that actuator has 5 Communication Objects linked to the five GAs, the Wall switch has two Communication Objects , where the ON/OFF CO is configured to 1/1/1+1/1/4 nad up/down is configured to 1/1/5

This way the wall switch will receive the status from the dimmer actuator, may the dimmer be controlled by 1/1/1 or any other way (scenes, central control, forced control…)
But you have to set the actuator to give active status messages.

Thanks so much Udo. I missed the wall switches part and have been doing it in openhab. I inherited this installation and I’ve now seen that the wall statuses have no status GA set now. Seems weird as many channels have two switches. Not sure how they’d have been getting light status so far. But anyway - I do have to open them up.

Now back to having problems with the dimmers in openhab. They worked perfectly one day and stopped the next. Am going to tweak my gateway as it’s limited to 1 contact at the moment so maybe is dropping out.

Thanks Udo. I think it is working now. Almost When I start up openhab it doesn’t get status - but it does once I activate a switch for the first time. Should i set one of the frequencies to zero or anything?

Well, if not using scenes or special functions (builtin timer, forced switching…) the actuator will always have the same status as the sent command, so the easy-peasy configuration is only to set the command ga, but that is problematic, as you discovered…

In question of getting the current status on startup: did you set < in front of the status GA? Is the corresponding CO R-flag set? Please be aware that only one Communication Object per GA is allowed to answer to read requests, so the R-Flag has to be set only in one CO per GA.

Thanks Udo. The R flag was missing and I think that has done the trick.