Announcement

Collapse
No announcement yet.

Monthly Low Battery Check

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

    #31
    I'm not sure if this is by design or specific to my installation. I've got it emailing me with the information in the body of the email and NOT as an attachment.

    When the daily email arrives, it includes not only todays details but also the previous day and the day before etc etc. And so I have to scroll to the bottom of the email.

    Is there a way to configure this to be just Todays readings ?

    Regards

    Phill

    Comment


      #32
      Originally posted by Phill View Post
      I'm not sure if this is by design or specific to my installation. I've got it emailing me with the information in the body of the email and NOT as an attachment.

      When the daily email arrives, it includes not only todays details but also the previous day and the day before etc etc. And so I have to scroll to the bottom of the email.

      Is there a way to configure this to be just Todays readings ?

      Regards

      Phill
      Hi Phill,

      I was quite surprised this was happening. I didn't check multiple reports embedded in the email body, and didn't realize the message body variable was being retained in HS memory.

      I have updated the script with the fix. It can be downloaded from the original message (http://board.homeseer.com/showpost.p...75&postcount=6)
      Mike

      Comment


        #33
        Wow, what can I say. Works a treat and such a fast response....

        Brilliant thanks.

        Phill

        Comment


          #34
          Originally posted by rprade View Post
          It is not nearly as tough as all that. The monthly battery check sends me an email with the status of every Z-Wave battery in the house. It is just to help me be preemptive, if the batteries are below a certain level I will change them. It now runs at 8:00 PM on the first Friday of every month so that I can change any that are getting low over the weekend. The body of the email is simply:

          $date- $time

          Door Sensor battery levels

          Mailbox: $$DSR:1406:
          Garage Door: $$DSR:1422:
          Garage side door: $$DSR:1915:
          ~~~

          Leak Detector battery levels

          Boiler Closet: $$DSR:1919:
          Media Room: $$DSR:1924:
          Kitchen: $$DSR:1929:
          ~~~

          Multi-sensor battery levels

          Workshop: $$DSR:114:
          Garage: $$DSR:1236:
          Living Room: $$DSR:240:
          ~~~

          Thermostat battery levels

          US Bathroom: $$DSR:1217:
          Living Room: $$DSR:169:
          Master BR: $$DSR:1583:
          ~~~

          Window Sensor battery levels

          Workshop 1: $$DSR:2189:
          Workshop2: $$DSR:2200:
          Back Porch 1: $$DSR:2210:
          ~~~


          I have separate events that will trigger if a battery reports low at any time. They are in groups of 5-10 devices with multiple triggers Their triggers are:

          IF the device DS BR MS Battery changes and becomes Battery Low Warning

          OR IF the device US BR MS Battery changes and becomes Battery Low Warning

          .....

          THEN Send Pushover message

          The pushover message contains the replacement variables for the devices in the triggers. If for some reason my preemptive battery replacement allows one to go to low before the next monthly email, I will get an immediate notice. So far that hasn't happened.
          How do you run this once a month? Do you use Spud's EasyTrigger plugin?

          Fantastic script mwaite!
          _______________________________________________

          HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
          Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
          Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

          Comment


            #35
            this is all Randy
            Attached Files
            Tom
            baby steps...starting again with HS3
            HS3Pro: Z-NET & 80 Z wave Devices,
            HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
            Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
            In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
            System: XP on Fanless Mini-ITX w/ SSD

            Comment


              #36
              Oh, thanks! Did not even know that that And If day condition was there. Nice!
              _______________________________________________

              HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
              Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
              Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

              Comment


                #37
                I updated my battery report script, download from the original message here: http://board.homeseer.com/showpost.p...75&postcount=6

                This report now generates an HTML table for better viewing in email body. Be sure to remove the .txt extension, and edit the first 4 lines of the script as needed.
                Attached Files
                Mike

                Comment


                  #38
                  Very nice! However, I get an error when I try to run the script. Note that I am running Linux (with mono 3.10.0):

                  Running script <path>/HomeSeer/scripts/BatteryReport.vb :Exception has been thrown by the target of an invocation.No IComparable interface found for type 'scriptcode32.VBWrapper+BatteryDevice'.
                  stefxx

                  Comment


                    #39
                    Originally posted by stefxx View Post
                    Very nice! However, I get an error when I try to run the script. Note that I am running Linux (with mono 3.10.0):

                    Running script <path>/HomeSeer/scripts/BatteryReport.vb :Exception has been thrown by the target of an invocation.No IComparable interface found for type 'scriptcode32.VBWrapper+BatteryDevice'.
                    I'm not really sure what the issue is. As a .NET environment, I'm not sure if it is a Linux problem, rather perhaps a data problem, although I know nothing about Linux.

                    IComparable sorting on arrays is a skill set I have not mastered, rather found online.

                    Try the attached, let me know if it makes any difference. If you still get the error, please comment out line 46, which removes the array sorting, and retest.

                    Line 46 BEFORE: Array.Sort(myArray)
                    Line 46 AFTER: 'Array.Sort(myArray) (notice the single quote)

                    Please send me the report if successful after removing the sorting option.

                    Remove the .txt from the attachment filename. Configure first 4 lines as needed.
                    Attached Files
                    Last edited by mwaite; October 13, 2015, 01:30 PM. Reason: updated script
                    Mike

                    Comment


                      #40
                      Excellent. I had to comment out line 46 before it worked. And you have your email address still in the attached version, so I think I emailed you my battery status

                      Now I only have to make sure all battery devices have the word "Battery" in the device type. But that is the easy part!

                      Thanks again!
                      stefxx

                      Comment


                        #41
                        Originally posted by stefxx View Post
                        Excellent. I had to comment out line 46 before it worked. And you have your email address still in the attached version, so I think I emailed you my battery status

                        Now I only have to make sure all battery devices have the word "Battery" in the device type. But that is the easy part!

                        Thanks again!
                        I realized I left my email address in the script when I received your report - lol. I've since updated it. So the problem still exists, your report will not be sorted. I'll have to play with this some more when I have some time.
                        Mike

                        Comment


                          #42
                          Originally posted by mwaite View Post
                          I realized I left my email address in the script when I received your report - lol. I've since updated it. So the problem still exists, your report will not be sorted. I'll have to play with this some more when I have some time.

                          Thanks, I appreciate it. I am already happy with the report as it is now
                          stefxx

                          Comment


                            #43
                            Was wondering if any one got this working with X10 motion sensors.
                            Hector
                            ____________________________________
                            Win.2003 OS, HS3
                            BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
                            BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
                            MyTrigger,ACRF2,W800,Zwave
                            AP800,Honeywell Stat

                            Comment


                              #44
                              Can't get this to work, but it is probably because I am still newbie and not that familiar with HS3 yet.

                              I get no mail. What I have done is:

                              1. Moved the file to Scripts folder
                              2. Changed the 4 first lines (to/from mail adr is the same)
                              3. Made a manually triggered event to trigger the script.

                              What am I missing?
                              Thanks.

                              EDIT: OK, got this to work. Removed the txt extension... DOH. :-)
                              Work perfect! thanks!!
                              Last edited by jangermann; November 7, 2015, 06:48 AM.

                              Comment


                                #45
                                On Linux?

                                I tried setting this up on Linux, but it gives me an error. . .I haven't tried to figure out the code yet. What is this telling me?

                                ov-06 10:40:11 PM BatteryReport ERROR: Exception in script: No IComparable interface found for type 'scriptcode5.VBWrapper+BatteryDevice'.

                                Comment

                                Working...
                                X