Bug triggering device [SOLVED]
Posted: Sunday 05 June 2022 21:09
I've wrote a simple dz script, triggering a single device
If I change state of irrigatore device, I expect a push notification, but I have twice notification.
The log says:
and the push notification are two, like the screenshot shows:
I think is a bug, or a big mistake in the script.
My setup:
Code: Select all
return {
on = {
devices = {'Irrigatore'},
timer = {},
variables = {},
scenes = {},
groups = {},
security = {},
httpResponses = {},
shellCommandResponses = {},
customEvents = {},
system = {},
},
data = {},
logging = {level = domoticz.LOG_DEBUG, marker = "BugTest: "},
execute = function(dz, device, triggeredItem)
if(triggeredItem.type == dz.EVENT_TYPE_DEVICE) then
dz.log("triggering it")
dz.notify('Test', device.state, dz.PRIORITY_NORMAL,0,'iPhone6S',dz.NSS_PUSHOVER)
end
end
}
The log says:
Code: Select all
2022-06-05 21:01:33.208 Status: dzVents: Info: BugTest: : ------ Start internal script: Script #2: Device: "Irrigatore (Dummy)", Index: 116
2022-06-05 21:01:33.209 Status: dzVents: Info: BugTest: : triggering it
2022-06-05 21:01:33.210 Status: dzVents: Info: BugTest: : ------ Finished Script #2
2022-06-05 21:01:33.395 Status: dzVents: Info: BugTest: : ------ Start internal script: Script #2: Device: "Irrigatore (Dummy)", Index: 116
2022-06-05 21:01:33.396 Status: dzVents: Info: BugTest: : triggering it
2022-06-05 21:01:33.397 Status: dzVents: Info: BugTest: : ------ Finished Script #2
My setup:
Code: Select all
Version: 2022.1 (build 14352)
Build Hash: 5765540b9
Compile Date: 2022-06-03 07:39:12
dzVents Version: 3.1.8
Python Version: 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs