This flow was submitted before accounts existed, so nobody owns it yet. If you submitted it, open the edit link you were given — it still works — and you can attach the flow to an account from there. There is no deadline, and attaching it retires the link for good.
Dead Device Monitor
This script identifies devices in Domoticz that have stopped updating within a defined threshold (default: 7200 minutes). It notifies the user of any "dead" devices, excluding those in a predefined whitelist, by sending real-time alerts to AWTRIX3.
| System | Domoticz |
|---|---|
| Firmware | AWTRIX 3 |
| Topic | Smarthome |
| Built by | Galadril |
| File | yNg0oG66AX6D.json · 2.5 KB |
| Icons | — |
| Published | 14 Jan 2025 · updated 14 Jan 2025 |
| Downloads | 18 |
🚀 Flow:
-
Trigger:
- Runs every 1 minute to check device statuses.
-
Condition:
- Filters devices that:
- Have not updated within the threshold (7200 minutes by default).
- Are not in the whitelist of excluded devices.
- Filters devices that:
-
Actions:
✅ For each dead device:- Logs the device name and time since the last update.
- Creates a JSON payload with a notification message and a specified icon (ID: 1059).
- Sends the notification to AWTRIX3 using the "AWTRIX3 - Send Notification" device.
-
Whitelist:
- A predefined list of devices (e.g., "AWTRIX3 - Send Custom App", "Voordeur - Beweging") that are excluded from monitoring to avoid unnecessary alerts.
-
Logging:
- Provides detailed logs for each dead device, the notification payload, and the AWTRIX3 sending process.
More information:
Domoticz: www.domoticz.com
Domoticz AWTRIX3 Plugin: https://github.com/galadril/Domoticz-AWTRIX3-Plugin
-- Flow first published on January 2, 2025.
yNg0oG66AX6D.json
local THRESHOLD_MINUTES = 7200 -- Default threshold for dead devices in minutes
local NOTIFICATION_ICON = 1059 -- Notification icon ID
-- Whitelist of device names to exclude from notifications
local WHITELISTED_DEVICES = {
"Mode 1",
"System Status",
"Living Room Sensor",
}
return {
active = true,
on = {
timer = { 'every 1 hours' }
},
logging = {
level = domoticz.LOG_INFO,
marker = "DEVICE_MONITOR"
},
execute = function(domoticz)
local powerDevice = domoticz.devices("Power Monitor")
if not powerDevice or powerDevice.state ~= "On" then
return
end
-- Check if a device is in the whitelist
local function isWhitelisted(deviceName)
for _, name in ipairs(WHITELISTED_DEVICES) do
if deviceName == name then
return true
end
end
return false
end
-- Filter devices that haven't updated within the threshold and are not whitelisted
local deadDevices = domoticz.devices().filter(function(device)
return device.lastUpdate
and device.lastUpdate.minutesAgo > THRESHOLD_MINUTES
and not isWhitelisted(device.name)
end)
-- Process each dead device
deadDevices.forEach(function(deadDevice)
local notificationText = "Inactive device detected: "
notificationText = notificationText ..
deadDevice.name .. " (Last update: " ..
deadDevice.lastUpdate.minutesAgo .. " mins ago)"
-- Log message
domoticz.log(notificationText, domoticz.LOG_INFO)
-- Format the JSON payload for notifications
local payload = {
text = notificationText,
icon = NOTIFICATION_ICON
}
local payloadJSON = domoticz.utils.toJSON(payload)
domoticz.log("Sending notification: " .. payloadJSON, domoticz.LOG_INFO)
-- Send the JSON to the Notification Sender device
local notificationDevice = domoticz.devices('Notification Sender')
if notificationDevice then
notificationDevice.setDescription(payloadJSON)
notificationDevice.switchOn().afterSec(2)
else
domoticz.log("Notification Sender device not found", domoticz.LOG_ERROR)
end
end)
end
}