Kentinada Posted January 4, 2016 Posted January 4, 2016 I have a very short program that checks the status of the Insteon Motion Sensor Loew Battery indicator. If it's On, it sends me a text so I know it's low and needs to be replaced. If it's not, it waits 12 hours and checks again. I am getting a text indicating that the Low Battery is On even though it shows it's off in the Admin Console. What's up with this?
Teken Posted January 4, 2016 Posted January 4, 2016 I have a very short program that checks the status of the Insteon Motion Sensor Loew Battery indicator. If it's On, it sends me a text so I know it's low and needs to be replaced. If it's not, it waits 12 hours and checks again. I am getting a text indicating that the Low Battery is On even though it shows it's off in the Admin Console. What's up with this? Are you sure its the right device ID number and in fact its not low? I would measure the battery and you may be surprised that its well below 8.XX VDC.
hart2hart Posted January 5, 2016 Posted January 5, 2016 You don't need to query a motion sensor (in fact don't think you can) You need a simple program that is triggered when the motion sensor sets low battery on.
Kentinada Posted January 5, 2016 Author Posted January 5, 2016 Ok, maybe I didn't describe this too well. I have a motion sensor which I would to have notify me when the battery is low so I know to replace it. I attached a screen shot. See the device called Front Door Motion-Low Bat. It says it's off which I take to mean the battery is fine. I test this in a short program by checking to see if Front Door Motion-Low Bat is On. If so, it sends me a text. Otherwise it waits 12 hours and tests again. I get the text every 12 hours saying the battery is low BUT the Low Bat status is ALWAYS Off. Apparently the program is not the way to check if the battery is low. Ideas? Sent from my iPad using Tapatalk
LeeG Posted January 5, 2016 Posted January 5, 2016 Suggest posting actual Program. Information presented is conflicting. Sounds like a Program issue but that is speculation at this point.
larryllix Posted January 5, 2016 Posted January 5, 2016 Yes, post program so we can view it. Use "copy to clipboard and paste here. You cannot check an MS battery. You wait patiently for a one time LowBatt signal and it is transient. I send notification and then record all my LowBatts in a variable list to keep a record of which ones reported in.
stusviews Posted January 5, 2016 Posted January 5, 2016 All the MSs I have send a low battery signal once, then change their state to off. Here's a program I use based on what Larry posted If Control 'IN / Devices / IN Front Hall-Sensor / IN Front Hall-Dusk.Dawn' is switched On And Status 'IN / Devices / IN Front Hall-Sensor / IN Front Hall-Low Bat' is Off Then Wait 26 hours Send Notification to 'automate' content 'Motion Sensor Battery' Set 'IN / Devices / IN Front Hall-Sensor' Write Device Updates Run Program 'Front Hall MS Battery' (If) Else Wait 5 minutes $iMS_Front_Hall_Battery = 2 Send Notification to 'automate' content 'Motion Sensor Battery' Set 'IN / Devices / IN Front Hall-Sensor' Write Device Updates The variable, $iMS_Front_Hall_Battery, is an integer variable with an initial value of 1. This is the custom message: Subject: A low motion sensor battery has been detected at the location below with a status of "2": Body; <html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>New Page 1</title><meta name="GENERATOR" content="Microsoft FrontPage 6.0"><meta name="ProgId" content="FrontPage.Editor.Document"><meta name="Microsoft Theme" content="expedition-1 011, default"></head><body><p class="MsoPlainText"><b>Courtyard</b>: ${var.1.8} </p><p class="MsoPlainText"><b>Front Bathroom</b>: ${var.1.9} </p><p class="MsoPlainText"> </p><p class="MsoPlainText">--Status Key--</p><p class="MsoPlainText">1 = <b>Battery</b> OK</p><p class="MsoPlainText">2 = <b>Battery</b> low</p></body></html> Select HTML as the format, Alert, Default Subject and Variable to add a variable. Most of the code is automatically entered when you choose HTML
Kentinada Posted January 6, 2016 Author Posted January 6, 2016 Here is my program ( I couldn't find any way to copy and paste my program here) If Status 'Outdoors/Front Door Motion-Low Bat' is On Then Send notification blah blah blah Wait 12 hours Run Program 'Front Door LBC' (Then Path) [which is this program] Else Wait 12 hours
LeeG Posted January 6, 2016 Posted January 6, 2016 Once Low Bat turns On due to low battery that Program repeats the Send notification every 12 hours. The Run Program repeats the Then which has no check of Low Bat. Would need (If Path) to check Low Bat state. Run Program 'Front Door LBC' (Then Path) [which is this program] Else Wait 12 hours Also note that the Wait 12 hours in Else has no affect because there are no statements after the Wait.
stusviews Posted January 6, 2016 Posted January 6, 2016 Kentunada, To copy a program, right click on the program name and select, "Copy to Clipboard."
Kentinada Posted January 7, 2016 Author Posted January 7, 2016 Stusviews - thanks for the tip on copying code and pasting here. Here is my full program as it stands now. Front Door LBC - [iD 0007][Parent 0001] If Status 'Outdoors / Front Door Motion-Low Bat' is On Then Send Notification to 'Kent Txt' content 'Low Battery' Wait 12 hours Run Program 'Front Door LBC' (Then Path) Else Wait 12 hours Run Program 'Front Door LBC' (Then Path) LeeG - Maybe this is more a problem of not understanding when programs run. So do I have it right that this code above would run if and only when the 'Outdoors / Front Door Motion-Low Bat' goes to an On state? From what stusviews stated above, it would seem to indicate that the device changes to On one time and then goes back to Off. So wouldn't this program run when that event occurred? And I agree the Else clause is worthless as written. In fact, if stusviews is correct about the one time change, the Wait 12 hours isn't necessary either. The program would be triggered when the Low Bat indicator changes to On and I'd get the notice. I must still be missing something if it isn't this simple. And once the device changes from Off to On and back to Off, how would it ever do this again? If I put a new battery in, what happens in the MS that resets itself to check this and change one time? Thanks for any more help you can provide.
larryllix Posted January 7, 2016 Posted January 7, 2016 (edited) Stusviews - thanks for the tip on copying code and pasting here. Here is my full program as it stands now. Front Door LBC - [iD 0007][Parent 0001] If Status 'Outdoors / Front Door Motion-Low Bat' is On Then Send Notification to 'Kent Txt' content 'Low Battery' Wait 12 hours Run Program 'Front Door LBC' (Then Path) Else Wait 12 hours Run Program 'Front Door LBC' (Then Path) LeeG - Maybe this is more a problem of not understanding when programs run. So do I have it right that this code above would run if and only when the 'Outdoors / Front Door Motion-Low Bat' goes to an On state? From what stusviews stated above, it would seem to indicate that the device changes to On one time and then goes back to Off. So wouldn't this program run when that event occurred? And I agree the Else clause is worthless as written. In fact, if stusviews is correct about the one time change, the Wait 12 hours isn't necessary either. The program would be triggered when the Low Bat indicator changes to On and I'd get the notice. I must still be missing something if it isn't this simple. And once the device changes from Off to On and back to Off, how would it ever do this again? If I put a new battery in, what happens in the MS that resets itself to check this and change one time? Thanks for any more help you can provide. As stated a few times above, there is no point in rechecking an MS lowbatt signal more than once. It is transient and never shows up as On. I have10 MS units and have never seen an On for a LowBatt status. However they do usually send a LowBatt signal. Many of my batteries have died over the years. Edited January 7, 2016 by larryllix
Kentinada Posted January 7, 2016 Author Posted January 7, 2016 Larrylix, I have 3 MS right now and I'm just trying to find a way to be alerted when the battery is getting low rather than having to discover it by trial and error. Gee, this motion sensor doesn't seem to be working anymore. Guess I better check the battery. If that is the way, then oh well. I'll live.
Teken Posted January 7, 2016 Posted January 7, 2016 (edited) To your question about the battery low on status. Once you change the battery you need only right click on that low battery node and select query. That will return the on status to a off state. I am unsure why a low battery on would not be present in the admin console unless something was toggling it off or the system was rebooted which than causes all the nodes to show a blank state just something to consider. Ideals are peaceful - History is violent Edited January 7, 2016 by Teken
larryllix Posted January 7, 2016 Posted January 7, 2016 Larrylix, I have 3 MS right now and I'm just trying to find a way to be alerted when the battery is getting low rather than having to discover it by trial and error. Gee, this motion sensor doesn't seem to be working anymore. Guess I better check the battery. If that is the way, then oh well. I'll live. Yes I agree but... The point is (again) you can recheck the status of the LowBatt every five minutes and you will never see a LowBatt status = on. See posts #3, 6, and 7
LeeG Posted January 7, 2016 Posted January 7, 2016 (edited) The Motion Sensor Low Bat node does not go back to Off state on its own. Once the battery has been replaced right click on Low Bat node and select Query. This will cause the ISY to reset the Low Bat node to Off. Below are two examples where I right clicked and selected Query on two Motion Sensors. Note that no actual Query command was sent to the Motion Sensor. The Query request simply directs the ISY to reset the Low Bat node to Off. Thu 01/07/2016 09:05:46 AM : [D2D EVENT ] Event [13 F2 57 3] [sT] [0] uom=0 prec=-1 Thu 01/07/2016 09:05:46 AM : [ 13 F2 57 3] ST 0 - ISY marks Low Bat Off for 13.F2.57 Thu 01/07/2016 09:08:05 AM : [D2D EVENT ] Event [14 C1 C7 3] [sT] [0] uom=0 prec=-1 Thu 01/07/2016 09:08:05 AM : [ 14 C1 C7 3] ST 0 - ISY marks Low Bat Off for 14.C1.C7 The Motion Sensor has no Off message associated with the Low Bat node. The Motion Sensor monitors battery voltage and sends an On Message for Low Bat (node/group 3) node when voltage drops to a point where the battery should be replaced. Edited January 7, 2016 by LeeG
LeeG Posted January 7, 2016 Posted January 7, 2016 Just read the last several posts made while I was writing mine. Unlike larryllix I do see Low Bat On. It is a single attempt so if something on the Insteon network blocks the message from the battery powered device (battery powered devices do not monitor Insteon network) I can see where a busy Insteon network could miss a Low Bat On. I keep my Insteon network relatively quiet so I may be seeing messages for Low Bat On that larry does not see.
Teken Posted January 7, 2016 Posted January 7, 2016 I believe a little clarification needs to be called out for anyone else just starting to read and use Insteon products. Some people like Larry / Stu have various firmware and hardware motion sensors that apparently does not show or lock the low battery node to a on state. Where as others like LeeG and myself do . . . Regardless of what you see in the Admin Console like others have stated above. So long as you have a e-mail program set up to send you an alert you will know this condition does exist. Now, as stated above by Larry some use variables to keep a more accurate count and state of the low battery status / condition. Whereas others simply want to be notified of that fact. Everyone should just determine their use case and needs and move forward with the implementation of their preferred choice.
Kentinada Posted January 7, 2016 Author Posted January 7, 2016 So Teken, should this simple program work then? If Status 'Outdoors / Front Door Motion-Low Bat' is On Then Send Notification to 'Kent Txt' content 'Low Battery'
Teken Posted January 7, 2016 Posted January 7, 2016 (edited) So Teken, should this simple program work then? If Status 'Outdoors / Front Door Motion-Low Bat' is On Then Send Notification to 'Kent Txt' content 'Low Battery' Yes, but you could simply add this extra line to obtain what you had asked for before. If Status 'Outdoors / Front Door Motion-Low Bat' is On Then Repeat Every 12 hours Send Notification to 'Kent Txt' content 'Low Battery' Edited January 7, 2016 by Teken
Kentinada Posted January 7, 2016 Author Posted January 7, 2016 One more question and I'll quit bugging you on this topic. So by adding the repeat, that says to me that this Low Bat is not an event that triggers this code to run like other events. e.g. when my garage door goes up or down, I have code to tell me the door is open or closed. Rather, this low battery event must be caught once it gets set to On. Is that right?
Teken Posted January 7, 2016 Posted January 7, 2016 One more question and I'll quit bugging you on this topic. So by adding the repeat, that says to me that this Low Bat is not an event that triggers this code to run like other events. e.g. when my garage door goes up or down, I have code to tell me the door is open or closed. Rather, this low battery event must be caught once it gets set to On. Is that right? For the record, your not bothering anyone as this is helping lots of other people down the line later . . . The code addition I added there simply repeats the e-mail message that you crafted that a motion sensor is in a low battery state. You can change that repeat value to what ever suites your personal needs. I wanted to call it out and add it in there as I recall you wanted to be reminded just in case you were not in range of cell or the e-mail got dropped etc. Having the 994 Series Controller do that hard lifting for you and repeat that condition seems to me like a good fail over, no?
larryllix Posted January 7, 2016 Posted January 7, 2016 (edited) Just read the last several posts made while I was writing mine. Unlike larryllix I do see Low Bat On. It is a single attempt so if something on the Insteon network blocks the message from the battery powered device (battery powered devices do not monitor Insteon network) I can see where a busy Insteon network could miss a Low Bat On. I keep my Insteon network relatively quiet so I may be seeing messages for Low Bat On that larry does not see. Hold on! We have some interpretation confusion here. Agreed with all that is stated. I stated I have never seen a LowBatt On status. I also stated that Kentinada's looping status check will not accomplish much. Here is why. If people remember the ISY comes preloaded with a 3:00 AM IST Query that will do just what LeeG and Teken described.... .... Reset the LowBatt status to Off. Doubting that Kentinada has removed that factory supplied program.... If Kentinada's loop just happens to catch the status one more time before the 3:00 AM all points query, that resets his LowBatt status, then it will have some value. There is 50% chance that, a one time, catching of the second status update, will happen showing the LowBatt = On. Having said that I never understood why I have never seen a LowBat status=On but now this makes more sense. Thank you Leeg & Teken for bringing that to our attention. I was beginning to buy the MS sending a LowBatt=Off signal because I know I have recorded a few elusive Ons. Edited January 7, 2016 by larryllix
Teken Posted January 7, 2016 Posted January 7, 2016 Hold on! We have some interpretation confusion here. Agreed with all that is stated. I stated I have never seen a LowBatt On status. I also stated that Kentinada's looping status check will not accomplish anything. Here is why. If people remember the ISY comes preloaded with a 3:00 AM IST Query that will do just what LeeG and Teken described.... .... Reset the LowBatt status to Off. Doubting that Kentinada has removed that factory supplied program.... If Kentinada's loop just happens to catch the status one more time before the 3:00 AM all points query, that resets his LowBatt status, then it will have some value. There is 50% chance that, a one time, catching of the second status update, will happen showing the LowBatt = On. Having said that I never understood why I have never seen a LowBat status=On but now this makes more sense. Thank you Leeg & Teken for bringing that to our attention. I was beginning to buy the MS sending a LowBatt=Off signal because I know I have recorded a few elusive Ons. Larry, A 3:00 AM Query will not in fact reset a low battery node state . . .
larryllix Posted January 7, 2016 Posted January 7, 2016 (edited) grrrr..... The Colour palette always hangs the browser when colouring text in a code box and I lost everything. At the risk of complicating things here this is a series of programs I use to track MS Lowbatt signals. Each MS unit requires program like this. Only the constant to define the room need be changed. The $cXXXXXX integer variable is my way of using constants to avoid confusion from coded number usage. Each room is assigned a two digit number that is used for leak detectors, MS units, notifications, movement detection logic for unoccupied sensing etc... They are just Integer variables that have the init to and value permanently set to distinct numbers. The $sAlarm.level = 1 (State Var) sets off my alarm system and a level 1 only beeps my BuzzLinc for 1 second. MS.LowBatt.Libr - [ID 0074][Parent 00CD] If 'Library / Motion.Libr / LowBatt.Libr.MS' is switched On Then Wait 5 seconds $sMS_LowBatt.room = $cROOM.LIBRARY $sAlarm.level = 1 Send Notification to 'Text Larry' Send Notification to 'eMail Larry' Else - No Actions - (To add one, press 'Action') . . . . This is the recording program that keeps track of which MS units have issued LowBatt signals. A variable is keep that is shifted left two decimal places each occurrence and the new MS room added to the least significant end. With a code of 211929 the rooms would be 21=gathering room, 19=lower landing, 29=mud room. (1x = basement rooms, 2x= main floor rooms, 3x = out building units) After replacing batteries the variable list can be zeroed out again manually .As a future project I may send a line in the notifications to clear out list type "ABAB" or something similar, on the KPL keypad. I do send this variable value with each notification as a reminder that the list is stacking up. The MS units seems to operate for along time after LowBatt is sent out. MS LowBatt Recording - [ID 0078][Parent 00CD] If $sMS_LowBatt.room is not 0 Then $MS_LowBatt_Room.list %= 1000000 $MS_LowBatt_Room.list *= 100 $MS_LowBatt_Room.list += $sMS_LowBatt.room $MS_LowBatt_Room.list Init To $MS_LowBatt_Room.list Wait 2 seconds $sMS_LowBatt.room = 0 Else - No Actions - (To add one, press 'Action') Else autoruns when $sMS_Error_Room gets returned to 0 Edited January 7, 2016 by larryllix
Recommended Posts