I finally got my code working. It works well, but I need some help with VeraAlerts SMTP-Mail.
[code]local vBatMonID = 431
local vLowDevIDs = luup.variable_get(“urn:upnp-org:serviceId:BatteryMonitor1”,“LowDeviceList”, vBatMonID)
local vDevNames = “Devices with Low Battery:\n-----------------------------”
function ParseDevIDs (s)
s = s … ‘,’ – ending comma
local t = {} – table to collect fields
local fieldstart = 1
repeat
local nexti = string.find(s, ‘,’, fieldstart)
local vDevID = string.sub(s, fieldstart, nexti-1)
vDevID = tonumber(vDevID)
local vDevName = luup.devices[vDevID].description
vDevNames = vDevNames…“\n”…vDevName
I cannot get the subject of the email to change. It still says “Vera Notification”. Is there a way to change it? I thought “Subject =” was the solution.
Best Home Automation shopping experience. Shop at Ezlo!