This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

NodOn wallplug - multiple event triggering on one trigger
#1
I'm trying to use NodOn flushmounted switch. I'm impressed with its range also through the walls and doors. I can switch it on/off via LM and I can receive some trigger when local button is clicked. I've prepared a script which calculates its state.

Code:
value = event.getvalue()
alias = grp.alias(event.dst)
zone, mode = alias:match('(.*)_(.*)')
log(mode, value)

statusAlias = zone .. '_status'
status = grp.getvalue(statusAlias)

if mode == 'toggle' and not value then
 grp.write(statusAlias, not status)
elseif mode == 'on/off' then
 grp.write(statusAlias, value)
end
But I noticed that this script is triggered 2 times every time i push the button. Without this issue all would be greatWink

Very nice thing is when there is a power lack and then return of power the wallplug starts in the last state.
Done is better than perfect
Reply


Messages In This Thread
NodOn wallplug - multiple event triggering on one trigger - by buuuudzik - 12.07.2018, 09:56

Forum Jump: