Announcement

Collapse
No announcement yet.

HS3 Pushover Plugin

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

    #31
    Originally posted by GaryDN View Post
    thanks for helping to IDing the issue.
    I think the sending of emergency notifications to groups has now been added, I've not tried it (no group to send it to) but according to https://twitter.com/superblock/statu...76061432918016 it should work.

    Comment


      #32
      This is a fantastic plugin mrhappy - thanks very much!

      I notice that emergency messages provide a receipt/callback of sorts. IS that something the plugin handles? That could be used as an event trigger? For instance, I send a Pushover emergency message that the alarm has gone off and if it's not acknowledged within a certain period, HS3 will send an e-mail, SMS, etc?
      Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

      Comment


        #33
        I was only looking at this this morning to see if I can implement it. The problem I have is that I can possibly add a trigger for it but it will be non specific as to which message it has come from which means I don't know whether it has any value. The issue being it would in theory be possible to send two emergency notifications and not know which trigger came from which message. Do you think this would be a problem or are you ok with this?

        Comment


          #34
          HS3 Pushover Plugin

          I see your concern and you're right. While it may suit most situations but you need to handle all use cases and not being able to map event to receipt would be of little use.
          Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

          Comment


            #35
            Hello,

            I have been using this plugin and have found it to work perfectly. Anyway I have now integrated a number of things with tasker (e.g. triggering events when I dial specific numbers) and I would like to push out a message if a do dial a specific number).

            I have the event stuff working fine, however part of what I need to do involves me getting information from a database to 'push' to the client.

            I am hoping you might have some documentation on the script call and what each variable means, I understand the title, URL and so on, but I am not really sure what the variable numbers are for priority, so for example:

            Public Sub PushMessage(ByVal Message As String, Optional ByVal Title As String = Nothing, Optional ByVal Priority As Integer = 0, Optional ByVal Sound As Integer = -1, Optional ByVal sURL As String = Nothing, Optional ByVal sURLTitle As String = Nothing, Optional ByVal sTimeStamp As String = Nothing, Optional ByVal DeviceName As String = Nothing)

            I understand the Message, Title, sURL, sURLTitle,DeviceName and so on but I am not sure about the Sound as Integer, Priority as Integer and what they translate to.

            I should note I am running HS3 as well
            HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

            Facebook | Twitter | Flickr | Google+ | Website | YouTube

            Comment


              #36
              Looking at the tread, I actually think the trigger on a message not being acknowledged is a good idea, I am not entirely sure you really need to know what the message is as that could be handled in events / scripts on the users side.

              For example if the alarm goes off, then you probably won't trigger 5 emergency messages just the one, you could have a device value which becomes ON when the alarm is triggered and a notification is sent, then another device which also becomes ON when the notification is sent but when the message is acknowledged it gets turned off, then if the latter device is left ON for greater than x minutes you could run a script to see what triggered the sending of the message, and resend the information or do some other task.

              I know it is not perfect, but I do thing the idea of an unacknowledged message trigger is a good idea .

              Thanks for the great plugin by the way, this has been great for my system!
              HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

              Facebook | Twitter | Flickr | Google+ | Website | YouTube

              Comment


                #37
                Originally posted by travisdh View Post
                Hello,

                I have been using this plugin and have found it to work perfectly. Anyway I have now integrated a number of things with tasker (e.g. triggering events when I dial specific numbers) and I would like to push out a message if a do dial a specific number).

                I have the event stuff working fine, however part of what I need to do involves me getting information from a database to 'push' to the client.

                I am hoping you might have some documentation on the script call and what each variable means, I understand the title, URL and so on, but I am not really sure what the variable numbers are for priority, so for example:

                Public Sub PushMessage(ByVal Message As String, Optional ByVal Title As String = Nothing, Optional ByVal Priority As Integer = 0, Optional ByVal Sound As Integer = -1, Optional ByVal sURL As String = Nothing, Optional ByVal sURLTitle As String = Nothing, Optional ByVal sTimeStamp As String = Nothing, Optional ByVal DeviceName As String = Nothing)

                I understand the Message, Title, sURL, sURLTitle,DeviceName and so on but I am not sure about the Sound as Integer, Priority as Integer and what they translate to.

                I should note I am running HS3 as well
                I've checked the HS3 version and I must have changed the call, this is the call to send a message. I'll check the documentation but what you have posted looks to be from the HS2 one.

                Public Function PushMessage(ByVal DeviceName As String, ByVal Message As String, Optional ByVal Title As String = Nothing, Optional ByVal Priority As String = Nothing, Optional ByVal Sound As String = Nothing, Optional ByVal sURL As String = Nothing, Optional ByVal sURLTitle As String = Nothing, Optional ByVal sTimeStamp As String = Nothing) As Boolean

                so it is now a string, you need to send the string contained in the Pushover sounds list here https://pushover.net/api#sounds - sending nothing will leave it to the default tone.

                The priority has also now changed to a string parameter, there are only four priorities. They are "low", "normal", "high" and "emergency".

                I must have moved away from using integers for some reason but can't remember why at the minute, I think it was something to do with the event actions.

                Comment


                  #38
                  Originally posted by travisdh View Post
                  Looking at the tread, I actually think the trigger on a message not being acknowledged is a good idea, I am not entirely sure you really need to know what the message is as that could be handled in events / scripts on the users side.

                  For example if the alarm goes off, then you probably won't trigger 5 emergency messages just the one, you could have a device value which becomes ON when the alarm is triggered and a notification is sent, then another device which also becomes ON when the notification is sent but when the message is acknowledged it gets turned off, then if the latter device is left ON for greater than x minutes you could run a script to see what triggered the sending of the message, and resend the information or do some other task.

                  I know it is not perfect, but I do thing the idea of an unacknowledged message trigger is a good idea .

                  Thanks for the great plugin by the way, this has been great for my system!
                  I'll see about adding a trigger as it is something I have looked at a couple of times but could not ever work out the HS3 SDK for triggers but this should in theory be a simpler one. The other concern is the callback address back into the HS server. I can't see that I can get through the HS server authorisation with a callback but I might be able to instead get the acknowledgment from doing a repeated get of the URL so there might be a 10 second delay on it or so. Would you be willing to test a version if I tried it, I think I still have your email...

                  Comment


                    #39
                    I would be happy to test, I am not sure if you were aware but I have been speaking to the developers and they have added tasker support to pushover messages. This is fantastic as it opens up all sorts of automation opportunities, I am working on my fire stuff with this, and I already have tasker set up so that if i get a fire call it reads me the message through pushover, and then gets my phone ready to dial the responding number.

                    I have another task on tasker that looks to see if I have dialed the number, then contacts the HS server (through PHLocation's custom HTTP post feature) and triggers another event.

                    The next event I trigger I just really do so as I want to 'push' an address to the phone, I do a database lookup to get the information but I am abit stuck on how to get it to send a pushover message by scripting.

                    I tried variations of the following and get errors saying it does not accept this number of arguments:

                    hs.PluginFunction("Pushover 3P","","PushMessage",{"Travis Phone", dr(0).ToString, "FireMap", "", "", "", dr(3).Tostring & "," & dr(4).ToString, ""})

                    Could you point me in the right direction with doing a pushover message this way.

                    I tried with and without the "" between Pushover 3P and the PushMessage

                    I would be happy to test with any future Pushover plugin versions as well.

                    Thanks!!
                    HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

                    Facebook | Twitter | Flickr | Google+ | Website | YouTube

                    Comment


                      #40
                      Originally posted by travisdh View Post
                      I would be happy to test, I am not sure if you were aware but I have been speaking to the developers and they have added tasker support to pushover messages. This is fantastic as it opens up all sorts of automation opportunities, I am working on my fire stuff with this, and I already have tasker set up so that if i get a fire call it reads me the message through pushover, and then gets my phone ready to dial the responding number.

                      I have another task on tasker that looks to see if I have dialed the number, then contacts the HS server (through PHLocation's custom HTTP post feature) and triggers another event.

                      The next event I trigger I just really do so as I want to 'push' an address to the phone, I do a database lookup to get the information but I am abit stuck on how to get it to send a pushover message by scripting.

                      I tried variations of the following and get errors saying it does not accept this number of arguments:

                      hs.PluginFunction("Pushover 3P","","PushMessage",{"Travis Phone", dr(0).ToString, "FireMap", "", "", "", dr(3).Tostring & "," & dr(4).ToString, ""})

                      Could you point me in the right direction with doing a pushover message this way.

                      I tried with and without the "" between Pushover 3P and the PushMessage

                      I would be happy to test with any future Pushover plugin versions as well.

                      Thanks!!
                      Sorry I forgot the function to be called from PluginFunction is different (PushScript) and is explained in the documentation, even if some are optional it should have 'Nothing' sent to it.

                      Scripting
                      The scripting calls have changed in HS3. To send a message from a script please pass an object array
                      in the following order to the plugin function 'PushScript'. All array elements should be sent even if they
                      are optional, if they are optional please send 'Nothing'. This function will return a boolean value of
                      true/false depending on whether or not the message was successful:
                      Index(0) = Device Name (Required All Clients to send to all devices)
                      Index(1) = Message Body (Required)
                      Index(2) = Message Title (Optional)
                      Index(3) = Message Priority (Optional normal/low/emergency/high)
                      Index(4) = Message Sound (Optional 'pushover' etc, from the sound list)
                      Index(5) = Message URL (Optional)
                      Index(6) = Message URL Title (Optional)
                      Try it and see how you get on.

                      I did spot on twitter that Tasker was now supported and thought it was just a happy coincidence I have found the developers to be quite good at explaining and adding features.

                      I'll work on a version with acknowledgements today, my preference at the minute is to use the http get rather than a callback to find out if a message has been acknowledged but I will see how I get on.

                      Comment


                        #41
                        I've sent you a version Travis to your gmail account which has some triggers for acknowledgments of emergency messages.

                        Comment


                          #42
                          New version (0.0.0.6) added to first post with support for two triggers, when an emergency message is acknowledged and when an emergency message expires.

                          Comment


                            #43
                            Has anyone used a scripting call with this plugin, I am sure it is just me but when I try with the amended information to send a test message I just get errors about invalid char.

                            PHP Code:
                            &hs.PluginFunction("Pushover 3P","PushScript",{"Travis Phone","Test","Test","Normal","pushover","Nothing","Nothing"}) 
                            Hoping others might be able to post a sample of one of their script calls so I can see where I am going wrong.

                            Thanks
                            HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

                            Facebook | Twitter | Flickr | Google+ | Website | YouTube

                            Comment


                              #44
                              Originally posted by travisdh View Post
                              Has anyone used a scripting call with this plugin, I am sure it is just me but when I try with the amended information to send a test message I just get errors about invalid char.

                              PHP Code:
                              &hs.PluginFunction("Pushover 3P","PushScript",{"Travis Phone","Test","Test","Normal","pushover","Nothing","Nothing"}) 
                              Hoping others might be able to post a sample of one of their script calls so I can see where I am going wrong.

                              Thanks
                              I am just going to work but will sort you out some examples after I finish and post them here.

                              Comment


                                #45
                                No Probs, Thanks for looking into it.
                                HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

                                Facebook | Twitter | Flickr | Google+ | Website | YouTube

                                Comment

                                Working...
                                X