Announcement

Collapse
No announcement yet.

Daily email including all errors in the log over the past 24 hrs

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

    #16
    zwolfpack
    ​​​​​​​I already tried changing .Count to .Length and the result makes the script hang. Killing the process is the only way out of it.

    I read on some other forms to substitute to the vbc script but for some that created problems with plugins. How would I revert back to the backup?

    Would it be?
    Code:
    sudo install -p /usr/bin/vbnc-dist /usr/bin/vbnc
    Also, turns out I don't have vbc.
    error:
    install: cannot stat ‘/usr/bin/vbc’: No such file or directory
    I just looked at the bin directory to confirm.

    Comment


      #17
      Yes, that would be the proper way to restore the original.

      No vbc, that's odd ... its part of the mono-roslyn package which is a dependency of both mono-devel and mono-complete.

      What do you get from this?
      Code:
      dpkg -V mono-roslyn
      Also what version of mono?
      Code:
      mono -V

      Comment


        #18
        Originally posted by zwolfpack View Post
        Yes, that would be the proper way to restore the original.

        No vbc, that's odd ... its part of the mono-roslyn package which is a dependency of both mono-devel and mono-complete.

        What do you get from this?
        Code:
        dpkg -V mono-roslyn
        Wierd indeed!!
        I get no response from both commands below. How would I go about installing vbc with a roleback plan.
        Code:
        find / -type f -name "vbc.exe"
        Code:
        dpkg -V mono-roslyn
        Thanks a bunch for your help!!

        Comment


          #19
          Originally posted by zwolfpack View Post
          Also what version of mono?
          Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1)

          Comment


            #20
            Originally posted by Igorski88 View Post

            Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1)
            That's an issue ... current mono version is 6.12.

            Comment


              #21
              Thanks for this useful script, just installed.
              Works fine on HS3/Win10

              I know you mentioned above that it has to be commented out for most people but would you mind providing details on this part of the script and it's original purpose?

              ' Send message via script
              ' Dim subject As String = "HS Log Alerts - Reminder"
              ' Dim sendTo As String = "$$DSR:359:"
              ' hs.RunScriptFunc("SendEmail.vb", "Main", sendTo & "|" & subject & "|" & errList, True, False)

              Cheers,

              Comment


                #22
                Originally posted by 123qweasd View Post
                Thanks for this useful script, just installed.
                Works fine on HS3/Win10

                I know you mentioned above that it has to be commented out for most people but would you mind providing details on this part of the script and it's original purpose?

                ' Send message via script
                ' Dim subject As String = "HS Log Alerts - Reminder"
                ' Dim sendTo As String = "$$DSR:359:"
                ' hs.RunScriptFunc("SendEmail.vb", "Main", sendTo & "|" & subject & "|" & errList, True, False)
                Yeah, sorry about that. I should've just left that out to avoid confusion. I store all of my email addresses and other recipient information in virtual devices so if something changes I only need to change it in one place. And I send all of my messaging (email, text, Pushover) through a custom script, bypassing HS's built in email abilities, for a number of reasons, some of which don't apply anymore, and other's that are likely unique to me. For example, I used to run my own email server, but it had no failover if something crashed or I was simply rebooting it, so messages sent during that time would never be received since HS apparently has no retry mechanism. My script would make sure my email server was online and the message was successfully sent, if not, it would send through a different email account on a different server. Another example, Pushover allows you to specify a sound when sending a message. With my script I can check the message subject line and/or body for certain words and automatically specify a specific sound for that message. Similarly, based on body or subject content, I can decide which method I want to use to send the message (email, text, Pushover). This has saved me from having to create a lot of Pushover events.

                Glad to hear it's working for you!
                HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
                Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

                Comment


                  #23
                  Thanks for the feedback.
                  ​​​​​

                  Comment


                    #24
                    any chance of updating your script to work with hs4 ?
                    current errors

                    Compiling script EmailErrLogEntries.vb: Local variable 'subject' is already declared in the current block.


                    9/30/2020 9:41:13 AM

                    HomeSeer
                    Error
                    Compiling script EmailErrLogEntries.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.


                    Comment


                      #25
                      Did your alter the script? The error sounds like you have "Dim subject" in there twice. Note the lines with a single quote in front are comments and not executed.
                      HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
                      Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

                      Comment


                        #26
                        you were correct
                        i commented out the lines needed
                        then un comment the lines above for my email

                        all is working
                        thank you very much for sharing this script, great way to monitor homeseer

                        Paul.

                        Comment


                          #27
                          mrceolla
                          i have a question for you
                          i use this command a lot to write to the log &nhs.WriteLog ("Daily News", ("Motion Has Been Detected In Backyard"))
                          Daily News
                          is it possible to run the script manually and have it just email me my (Daily News)
                          and then a copy of the script to email me with any problems.

                          Paul.

                          Comment


                            #28
                            Yes. The easiest way to accomplish what I think you're asking is to make a copy of the script, and edit it as you wish for your Daily News purposes. The script searches through the entire log line for a match, so it'll pick up your LogType of "Daily News". Does that answer your question?
                            HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
                            Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

                            Comment


                              #29
                              i got it to work this morning by doing the following
                              Dim WordsArr(0) As String
                              WordsArr(0) = "Daily News"
                              this is awsome Thank you for sharing the script.

                              Comment


                                #30
                                Originally posted by sirbooker View Post
                                i got it to work this morning by doing the following


                                this is awsome Thank you for sharing the script.
                                Glad you got it working how you wanted. And my pleasure!
                                HS4, Insteon, Z-wave, USB-UIRT, Harmony Hubs, Google Hub/Chromecasts/Speakers, Foscam & Amcrest cameras, EZVIZ DB1 doorbell
                                Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Harmony Hub, Insteon, Jon00 Homeseer/Echo Skill Helper, Harmony Hub, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

                                Comment

                                Working...
                                X