Announcement

Collapse
No announcement yet.

Monthly Low Battery Check

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #76
    i'm trying to set this up again, an for all that is holy I can't seem to remember how to remove the txt extension???? and I must be the worst search person ever, as I can't find it online at all.

    please someone put me out of my misery.

    EDIT. Nevermind… finally found it.

    Comment


      #77
      Originally posted by jvm View Post
      I have an easy solution that works if you have the Easy Trigger Plugin.

      1. From the Easy Trigger plugin's "Config" screen, set up a dynamic Device Group called "Batteries" consisting of all devices there "Type" equals "Z-Wave Battery". If you have devices other than Z-Wave, you may need to modify this.

      2. Set up a simple event that triggers whenever a "Battery" device is set (i.e., at each battery report). The event just checks the battery level and sends an email if its too low. In the example below, I set that to 50%. Since most battery devices report their battery state about every 12-24 hours, this won't result in too many alerts. Also, I have it sent as a text to my phone (your cell phone provider typically has an address where you send an email and it converts into a text to your phone. Here, in the US, for ATT, that would be XXXXXXXXXX@mms.att.com where you replace XXXXXXXXXX with your phone #). Here's the event:
      Works GREAT! thanks. Just tried it with pushover

      Attached Files

      Comment


        #78
        I also am having the same error of

        ERROR: Exception in script: Failed to compare two elements in the array.

        Current Date/Time: 17/09/2019 08:33:37
        HomeSeer Version: HS3 Standard Edition 3.0.0.500
        Linux version: Linux HS3-Closter 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux System Uptime: 0 Days 7 Hours 13 Minutes 14 Seconds
        IP Address: 172.20.0.17
        Number of Devices: 179
        Number of Events: 39
        Available Threads: 399
        HSTouch Enabled: False
        Event Threads: 1
        Event Trigger Eval Queue: 0
        Event Trigger Priority Eval Queue: 0
        Device Exec Queue: 0
        HSTouch Event Queue: 0
        Email Send Queue: 0

        Enabled Plug-Ins
        1.3.7.3: Device History
        3.0.0.67: EasyTrigger
        0.0.0.45: Pushover 3P
        3.0.1.252: Z-Wave


        If anybody has success running this on linux?

        Thanks,

        Devan

        Comment


          #79
          Is there easy way to modify the script to write the report in html file or any other file that I could display in HS Touch?
          Let say I would run the script once a day to update (overwrite) the report file.

          Thanks. Charles

          Comment


            #80
            I've been using this script without problems for a while now. But this weekend I added a Hue motion detector to my system and because it runs on battery I wanted to check that it was included in the report generated by the script. It was not...

            It looks like the reason is that Device Type = "Battery" (ONLY Battery) and because of this it is not recognized by the script. If I change the Device Type to something like "Test Battery" the device shows up in the report.

            Is there some way to change the script to fix this? I would avoid having to change the Device Type as this is easily forgotten when I add another Hue motion later...

            Comment


              #81
              I ran into an issue with it not recognizing some devices that have battery in the name. I change the comparison code:

              From:
              Code:
              If InStr(UCase(dv.Device_Type_String(Nothing)), "BATTERY") > 1 Then
              To:
              Code:
               If (UCASE(dv.Device_Type_String(Nothing)).contains("BATTERY")) Then
              Ref ID Battery % Device Location / Name Last Updated
              [2584] 0% Hubitat Hubitat Battery 1/1/0001 12:00:00 AM
              [2610] 0% Hubitat Hubitat Battery 1/1/0001 12:00:00 AM
              [2626] 0% Hubitat Hubitat Battery 1/1/0001 12:00:00 AM
              [2606] 49% Hubitat Hubitat Battery 3/3/2021 8:25:13 PM
              [2638] 52% Hubitat Hubitat Battery 3/3/2021 8:24:54 PM
              [2622] 52% Hubitat Hubitat Battery 3/4/2021 11:21:54 AM
              [2614] 56% Hubitat Hubitat Battery 3/3/2021 7:28:51 PM
              [2598] 57% Hubitat Hubitat Battery 3/4/2021 2:40:08 PM
              [2634] 65% Hubitat Hubitat Battery 3/3/2021 8:25:00 PM
              [2618] 66% Hubitat Hubitat Battery 3/3/2021 8:25:08 PM
              [2630] 69% Hubitat Hubitat Battery 3/3/2021 7:28:51 PM
              [2580] 72% Hubitat Hubitat Battery 3/4/2021 2:41:06 PM
              [2576] 73% Hubitat Hubitat Battery 3/4/2021 2:41:02 PM
              [2602] 76% Hubitat Hubitat Battery 3/4/2021 2:40:10 PM
              [2727] 100% Basement Downstairs Bar Battery Laundry Shutoff Water Sensor 4/16/2021 10:22:59 AM
              [2731] 100% JowiHue JowiHue Battery Temperature 27 4/29/2021 7:35:30 AM
              [2657] 100% Basement Fridge Battery Back Sump Sensor Temperature 3/13/2021 5:51:59 PM
              [2671] 100% 1st Floor Kitchen Battery Kitchen Undercabinet Left Switch 3/19/2021 2:03:32 PM
              [2706] 100% JowiHue JowiHue Battery Presence 18 3/24/2021 4:29:09 PM
              [2715] 100% JowiHue JowiHue Battery Coffee Undercabinet Switch 3/29/2021 1:15:49 PM
              [2561] 100% 1st Floor Powder Room Battery Powder Room Water Sensor 3/19/2021 2:47:46 PM
              [2560] 100% 1st Floor Kitchen Kitchen Sensor Battery 3/1/2021 9:08:35 PM
              [2541] 100% Outside Trash Area Presense 2 Battery 2/21/2021 12:22:19 PM
              [2642] 100% Basement Workshop Battery Front Sump Water 4/1/2021 6:57:25 PM
              [2534] 100% Outside Trash Area Hue sensor 1 Battery 4/15/2021 1:36:35 PM
              [2562] 100% Battery Health SDJ-Health Battery Health Root 4/24/2021 5:45:37 AM
              [26 Battery Devices] - Report created 4/29/2021 7:39:10 PM
              Because otherwise it would only pick up these:
              Ref ID Battery % Device Location / Name Last Updated
              [2584] 0% Hubitat Hubitat Battery 1/1/0001 12:00:00 AM
              [2626] 0% Hubitat Hubitat Battery 1/1/0001 12:00:00 AM
              [2610] 0% Hubitat Hubitat Battery 1/1/0001 12:00:00 AM
              [2606] 49% Hubitat Hubitat Battery 3/3/2021 8:25:13 PM
              [2622] 52% Hubitat Hubitat Battery 3/4/2021 11:21:54 AM
              [2638] 52% Hubitat Hubitat Battery 3/3/2021 8:24:54 PM
              [2614] 56% Hubitat Hubitat Battery 3/3/2021 7:28:51 PM
              [2598] 57% Hubitat Hubitat Battery 3/4/2021 2:40:08 PM
              [2634] 65% Hubitat Hubitat Battery 3/3/2021 8:25:00 PM
              [2618] 66% Hubitat Hubitat Battery 3/3/2021 8:25:08 PM
              [2630] 69% Hubitat Hubitat Battery 3/3/2021 7:28:51 PM
              [2580] 72% Hubitat Hubitat Battery 3/4/2021 2:41:06 PM
              [2576] 73% Hubitat Hubitat Battery 3/4/2021 2:41:02 PM
              [2602] 76% Hubitat Hubitat Battery 3/4/2021 2:40:10 PM
              [2562] 100% Battery Health SDJ-Health Battery Health Root 4/24/2021 5:45:37 AM
              [15 Battery Devices] - Report created 4/29/2021 5:26:53 PM

              Comment


                #82
                I know this is an old thread, but I was hoping that someone has a version that works on Linux and HS4.

                thanks, Chris

                Comment


                  #83
                  I cant believe I just found this, awesome script. THANK YOU for sharing.

                  Comment


                    #84
                    Nice script indeed;
                    I needed to scan device names instead of device type:

                    Code:
                    If (UCASE(dv.name(Nothing)).contains("BATT")) Then




                    - Formerly known as 123qweasd (account got corrupted...)
                    HS4, HSTile, ESP based devices and sensors, Tasmota, OpenMQTTGateway, RTL433, DIY ground plane antenna, BlueIris + LAN cams, USB-UIRT, ATON DLA6, WACUP, Multiple Android tablets for control. Plug-Ins Enabled: mcsMQTT, Restart, EnvCan, EasyTrigger, CM15A, BLLAN, BLBackup, Pushover + multiple Jon00 tools​

                    Comment


                      #85
                      mwaite​ :got this working in hs4, picks up 12 of my sensor, missing about 10 more sensor it seems like the newer on are not showing up, running on windows

                      Comment

                      Working...
                      X