Just wondering , how can I add some limiting option for example:
If button is pressed , send notification , but once a minute , or every X time.
Now when someone press the button multiple times , it floods the system
Error: EventSystem: in PANIC Button: [string "commandArray = {} ..."]:2: bad argument #1 to 'pairs' (table expected, got nil) I don't why this error appears (every 60 seconds), but the script actually works and notifications is received correctly. You should save the Lua script as triggered on ...
I noticed that , and I actually see that I have posted previous error. After I remove ] after PANIC ' the error is on line 2. Error: EventSystem: in PANIC Button: [string "commandArray = {} ..."]:2: bad argument #1 to 'pairs' (table expected, got nil) I don't why this error appears (every 60 seconds ...
Something like this?: commandArray = {} for dev, status in pairs(devicechanged) do -- Check Panicbutton pressed if (dev:sub(1, 6) == 'PANIC '] and status == 'Closed') then commandArray['SendNotification']= dev ..' button pressed' end end return commandArray Jos Thank you very much ! Yes , exactly ...
Hello, I have about 200 panic buttons connected to my domoticz with mysensors gateways. These are push buttons , but I added every button as a door contact , because of automatic release. I want to send notification when button is pressed and I can make it from notification section of every single ...