15.06.2016, 09:40
Hi, I am having the issue with a reed connected to the re:actor. It continually sends an update even if nothing has changed. Did I configure something wrong? I only want an action when the value changes.
reed and updates on no change
|
15.06.2016, 09:40
Hi, I am having the issue with a reed connected to the re:actor. It continually sends an update even if nothing has changed. Did I configure something wrong? I only want an action when the value changes.
21.06.2016, 13:13
(15.06.2016, 09:40)managementboy Wrote: Hi, I am having the issue with a reed connected to the re:actor. It continually sends an update even if nothing has changed. Did I configure something wrong? I only want an action when the value changes. Since I did not get any reply I asume I was not concrete enough. Here a screenshot of the object: ![]() And this is the script attached to the object. Code: 123456789 if (event.getvalue() > 1) then
-- Door closed
--set status object for door closed
grp.update('4/4/6', true)
else
-- Door open
-- set status object for door open
grp.update('4/4/6', false)
endnormal is about 1.1V... door open is about 0.6V What am I doing wrong?
21.06.2016, 13:21
I think you should only send update if previous value was different, like this:
Code: 123456 addr = '4/4/6'
value = event.getvalue() > 1
if grp.getvalue(addr) ~= value then
grp.update(addr, value)
end
22.06.2016, 11:37
(21.06.2016, 13:21)admin Wrote: I think you should only send update if previous value was different, like this: thank you!! As the Germans say: can't see the forest because of all those trees. |
« Next Oldest | Next Newest »
|