Indigo DomoticsSoftware Support and Home Automation Forumhttp://static.indigodomo.com/www/images/micro_eye.png2023-02-04T11:30:54-06:00https://forums.indigodomo.com/feed.php?f=1482023-02-04T11:30:54-06:002023-02-04T11:30:54-06:00https://forums.indigodomo.com/viewtopic.php?t=26872&p=215952#p215952
]]>2023-02-04T11:04:44-06:002023-02-04T11:04:44-06:00https://forums.indigodomo.com/viewtopic.php?t=26872&p=215951#p215951
There is a script I run every night around midnight which is a variation of this:
Code:
target_level = int(indigo.variables[VARIABLE ID NUMBER].value) # lowBatteryLevel email_address = indigo.variables[VARIABLE ID NUMBER].value # "notificationEmailAddress" email_body = ""
for dev in indigo.devices.itervalues(): if dev.batteryLevel: if dev.batteryLevel <= target_level: email_body += f"{dev.name} battery level: {dev.batteryLevel}\n"
if email_body != "": email_body = "The following Indigo devices have low battery levels:\n" + email_body indigo.server.sendEmailTo(email_address, subject="Indigo Low Battery Alert", body=email_body)
But you've given me the idea to add an Indigo Action to the plugin to send the battery level report to an email -- which I'll add to the TODO list.
]]>2023-02-04T08:54:11-06:002023-02-04T08:54:11-06:00https://forums.indigodomo.com/viewtopic.php?t=26872&p=215949#p215949
]]>2017-01-22T19:49:18-06:002017-01-22T19:49:18-06:00https://forums.indigodomo.com/viewtopic.php?t=16696&p=133872#p133872
]]>