Announcement

Collapse
No announcement yet.

HS3 Pushover Plugin

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

    Originally posted by ZoRaC View Post
    Great!
    Please include it in the PluginFunction as well - I use that a lot!
    HTML Code:
    hs.PluginFunction("Pushover 3P", "", "Pushscript", pushArr)
    Originally posted by rprade View Post
    It's a little slow through the email gateway - several minutes, but it works great. If we could do it with the API it would be seconds.

    Here is from my phone

    [ATTACH]66142[/ATTACH]

    And it even pops up on my watch

    [ATTACH]66143[/ATTACH]
    Could someone please do me the honours of trying version .37 here (http://s652164905.websitehome.co.uk/...r_0_0_0_37.zip - just replace the exe file), I have added the option to specify a path to a file. Now this is not a file selector because this box supports replacement variables (if you had a changing filename or something) so you need to copy a full path to a file. UNC paths appear to work fine however a URL will not (this is a security measure), I also have not tested it on Linux.

    Whilst the attachments support up to 2.5MB I really do not suggest using anything towards this, sending this size file will cause the plugin to be quite busy encoding and uploading it (takes a minute to upload on my connection for a 2MB file) and I don't see a real need for a file this big. I would suggest keeping it in the hundreds of KB if you can.

    The plugin does every effort to send the file quickly but because the file has to be decoded and sent along a HTTP connection it will not be seconds unless the file size is small. The Pushover API is not specific but I have tested bmp/gif/jpg and png files and they appear to work OK, please note that I had to get a bit down and dirty with the HTTP call with this because .net support for multi part messages did not come in until .net 4.5 and as such I had to make my own.

    An additional property is now available in the Pushscript routine (please check your scripts) with this version, that is an additional string parameter for the file path in exactly the same format as the events page.

    If it works I will press the button on the updater and let everyone download it..

    Thanks.

    Comment


      Originally posted by mrhappy View Post
      Could someone please do me the honours of trying version .37 here (http://s652164905.websitehome.co.uk/...r_0_0_0_37.zip - just replace the exe file), I have added the option to specify a path to a file. Now this is not a file selector because this box supports replacement variables (if you had a changing filename or something) so you need to copy a full path to a file. UNC paths appear to work fine however a URL will not (this is a security measure), I also have not tested it on Linux.

      Whilst the attachments support up to 2.5MB I really do not suggest using anything towards this, sending this size file will cause the plugin to be quite busy encoding and uploading it (takes a minute to upload on my connection for a 2MB file) and I don't see a real need for a file this big. I would suggest keeping it in the hundreds of KB if you can.

      The plugin does every effort to send the file quickly but because the file has to be decoded and sent along a HTTP connection it will not be seconds unless the file size is small. The Pushover API is not specific but I have tested bmp/gif/jpg and png files and they appear to work OK, please note that I had to get a bit down and dirty with the HTTP call with this because .net support for multi part messages did not come in until .net 4.5 and as such I had to make my own.

      An additional property is now available in the Pushscript routine (please check your scripts) with this version, that is an additional string parameter for the file path in exactly the same format as the events page.

      If it works I will press the button on the updater and let everyone download it..

      Thanks.
      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

      Comment


        So far so good. I tried multiple paths from the root down and they all worked. I picked a small image of about 90K and it arrived on my phone after about a minute. It looks like HomeSeer got the file to Pushover.net quickly so the delay is likely at Pushover's end. A minute is acceptable for my usage.

        Jan-28 1:06:05 PM Pushover 3P Pushover Notification Sent - Message Title Message Title
        Jan-28 1:06:04 PM Pushover 3P Finished Uploading File Attachment: C:\Capture.png
        Jan-28 1:06:04 PM Pushover 3P Sending Pushover Message Attachment - C:\Capture.png
        Jan-28 1:06:04 PM Event Event Trigger "HomeSeer Demo Pushover image"
        Jan-28 1:06:04 PM Event Event HomeSeer Demo Pushover image triggered by the event page 'Run' button.


        I will do some more testing with larger images to see what effect they have on speed and if there is a limit.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          Originally posted by rprade View Post
          So far so good. I tried multiple paths from the root down and they all worked. I picked a small image of about 90K and it arrived on my phone after about a minute. It looks like HomeSeer got the file to Pushover.net quickly so the delay is likely at Pushover's end. A minute is acceptable for my usage.

          Jan-28 1:06:05 PM Pushover 3P Pushover Notification Sent - Message Title Message Title
          Jan-28 1:06:04 PM Pushover 3P Finished Uploading File Attachment: C:\Capture.png
          Jan-28 1:06:04 PM Pushover 3P Sending Pushover Message Attachment - C:\Capture.png
          Jan-28 1:06:04 PM Event Event Trigger "HomeSeer Demo Pushover image"
          Jan-28 1:06:04 PM Event Event HomeSeer Demo Pushover image triggered by the event page 'Run' button.


          I will do some more testing with larger images to see what effect they have on speed and if there is a limit.
          Excellent thanks for testing, I'll include it in the updater in that case and if anyone has any issues then let me know. The plugin should fault if you try and send anything larger than 2.5MB so it shouldn't let you be able to hang the plugin but it certainly could be a little unresponsive if you send huge files and there may be delays in other messages getting through.

          Comment


            working here with a delay as you mention but more than acceptable many thanks my native android doorbird app is now almost redundant! horrible thing! the snapshot from 3P Doorbird is approx 35kb and takes about 15 seconds to hit my mobile

            Comment


              Originally posted by mrhappy View Post
              Excellent thanks for testing, I'll include it in the updater in that case and if anyone has any issues then let me know. The plugin should fault if you try and send anything larger than 2.5MB so it shouldn't let you be able to hang the plugin but it certainly could be a little unresponsive if you send huge files and there may be delays in other messages getting through.
              Thanks. It failed on a 3mb file. I tried a 2.3mb file and it was the same speed as the 90k file. It arrived in 58 seconds by my stopwatch and HS processed it in 10 seconds.

              Jan-28 2:28:05 PM Pushover 3P Pushover Notification Sent - Message Title Message Title
              Jan-28 2:27:55 PM Pushover 3P Finished Uploading File Attachment: C:\Capture1.png
              Jan-28 2:27:55 PM Pushover 3P Sending Pushover Message Attachment - C:\Capture1.png
              Jan-28 2:27:55 PM Event Event Trigger "HomeSeer Demo Pushover image"
              Jan-28 2:27:55 PM Event Event HomeSeer Demo Pushover image triggered by the event page 'Run' button.
              HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

              Comment


                Originally posted by rprade View Post
                Thanks. It failed on a 3mb file. I tried a 2.3mb file and it was the same speed as the 90k file. It arrived in 58 seconds by my stopwatch and HS processed it in a second. The log seems to indicate 70 seconds, but that might be a little latency in Pushover notifying the plug-in it was sent:

                Jan-28 2:28:05 PM Pushover 3P Pushover Notification Sent - Message Title Message Title
                Jan-28 2:27:55 PM Pushover 3P Finished Uploading File Attachment: C:\Capture1.png
                Jan-28 2:27:55 PM Pushover 3P Sending Pushover Message Attachment - C:\Capture1.png
                Jan-28 2:27:55 PM Event Event Trigger "HomeSeer Demo Pushover image"
                Jan-28 2:27:55 PM Event Event HomeSeer Demo Pushover image triggered by the event page 'Run' button.
                Interesting you are seeing the same delay, I didn't do a lot of testing with different file sizes but I will take a look see whether or not there is any optimisation to be taken advantage of and if there is I will do a bit of testing. Thanks for testing.

                Comment


                  Originally posted by mrhappy View Post
                  Interesting you are seeing the same delay, I didn't do a lot of testing with different file sizes but I will take a look see whether or not there is any optimisation to be taken advantage of and if there is I will do a bit of testing. Thanks for testing.
                  You replied before I got a chance to edit the post. It took a second for the small file to process and send and 10 seconds for the 2.3mb file.
                  HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    Originally posted by rprade View Post
                    Thanks. It failed on a 3mb file. I tried a 2.3mb file and it was the same speed as the 90k file. It arrived in 58 seconds by my stopwatch and HS processed it in 10 seconds.

                    Jan-28 2:28:05 PM Pushover 3PPushover Notification Sent - Message Title Message Title
                    Jan-28 2:27:55 PM Pushover 3PFinished Uploading File Attachment: C:\Capture1.png
                    Jan-28 2:27:55 PM Pushover 3PSending Pushover Message Attachment - C:\Capture1.png
                    Jan-28 2:27:55 PM EventEvent Trigger "HomeSeer Demo Pushover image"
                    Jan-28 2:27:55 PM EventEvent HomeSeer Demo Pushover image triggered by the event page 'Run' button.
                    What is your delay if you are only sending text, not images?

                    A minute delay is fine if you only want notifications but too long for when you want to respond immediately... Like answering the front door, security/surveillance, etc

                    Sent from my SM-G950U using Tapatalk

                    Comment


                      Originally posted by Ltek View Post
                      What is your delay if you are only sending text, not images?

                      A minute delay is fine if you only want notifications but too long for when you want to respond immediately... Like answering the front door, security/surveillance, etc

                      Sent from my SM-G950U using Tapatalk
                      About 2-4 seconds without an image attachment.
                      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                      Comment


                        When I try to send an 189K image I get the following error.

                        Code:
                        Jan-29 18:49:40	 	Pushover 3P	Error POST URL The 'meta' start tag on line 6 position 4 does not match the end tag of 'head'. Line 9, position 3.
                        Jan-29 18:49:40	 	Pushover 3P	Web Exception Response
                        Pushover
                        Uh oh
                        
                        An error occured on our server while processing your request. Please try again later.
                        
                        Pushover is a trademark and product of Superblock, LLC. Copyright © Superblock, LLC. All rights reserved.
                        Jan-29 18:49:40	 	Pushover 3P	WebException Error The remote server returned an error: (502) Bad Gateway.
                        Jan-29 18:49:39	 	Pushover 3P	Finished Uploading File Attachment: /etc/HomeSeer/html/images/camera/1.jpg
                        Jan-29 18:49:39	 	Pushover 3P	Sending Pushover Message Attachment - /etc/HomeSeer/html/images/camera/1.jpg
                        I'm running HS3 on a Debian Jessie with Mono version 4.6.2

                        any ideas?

                        Comment


                          Originally posted by alan_smithee View Post
                          When I try to send an 189K image I get the following error.

                          Code:
                          Jan-29 18:49:40	 	Pushover 3P	Error POST URL The 'meta' start tag on line 6 position 4 does not match the end tag of 'head'. Line 9, position 3.
                          Jan-29 18:49:40	 	Pushover 3P	Web Exception Response
                          Pushover
                          Uh oh
                          
                          An error occured on our server while processing your request. Please try again later.
                          
                          Pushover is a trademark and product of Superblock, LLC. Copyright © Superblock, LLC. All rights reserved.
                          Jan-29 18:49:40	 	Pushover 3P	WebException Error The remote server returned an error: (502) Bad Gateway.
                          Jan-29 18:49:39	 	Pushover 3P	Finished Uploading File Attachment: /etc/HomeSeer/html/images/camera/1.jpg
                          Jan-29 18:49:39	 	Pushover 3P	Sending Pushover Message Attachment - /etc/HomeSeer/html/images/camera/1.jpg
                          I'm running HS3 on a Debian Jessie with Mono version 4.6.2

                          any ideas?
                          I kind of hoped it would be fine with Linux as it is fairly standard but I guess I have been proved wrong. I will do my level best to fix this but it might take a bit of time because I'm going to have to get a VM back installed.

                          It's finding the file and looks to be making half a go of it which is good at least, the fact it's not a 400 series error should help a bit so it could be a difference in encoding between the two platforms. For now I'm afraid you will have to make do with just sending messages the old way, when no text is sent in the attachment field the message gets sent by the old method.

                          Comment


                            mrhappy,

                            I upgraded your plugin today and did not really check on the update information. But now no more messages seem to be sent, all messages give the following error:

                            Code:
                            jan-29 23:00:06	 	Pushover 3P	Pushover Notification Sent - Message Title
                            jan-29 23:00:06	 	Pushover 3P	Attachment does not exist - check path/file status and try again - will send plain message
                            Why is it now demanding for an attachment and also, why is the "plain message" not sent? Do I really need to change all events now?

                            Wim
                            -- Wim

                            Plugins: JowiHue, RFXCOM, Sonos4, Jon00's Perfmon and Network monitor, EasyTrigger, Pushover 3P, rnbWeather, BLBackup, AK SmartDevice, Pushover, PHLocation, Zwave, GCalseer, SDJ-Health, Device History, BLGData

                            1210 devices/features ---- 392 events ----- 40 scripts

                            Comment


                              I'm still getting plain text working as normal here

                              Comment


                                Originally posted by w.vuyk View Post
                                mrhappy,

                                I upgraded your plugin today and did not really check on the update information. But now no more messages seem to be sent, all messages give the following error:

                                Code:
                                jan-29 23:00:06	 	Pushover 3P	Pushover Notification Sent - Message Title
                                jan-29 23:00:06	 	Pushover 3P	Attachment does not exist - check path/file status and try again - will send plain message
                                Why is it now demanding for an attachment and also, why is the "plain message" not sent? Do I really need to change all events now?

                                Wim

                                Comment

                                Working...
                                X