I'm busy trying to have some dimmers enabled into fhem, and I encounter a small issue I cannot solve
I have 2 Gad's for dimmer and dimmerstatus.
I made a slider for dimmer
everything works as expected, except when DimmerStatus is coming from the bus, the slider does not reflect the position.
How could I do in order that when dimmerstatus is received, the slider gets also updated ?
here is the Raw definition for my device :
defmod dim1 KNX 2/0/70:dpt1.001:switch:nosuffix\
2/0/72:dpt5.001:dimmer:nosuffix\
2/0/73:dpt1.001:switchStatus:listenOnly:nosuffix\
2/0/74:dpt5.001:dimmerStatus:listenOnly:nosuffix
attr dim1 IODev tul
attr dim1 room Hall de nuit,KNX
attr dim1 webCmd on:off:dimmer
attr dim1 widgetOverride dimmer:slider,0,1,100,1
setstate dim1 10 %
setstate dim1 2019-12-12 19:43:15 dimmer 17 %
setstate dim1 2019-12-12 19:43:22 dimmerStatus 10 %
setstate dim1 2019-12-12 19:43:22 last-sender 1/1/21
setstate dim1 2019-12-12 19:43:22 state 10 %
setstate dim1 2019-12-12 19:43:21 switch on
setstate dim1 2019-12-12 19:43:22 switchStatus on
Afterwards I will have to tackle with devStateIcon to have dimmer status shown via icon as well ;-)
Nice question :)
The effect is very simple. You create slider to set "dimmer". If this event not happen, the slider dont react :)
I have the same situation, for all my lights. The devStateIcon shows me the acual status and the slider last set comand.
Not sure to uderstand what you mean. Could you post a full exemple of one of your dimmer ?
Lost in translation :) It is not so easy to be precise in English - so let´s use Raw-Definition and Pictures :) ;)
I use 2 devices for dimmers, one to switch, one to dim - but this not important for this explanation.
first device - switch
defmod KNX_0101126 KNX 1/1/126:dpt1.001:g1:set:nosuffix 1/2/126:dpt1.001:g2:get:nosuffix
g1: to switch
g2: status (send from the actor)
Second device - dimmer
defmod KNX_0103126 KNX 1/3/126:dpt5.001:g1:set:nosuffix 1/4/126:dpt3:g2:set:nosuffix 1/5/126:dpt5.001:g3:get:nosuffix
attr KNX_0103126 webCmd g1
attr KNX_0103126 widgetOverride g1:slider,0,1,100
g1: to set the value absolute
g2: to set/change to value relative (i dont use this from/in FHEM, only to avoid autocreate, when someone use in the building)
g3: status (send from the actor)
So, the explanation:
The slider for the dimmer works with the g1 from my 2nd device
attr KNX_0103126 webCmd g1
attr KNX_0103126 widgetOverride g1:slider,0,1,100
Is is not important where the change happens, on the bus or from FHEM - the slider is on the right position
BUT: if the status change, without set g1 from the 2nd device, the slider will not change its value. In my case, the always happen when i switch the lamp on (g1 from the 1st device), the actor send the dim-value (g3 from the 2nd device) and the slider dont react.
The devStateIcon change its value, because "state" change.
Better explanation?
And it only an explantion, no solution.
I use smartVISU and in fronthem you make different "cannels" for status (reading) and set (cmd set) - see picture.
ok, fully understood. We are doing the exact same thing, except I do it in 1 device.
Zitat von: GammaTwin am 24 Dezember 2019, 12:56:15
BUT: if the status change, without set g1 from the 2nd device, the slider will not change its value. In my case, the always happen when i switch the lamp on (g1 from the 1st device), the actor send the dim-value (g3 from the 2nd device) and the slider dont react.
The devStateIcon change its value, because "state" change.
This is exactly The issue I have and I would like to fix ;-)
;D issue is the right word. It is not bug, because webcmd is for set.
Maybe, this could be a workaroud. You send a set after every status. To avoid endless circles, the set only will set if it is different to status
Raw-Definition (UNTESTED!):
defmod di_Korrektur DOIF ([dim1:dimmerStatus]) (\
IF ([dim1:dimmer] ne [dim1:dimmerStatus]) (set dim1 dimmer [dim1:dimmerStatus])\
)
attr di_Korrektur comment dient als Workaroud
attr di_Korrektur do always