Battery level in Multitool

Posted on
Sat Feb 04, 2023 8:54 am
jalves offline
Posts: 744
Joined: Jun 16, 2013

Battery level in Multitool

I upgraded to the MultiTool plugin to 2022.1.8. But I don't see the Battery Level monitor in the drop-down menu. How do I enable this feature?


[Moderator's Note: moves topic to the Multitool plugin forum.]

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Posted on
Sat Feb 04, 2023 11:04 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Battery level in Multitool

Hi Jeff, there's not a battery level monitor feature in the Multitool Plugin per se; instead, there's a battery level reporting tool which outputs to the Indigo Events log.

Code: Select all
   Multitool                       ======================================= Battery Level Report =======================================
   Multitool                       Basement - Flood (Water)   |--------------------------------------------------| 100%
   Multitool                       Basement - Smoke           |--------------------------------------------------| 100%
   Multitool                       Foyer - Smoke (Main Floor) |--------------------------------------------------| 100%
   Multitool                       Foyer - Smoke (Upstairs)   |--------------------------------------------------| 100%
   Multitool                       Garage - Motion            |--------------------------------------------------| 100%
   Multitool                       Garage - Side Door         |--------------------------------------------------| 100%
   Multitool                       Guest Bedroom - Motion     |-----------------------------| 59%
   Multitool                       Main Attic - Motion        |--------------------------------------------------| 100%
   Multitool                       Master Bathroom - Motion   |----------------------------------| 69%
   Multitool                       Master Bedroom - Motion    |----------------------------------------------| 93%
   Multitool                       Master Closet - Motion     |------------------------------------------| 84%
   Multitool                       Office - Motion            |-----------------------------| 59%
   Multitool                       Outdoor - Luminance        |-------------------------| 50%
   Multitool                       Parlor - Motion            |--------------------------------------------------| 100%

There is a script I run every night around midnight which is a variation of this:

Code: Select all
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)

Which is also available in the forums.

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.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Feb 04, 2023 11:30 am
jalves offline
Posts: 744
Joined: Jun 16, 2013

Re: Battery level in Multitool

Thanks Dave!

Running Indigo 2023.2 on a 24" iMac M1), OS X 14.4
Jeff

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests