Announcement

Collapse
No announcement yet.

HS3 Pushover Plugin

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

  • I can't remember the exact syntax but try nhs.hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", pir_name & " Offline","Circle Problem", "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
    Don

    Comment


    • Originally posted by donstephens View Post
      I can't remember the exact syntax but try nhs.hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", pir_name & " Offline","Circle Problem", "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
      hs.hs.PluginFunction? is this correct?

      Comment


      • no, sorry to be unclear.

        nhs.plugin not hs.plugin.
        Don

        Comment


        • Originally posted by Freddan101 View Post
          I finally got around to test the setting and it works great. Sending glance message with 5 mins between is no problem but I've been careful not to send too many.

          My idea is to send a new glance message when the house is armed or unarmed. If this hasn't happened in 30 min an update with outdoor temperature and other data is sent. Just need to figure out what kind of info I would like to see.

          Is it possible to send html code, like setting the text to green if the house is unarmed?
          Some HTML tags are supported including text colours, see here - https://pushover.net/api#html - so just put the HTML in the message field.

          I am not sure how they follow through to the watch glance messages though, I can't test them.

          Originally posted by ez1976 View Post
          Hey guys.
          i am trying to add a pushover message to an event i am creating via script.
          the idea is when i set a timer from the app, it will add the event and send a push to notify the event has been created.

          i tried using
          hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", pir_name & " Offline","Circle Problem", "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
          but i get this message in the log:

          Running script(2) &hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", pir_name & " Offline","Circle Problem", "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"}), init error: Expected end of statement


          i am running this via immediate script
          when am i missing?
          As said by others try &nhs but be aware that pir_name is a variable and you are trying to send it by immediate script command which will not have that variable declared. This works for me,

          &nhs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", "Offline","Circle Problem", "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
          My Plugins:

          Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
          Yeelight 3P | Nanoleaf 3P

          Comment


          • Originally posted by mrhappy View Post
            Some HTML tags are supported including text colours, see here - https://pushover.net/api#html - so just put the HTML in the message field.
            I sent <font color="#0000ff">$$DSR:847:</font> but sad to say that the whole tag was printed out in the glance message. Maybe I should give Pushover support a try and see if this is a limitation in the Apple Watch or in Pushover.

            Comment


            • Originally posted by Freddan101 View Post
              I sent <font color="#0000ff">$$DSR:847:</font> but sad to say that the whole tag was printed out in the glance message. Maybe I should give Pushover support a try and see if this is a limitation in the Apple Watch or in Pushover.
              Hold fire I think there may be a bug in the plugin as it is no longer working for normal messages either and it should do. I will take a look.
              My Plugins:

              Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
              Yeelight 3P | Nanoleaf 3P

              Comment


              • Originally posted by mrhappy View Post
                Hold fire I think there may be a bug in the plugin as it is no longer working for normal messages either and it should do. I will take a look.
                I'm losing my head here, it works for the normal messages just fine (I was forgetting the leading #). I should've read your post a bit closer, the API for glance messages does not explicitly say that it supports any HTML so as such I didn't include that option - https://pushover.net/api/glances

                I'm more than happy to add functionality if it is supported however the only people that know are pushover, if you want to ask them and see what they say then if they say that they are or they will add support I can make a change to the plugin.
                My Plugins:

                Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
                Yeelight 3P | Nanoleaf 3P

                Comment


                • Originally posted by mrhappy View Post
                  I'm losing my head here, it works for the normal messages just fine (I was forgetting the leading #). I should've read your post a bit closer, the API for glance messages does not explicitly say that it supports any HTML so as such I didn't include that option - https://pushover.net/api/glances

                  I'm more than happy to add functionality if it is supported however the only people that know are pushover, if you want to ask them and see what they say then if they say that they are or they will add support I can make a change to the plugin.
                  I sent them a question today. Let's see what they come back with.

                  Comment


                  • Originally posted by mrhappy View Post
                    Some HTML tags are supported including text colours, see here - https://pushover.net/api#html - so just put the HTML in the message field.

                    I am not sure how they follow through to the watch glance messages though, I can't test them.

                    As said by others try &nhs but be aware that pir_name is a variable and you are trying to send it by immediate script command which will not have that variable declared. This works for me,

                    &nhs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", "Offline","Circle Problem", "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
                    Hi
                    happy to say that this works just fine
                    but i would like send a few details list "offline Since" parm(0) "since" timer_value" and etc
                    can this be done?
                    thanks

                    Comment


                    • Originally posted by ez1976 View Post
                      Hi
                      happy to say that this works just fine
                      but i would like send a few details list "offline Since" parm(0) "since" timer_value" and etc
                      can this be done?
                      thanks
                      Inside a script it can be done (can't be done as an immediate script command) so something like this is how you would do it;

                      Code:
                      Sub Main(ByVal Parms As Object)
                      
                      Dim VariableToSend As String = hs.DeviceLastChangeRef(5678).ToString
                      
                      hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", "Offline","Circle Problem: " & VariableToSend, "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
                      
                      End Sub
                      My Plugins:

                      Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
                      Yeelight 3P | Nanoleaf 3P

                      Comment


                      • Originally posted by mrhappy View Post
                        Inside a script it can be done (can't be done as an immediate script command) so something like this is how you would do it;

                        Code:
                        Sub Main(ByVal Parms As Object)
                        
                        Dim VariableToSend As String = hs.DeviceLastChangeRef(5678).ToString
                        
                        hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", "Offline","Circle Problem: " & VariableToSend, "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
                        
                        End Sub
                        Thanks.
                        But i would like to add both text and variable as the message in the push.just like if i would do it from an event.
                        So it should look like.
                        "The boiler was on for: " boilervariable "and last time it was on was: " another-variable.

                        The idea us to have a push being sent when a timer is set.

                        Comment


                        • Originally posted by ez1976 View Post
                          Thanks.
                          But i would like to add both text and variable as the message in the push.just like if i would do it from an event.
                          So it should look like.
                          "The boiler was on for: " boilervariable "and last time it was on was: " another-variable.

                          The idea us to have a push being sent when a timer is set.
                          I'm sorry but I don't quite catch what you mean, the script I posted could be expanded to any number of variables that you want, if you are using timers in HS I would however use the HS replacement variable - timers return a TimeSpan rather than a string and formatting those is not as straightforward.

                          Code:
                          Sub Main(ByVal Parms As Object)
                          
                          Dim VariableToSend As String = hs.DeviceLastChangeRef(5678).ToString
                          
                          hs.PluginFunction("Pushover 3P", "", "Pushscript", New Object() {"All Clients", "Offline",""The boiler was on for: $$TIMER:timerName: and last time it was on was: " & VariableToSend, "emergency", "Tug Boat", Nothing, Nothing, "A.I Emergency"})
                          
                          End Sub
                          My Plugins:

                          Pushover 3P | DoorBird 3P | Current Cost 3P | Velleman K8055 3P | LAMetric 3P | Garadget 3P | Hive 3P |
                          Yeelight 3P | Nanoleaf 3P

                          Comment


                          • Hi all
                            Just trying this plugin out and on the face of it, its great but I think (being new to HS), I'm not seeing something.

                            I set up a simple event
                            IF This device has been/for at least...
                            Outside Gates has been On for at least 5 minutes
                            Then
                            Message Title "Gates are still open"

                            It kicked in perfectly but sent a constant message every second until I disabled the event altogether.

                            I've seen things about timers etc but can't see this option - am I going blind?
                            I assume I need to add one or set something so it only sends a single message?

                            Thanks in advance

                            Comment


                            • Originally posted by aj84 View Post
                              Hi all
                              I set up a simple event
                              IF This device has been/for at least...
                              Outside Gates has been On for at least 5 minutes
                              Then
                              Message Title "Gates are still open"

                              Thanks in advance
                              Use "EXACTLY" 5 minutes and it won't keep repeating.

                              Comment


                              • eesh - I should have done this with a clear head.
                                thank you that fixed it

                                Comment

                                Working...
                                X