Announcement

Collapse
No announcement yet.

HS3 Pushover Plugin

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

    Yes, the plugin was stopped (but not HS). Will try again. Thx for the feedback

    edit: restarting HS did it, thx

    Comment


      I haven't made any updates to my system, but I recently lost lost the ability to send Pushover messages via VB script. I can still send send messages using Event actions.

      I was using the .52 version plugin (which is the most current version available on the Homeseer web site), but I noticed you uploaded .54 here. So I installed .54 and I'm still getting an error message in the HS log and no message is going out when using a script to do so. Here's is a basic script I wrote just to test the functionality:
      Public Sub Main(ByVal Parms As Object)
      Dim CO(8) As Object

      CO(0) = "All Clients"
      CO(1) = "Script Test"
      CO(2) = "Test"
      CO(3) = Nothing
      CO(4) = Nothing
      CO(5) = Nothing
      CO(6) = Nothing
      CO(7) = Nothing
      CO(8) = Nothing

      hs.PluginFunction("PushOver 3P", "", "Pushscript", CO)

      End Sub

      And here is the error message I get in the HS Log:
      Jan-26 15:35:37 Pushover 3P PushMessage Exception: Object reference not set to an instance of an object.
      Jan-26 15:35:37 Pushover 3P Attachment Does Not Exist - Sending Without
      I've tried deleting the plugin, reinstalling, restarting Homeseer, rebooting my Windows machine...nothing has worked. I opened the plugin using the HS developer console and pasted the results below when I try to send a pushover message via VB script. Any suggestions on how I can start sending pushover messages via script again? It's a very important part of my setup.

      THANKS!


      [1/26/2021 3:40:57 PM] - > PluginFunction Called: Pushscript
      [1/26/2021 3:40:59 PM] - > PushScript Called
      [1/26/2021 3:40:59 PM] - -> Parameters Count: 8
      [1/26/2021 3:40:59 PM] - --> Parameter 0: All Clients
      [1/26/2021 3:40:59 PM] - --> Parameter 1: Script Test
      [1/26/2021 3:40:59 PM] - --> Parameter 2: Test
      [1/26/2021 3:40:59 PM] - --> Parameter 3:
      [1/26/2021 3:40:59 PM] - --> Parameter 4:
      [1/26/2021 3:40:59 PM] - --> Parameter 5:
      [1/26/2021 3:40:59 PM] - --> Parameter 6:
      [1/26/2021 3:40:59 PM] - --> Parameter 7:
      [1/26/2021 3:40:59 PM] - --> Parameter 8:
      [1/26/2021 3:40:59 PM] - -> Correct Paramters
      [1/26/2021 3:40:59 PM] - > PushMessage Called
      [1/26/2021 3:40:59 PM] - > AddToTable : Send Pushover Message Row Count: 14
      [1/26/2021 3:40:59 PM] - -> Input Attachment:
      [1/26/2021 3:40:59 PM] - --> Replace Path Attachment:
      [1/26/2021 3:40:59 PM] - Attachment Does Not Exist - Sending Without
      [1/26/2021 3:40:59 PM] - -> Message Priority normal
      [1/26/2021 3:40:59 PM] - Emergency Priority - Second Check
      [1/26/2021 3:40:59 PM] - -> Send Message Is True - Send The Message
      [1/26/2021 3:40:59 PM] - -> Device Name: All Clients
      [1/26/2021 3:40:59 PM] - --> All Devices
      [1/26/2021 3:40:59 PM] - -> User Key: XXXXXXXXXXXXXX. (redacted)
      [1/26/2021 3:40:59 PM] - -> Priority: 0
      [1/26/2021 3:40:59 PM] - > CustomReplacement Called Input String: Test
      [1/26/2021 3:40:59 PM] - -> ReplacementFunction Return: Test
      [1/26/2021 3:40:59 PM] - > CustomReplacement Called Input String:
      [1/26/2021 3:40:59 PM] - -> ReplacementFunction Return:
      [1/26/2021 3:40:59 PM] - --> URL (Encoded):
      [1/26/2021 3:40:59 PM] - -> URL Title:
      [1/26/2021 3:40:59 PM] - -> Monospace: False
      [1/26/2021 3:40:59 PM] - -> Sound:
      [1/26/2021 3:40:59 PM] - PushMessage Exception: Object reference not set to an instance of an object.
      [1/26/2021 3:41:00 PM] - > tmrFlood Elapsed

      Comment


        I assume the syntax you're using used to work since you said running via script is an important part of your setup. All of my Pushover messages are sent via a script as well, and they are still working. My code is a little different and I don't know VB well enough to know if what you're doing is equivalent or not. I use this:

        Code:
        Dim toClients As String = "All Clients" ' separate with | if multiple; "All Clients" for all
        Dim pushBody As String = Regex.Replace(body, vbCrLf, "") ' Body; let us remove vbCrLf and rely on HTML <br> for push messages; 512 char max; changed to 1024 in .45
        ' Pushover messages have 1024 max length
        If pushBody.Length > 1023 Then
        pushBody = pushBody.Substring(0, 1023)
        End If
        Dim title As String = subject ' Title
        Dim priority As String = priorityParam ' Priority
        Dim sound As String = soundParam ' Sound
        Dim url As String = "" ' URL
        Dim urlTitle As String = "" ' URL Title
        Dim apiString As String = "" ' API String
        Dim attachmentPath As String = "" ' Attachment path
        
        Dim pushResult As Boolean = hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {toClients, pushBody, title, priority, sound, url, urlTitle, apiString, attachmentPath})
        HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
        Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

        Comment


          Thank you mrceolla! I tried testing your code, and after a few tweaks I got it to send a pushover message via a script. So then I had to do a little debugging to ascertain what the difference was between my old script and your script. I ultimately figured it out...for some reason the Sound parameter no longer accepts 'Nothing' as a result. I replaced the word Nothing with double quotes and I was able to send the pushover notification via script. However, I did get an error message that said "Attachment Does Not Exist - Sending Without". So I also changed the last parameter from 'Nothing' to double quotes and the attachment error message went away as well.

          So in its most basic form, here's the script I got to work:

          Public Sub Main(Parms As Object)
          Dim CO(8) As Object

          CO(0) = "All Clients"
          CO(1) = "Script Test"
          CO(2) = "Test"
          CO(3) = Nothing
          CO(4) = ""
          CO(5) = Nothing
          CO(6) = Nothing
          CO(7) = Nothing
          CO(8) = ""

          hs.PluginFunction("PushOver 3P", "", "Pushscript", CO)

          End Sub

          Comment


            I'm not sure if this is the correct place to ask this.

            I've lost the ability to select a sound to be played when I am creating events. I have quite a few notifications set up to send a text message to one or more phones. Many of these I've had set up for a few years, and they haven't changed (I was able to pick different sounds for different notifications). I just created an event, and added a message as an action. The message sound drop down has nothing in it, so I'm unable to select a specific sound. Any thoughts?

            Comment


              I've also recently lost the ability to send pushover message via scripting after I updated to the latest version(0.52) from 0.48. This is my test script that used to work:

              Code:
              Public Sub Main(ByVal Parms As Object)
              Dim CO(8) As Object
              
              CO(0) = "All Clients"
              CO(1) = "This is a test"
              CO(2) = "HOMESEER"
              CO(3) = Nothing
              CO(4) = Nothing
              CO(5) = Nothing
              CO(6) = Nothing
              CO(7) = Nothing
              CO(8) = Nothing
              
              hs.PluginFunction("Pushover 3P", "", "Pushscript", CO)
              
              End Sub
              I tried substituting "" for Nothing without success. I can still send via Pushover Event.

              Rolled back to 0.48 and scripts works. Something either has changed or there is a bug in the plugin.

              EDIT: I’m on HS3

              Comment


                There is a .54 version here : https://forums.homeseer.com/forum/ho...92#post1435192

                Comment


                  A minor thing but with the latest version (0.52), I cannot remove an old phone from the "Devices/group" list.

                  Under settings, it shows

                  Devices/Groups:
                  "Phone #1" - Nothing
                  "Phone #2" - Nothing
                  "Phone #3" - Nothing

                  When I try to remove "Phone #2", I get the following message:
                  Error: Item has already been added. Key in dictionary: 'Phone #2' Key being added: 'Phone #2'

                  "Phone #2" is not in the client list at pushover.net.

                  I am running HS3

                  Comment


                    Anyone is able to get notification infos from cmmand $$DTR:XXX: I got the message on my phone but not with the result.

                    thx

                    Comment


                      mrhappy ,I wanted to let you know that I have confirmed that something important broke with the HS3 Pushover Plugin after version 0.0.0.48. The ability to send a pushover message via a script.

                      This very basic script worked just fine under 0.0.0.48:

                      Code:
                      Public Sub Main(ByVal Parms As Object)
                      Dim PushOverObject(8) As Object PushOverObject(0) = "All Clients" PushOverObject(1) = "This Is A Test! Hello World!" PushOverObject(2) = Nothing PushOverObject(3) = Nothing PushOverObject(4) = Nothing PushOverObject(5) = Nothing PushOverObject(6) = Nothing PushOverObject(7) = Nothing PushOverObject(8) = Nothing hs.WriteLog("PushOver", "Begin - Sending Pushover Message") hs.PluginFunction("Pushover 3P", "", "Pushscript", PushOverObject) hs.WriteLog("PushOver", "End - Sending Pushover Message")
                      End Sub
                      This worked perfectly under 0.0.0.48 but I can confirm that it fails under 0.0.0.52 and 0.0.0.54. I did not see any changes in the documentation in terms of new required parameters in the news versions.

                      Here is the error I see in the HS Log with version 0.0.0.54 for example.
                      Code:
                      Mar-29 2:25:22 PM PushOver Begin - Sending Pushover Message
                      Mar-29 2:25:22 PM Pushover 3P Attachment Does Not Exist - Sending Without
                      Mar-29 2:25:22 PM Pushover 3P PushMessage Exception: Object reference not set to an instance of an object.
                      Mar-29 2:25:22 PM PushOver End - Sending Pushover Message
                      What am I missing? Is this a bug? I have seen other posts complaining about the same problem.

                      ---------------------------------------------------
                      Jean-Marie G. Vaneskahian
                      jean@vaneskahian.com
                      ---------------------------------------------------

                      Comment


                        Originally posted by jeanv View Post
                        [What am I missing? Is this a bug? I have seen other posts complaining about the same problem.
                        I’m having the same problem and is still running .48 for that reason...

                        Comment


                          Originally posted by ZoRaC View Post

                          I’m having the same problem and is still running .48 for that reason...
                          I am surprised mrhappy has not seen and addressed this yet since it is a fundamental problem with being able to use the updated versions of the plugin.
                          ---------------------------------------------------
                          Jean-Marie G. Vaneskahian
                          jean@vaneskahian.com
                          ---------------------------------------------------

                          Comment


                            Try changing your script as follows
                            Code:
                            Sub Main(p As String)
                                Dim PushOverObject(8) As Object
                                PushOverObject(0) = "All Clients"
                                PushOverObject(1) = "This Is A Test! Hello World!"
                            
                                PushOverObject(2) = ""
                                PushOverObject(3) = "normal"
                                PushOverObject(4) = "pushover"
                                PushOverObject(5) = Nothing
                                PushOverObject(6) = Nothing
                                PushOverObject(7) = Nothing
                                PushOverObject(8) = Nothing
                            
                                hs.WriteLog("PushOver", "Begin - Sending Pushover Message")
                                hs.PluginFunction("Pushover 3P", "", "Pushscript", PushOverObject)
                                hs.WriteLog("PushOver", "End - Sending Pushover Message")
                            End Sub
                            I'm running .54

                            Comment


                              Originally posted by jeanv View Post

                              I am surprised mrhappy has not seen and addressed this yet since it is a fundamental problem with being able to use the updated versions of the plugin.
                              I checked, I’m running .38, not .48. Haven’t updated for a year or so...

                              EDIT:
                              It’s been 2 years since I had issues...
                              https://forums.homeseer.com/forum/ho...36#post1126836

                              Comment


                                zwolfpack, that worked. It is different from the documentation that states:

                                Code:
                                Index(0) Device Name (Required - “All Clients” to send to all devices, separate multiple clients with the ASCII character 124 - | - String)
                                Index(1) Message Body (Required - String)
                                Index(2) Message Title (Optional - String)
                                Index(3) Message Priority (Optional - normal/low/emergency/high - String)
                                Index(4) Message Sound (Optional - 'pushover' etc, from the sound list - String)
                                Index(5) Message URL (Optional - String)
                                Index(6) Message URL Title (Optional - String)
                                Index(7) API String (Optional - Same as in the configuration page - String)
                                Index(8) Attachment Path (Optional - full file path to the attachment - String)
                                Thanks for the information!
                                ---------------------------------------------------
                                Jean-Marie G. Vaneskahian
                                jean@vaneskahian.com
                                ---------------------------------------------------

                                Comment

                                Working...
                                X