Low Batteries are Bumming Me Out !

Posted on
Mon Apr 29, 2024 2:25 pm
SearchCz offline
Posts: 175
Joined: Sep 18, 2019

Low Batteries are Bumming Me Out !

I'm about at my limit with automations failing because of depleted sensor batteries. I know that the Insteon motion sensors send a signal when their batteries are low, so I'm working on setting up triggers to respond to those events before the batteries die. But I can't see anything like that on the Insteon open/close sensors. So I dont see a way to build a trigger around that dying battery, nor do I see a way to interrogate the battery condition in a script. Anyone have a clever idea on how I can be better informed about dying batteries in these sensors?

Posted on
Mon Apr 29, 2024 5:58 pm
norcoscia offline
User avatar
Posts: 1208
Joined: Sep 09, 2015

Re: Low Batteries are Bumming Me Out !

I feel your pain - I have a very convoluted set up to keep track of the Insteon batteries within Indigo - I’m not sure why Jay or Matt has not built in a simple notification you can turn on if no heartbeat is seen for two or three days (for Insteon devices that rely on a simple heartbeat for low power notification).

One of my long standing pet peeves…..

_______
Norm

Posted on
Mon Apr 29, 2024 6:18 pm
Dual offline
Posts: 267
Joined: Feb 05, 2019

Re: Low Batteries are Bumming Me Out !

I use Z wave. Once a week I get an email listing every one of my devices and when they last communicated. The email flags those that have not communicated recently. The email also shows me the battery level of every battery operated device. Not an INSTEON user so not sure if that would work for you.


Sent from my iPhone using Tapatalk

Posted on
Tue Apr 30, 2024 9:19 am
SearchCz offline
Posts: 175
Joined: Sep 18, 2019

Re: Low Batteries are Bumming Me Out !

Dual wrote:
I use Z wave. Once a week I get an email listing every one of my devices and when they last communicated. The email flags those that have not communicated recently. The email also shows me the battery level of every battery operated device. Not an INSTEON user so not sure if that would work for you.


Sent from my iPhone using Tapatalk


I would consider switching my sensors to z-wave. Which specific one(s) do you use?

Posted on
Tue Apr 30, 2024 9:36 am
Different Computers offline
User avatar
Posts: 2579
Joined: Jan 02, 2016
Location: East Coast

Re: Low Batteries are Bumming Me Out !

Dual wrote:
I use Z wave. Once a week I get an email listing every one of my devices and when they last communicated. The email flags those that have not communicated recently. The email also shows me the battery level of every battery operated device. Not an INSTEON user so not sure if that would work for you.


Would you mind detailing how you make this happen?

Sonoma on a Mac Mini M1 running Airfoil Pro, Bond Home, Camect, Roku Network Remote, Hue Lights, DomoPad, Adapters, Home Assistant Agent, HomeKitLinkSiri, EPS Smart Dimmer, Fantastic Weather, Nanoleaf, LED Simple Effects, Grafana. UnifiAP

Posted on
Tue Apr 30, 2024 9:40 am
SearchCz offline
Posts: 175
Joined: Sep 18, 2019

Re: Low Batteries are Bumming Me Out !

norcoscia wrote:
I feel your pain - I have a very convoluted set up to keep track of the Insteon batteries within Indigo - I’m not sure why Jay or Matt has not built in a simple notification you can turn on if no heartbeat is seen for two or three days (for Insteon devices that rely on a simple heartbeat for low power notification).

One of my long standing pet peeves…..


*Heartbeat* didn't occur to me. I'll give that a closer look and maybe set up my own convoluted system to alert me to dying/dead batteries. Thanks for the idea.

Posted on
Tue Apr 30, 2024 10:04 am
norcoscia offline
User avatar
Posts: 1208
Joined: Sep 09, 2015

Re: Low Batteries are Bumming Me Out !

I have (lots and lots) of both open / close and water leak detectors that are Insteon - they all send out a heartbeat “near” every 24 hours (it is a simple logic circuit that just counts up and resets so not a perfect 24 hour heartbeat like you would get from a real time clock).

Open / close sensors can be annoying when a battery gets low but you don’t want to find out your water leak sensor is not working - that could be catastrophic.

If I remember correctly (set it up about 9 years ago) - I create a variable for each device - set to zero, then I fire a trigger every 24 hours that will add one to each of the device variables. Also, once a day I fire a trigger that looks at each of those variables to check their count. I also have a trigger that resets the device variable to zero when a heartbeat for a device comes in. When I look at each variable every day — if the count is 2 then I know I have not seen a heartbeat from that device for two days and I send myself an email.

Works, but like I said it is easy to mess up - and hard to unscrew when you need to replace a device. I hope that helps (and I hope I got that right).

_______
Norm

Posted on
Tue Apr 30, 2024 2:22 pm
jalves offline
Posts: 749
Joined: Jun 16, 2013

Re: Low Batteries are Bumming Me Out !

SearchCz wrote:
Dual wrote:
I use Z wave. Once a week I get an email listing every one of my devices and when they last communicated. The email flags those that have not communicated recently. The email also shows me the battery level of every battery operated device. Not an INSTEON user so not sure if that would work for you.


Sent from my iPhone using Tapatalk


I would consider switching my sensors to z-wave. Which specific one(s) do you use?


I use several of the Aeotec multi sensor 6 models. They can run off an internal battery or via a usb adapter. When used with the adapter they have the added benefit of (potentially) extending your Z-Wave mesh network. Either way they also provide interesting/useful info about light, temperature, motion and humidity.

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

Posted on
Fri May 03, 2024 2:39 pm
Dual offline
Posts: 267
Joined: Feb 05, 2019

Re: Low Batteries are Bumming Me Out !

SearchCz wrote:
I would consider switching my sensors to z-wave. Which specific one(s) do you use?


I use many different battery powered Z wave devices.

Water sensors from UTILITECH, HOMESEER and DOME.

Contact sensors from HAOZEE, ECOLINK and RING.

Motion sensors from ZOOZ, HAOZEE, DOME, KAIPULE and NEO.

Sirens from UTILITECH and DOME.

Tilt sensors from ECOLINK.

Keypads from RING.

Deadbolts from KWIKSET.

One of my installations has 72 battery powered devices.

My other installation has 50 battery powered devices.

Each device reports a battery level. Some are fairly accurate. Some definitely not.

Posted on
Fri May 03, 2024 3:00 pm
Dual offline
Posts: 267
Joined: Feb 05, 2019

Re: Low Batteries are Bumming Me Out !

Different Computers wrote:
Dual wrote:
I use Z wave. Once a week I get an email listing every one of my devices and when they last communicated. The email flags those that have not communicated recently. The email also shows me the battery level of every battery operated device. Not an INSTEON user so not sure if that would work for you.


Would you mind detailing how you make this happen?


I have a schedule that runs once a week.

The actions include:

1. Status requests for all 120 VAC devices that don't reliably send them separated by 2 seconds between each request.

2. Executing an embedded python script to put the contents of an email into a variable. Delayed until after all of the above requests have had time to complete.

3. Send an email. Delayed until after the python script has had time to run.

The python script looks like:

Code: Select all
myContactSensors = [486281963, 1623960172, 35254491, 638536131, 953523388, 1989998343, 82583744, 1644863077, 1295123238]
myDeadbolts = [671667062, 1814970891, 649057402]
myDoublePlugs = [184907337]
myGhostXML = [371582268, 1166353817]
myKeypads = [127113438, 88503723, 1602501026]
myLightSwitches = [1603207412, 797901287, 1096629595]
myMimos = [1905722280, 539514904, 854860875, 342681409]
myMotionSensors = [1885603262, 511041888, 1641344791, 1496163121, 1141564395, 16250624, 1706186324, 1497727899, 1762259471, 1343896500, 1765103844, 1480744207, 240779169, 1870048657, 25928410, 95866447, 1018327850, 1885793068, 1602095278, 1534870073, 862211811, 137691731, 346640381, 1803074084, 34583838, 633997851, 857675639]
myNanomotes = [1944327852]
myOutdoorPlugs = [1882851795, 750631135, 16445504]
myRelays = [656110206, 1871078737, 3759410, 518852948]
myRepeaters = [114572318, 1463064041, 1847723526]
mySirens =[202691517, 1952380063]
mySmartPlugs = [1110525030, 222795418, 56466080, 523661619, 1591472387, 1431031183, 881870259, 1780931909, 1763477502, 221931887, 1213043316, 361208611, 983379074, 1548505137, 624968550, 1370562424, 1036830848, 983379074, 1031421734, 296494019]
myThermostats = [158001665, 593018055, 105668591]
myTiltSensors = [1632786192, 1009350465, 25408262, 727048093]
myValveActuators = [1582752602]
myWaterSensors = [135668281, 948416367, 1708963149, 936544558, 1792041233, 615591970, 1086943563, 1609965341, 1385989286, 1250720433, 1706899057, 733300325, 353304835, 1674734846, 175707815, 1816473645, 1688546920, 1306860753, 491034969, 1318011946, 1610082255, 474869287, 67814930]

myPhysicalDevices = myContactSensors+myDeadbolts+myDoublePlugs+myGhostXML+myKeypads+myLightSwitches+myMimos+myMotionSensors+myNanomotes+myOutdoorPlugs+myRelays+myRepeaters+mySirens+mySmartPlugs+myThermostats+myTiltSensors+myWaterSensors

myUpdateDevices = myContactSensors+myDeadbolts+myDoublePlugs+myGhostXML+myLightSwitches+myMimos+myMotionSensors+myOutdoorPlugs+myRelays+mySmartPlugs+myThermostats+myTiltSensors+myWaterSensors

myBatteryDevices = myContactSensors+myDeadbolts+myKeypads+myMotionSensors+myNanomotes+mySirens+myTiltSensors+myWaterSensors

# do the BATTERY update

theEmailBody = "BATTERY LEVELS."

for dev in indigo.devices.itervalues():
    if dev.id in myBatteryDevices:
        myNote = '---> '
        myBatteryLevel = dev.batteryLevel
        if myBatteryLevel < 40:
            myNote = 'LOW '
        theEmailBody = theEmailBody + "\n" + myNote + str(dev.batteryLevel) + "  " + str(dev.name)

myVar = indigo.variables[92083221] # "EmailBody"
indigo.variable.updateValue(myVar, theEmailBody)

# set the date

from datetime import datetime
now = datetime.now()

# do the DATE update

theEmailBody = theEmailBody + "\n" + "\n" +  "DEVICE UPDATE."

for dev in indigo.devices.itervalues():
    if dev.id in myUpdateDevices:
        myNote = '------> '
        lastComm = dev.lastSuccessfulComm
        elapsed = now - lastComm
        getSeconds = elapsed.total_seconds()
        if getSeconds > 9999:
            myNote = 'OOPS '
        theEmailBody = theEmailBody + "\n" + myNote + str(dev.lastSuccessfulComm) + "\n" + myNote + str(dev.name)

myVar = indigo.variables[92083221] # "EmailBody"
indigo.variable.updateValue(myVar, theEmailBody)


The resulting email containing the contents of myVar has 2 sections. One for battery levels and one for status updates.

An excerpt of the battery section looks like:

Code: Select all
---> 100  motion sensor -- office too south
---> 100  motion sensor -- theater room east
LOW 12  motion sensor -- theater room west
---> 81  motion sensor --- west garage east sensor
---> 86  motion sensor --- west garage west sensor


LOW batteries jump out in the email.

An expert of the update section looks like:

Code: Select all
------> 2024-05-01 19:50:50
------> smart plug -- hot water circulating pump WEST
------> 2024-05-01 20:49:22
------> smart plug -- irrigation FRONT
------> 2024-05-01 20:49:22
------> smart plug -- irrigation REAR
------> 2024-05-01 19:17:48
------> smart plug -- modem


If any have not reported they begin with the word OOPS which jumps out at me.

A very quick scroll through the email shows me if there are any issues.

As devices are added or removed from the system the python script must be updated. This requires upkeep.

I did not want the email to use all devices or all battery devices since there are some physical devices that have multiple virtual devices in Indigo. And there are other devices that I wish to exclude.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 10 guests