04.11.2023, 09:32
Hi,
I have an zennio knx AC interface which sometimes misses commands being sent to the AC unit, and sw obj and swfb for on/off command are different states so in some case sw is true and sw fb is off and AC is not running (so KNX sw obj has been sent but AC interface has either sent the command to the AC unit and the AC unit has not responded or AC interface has not sent it... )
I believe its a compatibility issue between KNX AC interface and my AC unit.
A simple off then on again for the sw obj returns the correct operation and sw and fb are the same state.
Below is what i have thought about for an event script, may I expect to see any issue/s doing it like this? or perhaps there is better way to achieve the same?
I have an zennio knx AC interface which sometimes misses commands being sent to the AC unit, and sw obj and swfb for on/off command are different states so in some case sw is true and sw fb is off and AC is not running (so KNX sw obj has been sent but AC interface has either sent the command to the AC unit and the AC unit has not responded or AC interface has not sent it... )
I believe its a compatibility issue between KNX AC interface and my AC unit.
A simple off then on again for the sw obj returns the correct operation and sw and fb are the same state.
Below is what i have thought about for an event script, may I expect to see any issue/s doing it like this? or perhaps there is better way to achieve the same?
Code:
local AC_State = event.getvalue() -- 1/7/0 AC Switch obj bool
os.sleep(2) -- wait for fb to be changed/updated
local AC_State_FB = grp.getvalue('1/7/1') --1/7/1 AC fb obj bool
if AC_State_FB ~= AC_State then
if AC_State then
grp.write('1/7/0',false)
grp.write('1/7/0',true)
end
if not AC_State then
grp.write('1/7/0',true)
grp.write('1/7/0',false)
end
end