I've devices with zwavejs2mqtt and some of them do not trigger dzVents scripts (neither a Blockly).
Even though the state is updated in dz. From the widget in dz and from the real switch.
The script
Code: Select all
local LIGHTS= {
1976 ,
1980 ,
1981 ,
1984 ,
1988 ,
1995 ,
1999 ,
2000 ,
2009 ,
2019 ,
2028 ,
2029 ,
2032 ,
2033 ,
2038 ,
2039 ,
2041 ,
2042 ,
2043 ,
2044 ,
2045 ,
2046 ,
2052 ,
2055 ,
2056 ,
2057 ,
2060 ,
2065 ,
2066 ,
2067 ,
2068 ,
2069 ,
2090 ,
2094 ,
2097 ,
2098 ,
2099 ,
2102 ,
2149 ,
2152 ,
2156 ,
2162 ,
2172 ,
2176 ,
2185 ,
2199 ,
2202 ,
2204 ,
2211 ,
2212 ,
2216 ,
2217 ,
2223 ,
2225
}
return {
logging = { level =
domoticz.LOG_ERROR,
},
on = { devices = LIGHTS ,
},
execute = function(dz, item, triggerInfo)
_G.logMarker = dz.moduleLabel
local LOG_LEVEL = dz.LOG_FORCE
local function logWrite(str, level)
if level == nil then
level = LOG_LEVEL
end
dz.log(tostring(str), level)
end
local zwaveDevice = item
logWrite('==>> Device: '.. zwaveDevice.name .. " : " .. zwaveDevice.id .. " : " .. zwaveDevice.state .. ' / ' .. zwaveDevice.levelVal)
end
} - Spoiler: show