Announcement

Collapse
No announcement yet.

Pushover (3P) Plugin

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

  • Pushover (3P) Plugin

    **** THIS IS FOR HS2 - HS3 VERSION IS HERE http://forums.homeseer.com/showthread.php?t=163974 ****

    Not sure if anyone can make use of this with HS3 on the horizon but figured I would post it in any case.

    This is a plugin for Pushover (https://pushover.net/) which is a push message application for both Android and iOS. What this plugin enables you to do is send those push messages straight from HomeSeer, the advantage being there is very little delay (unlike email) and the messages can have additional information SMS messages can't (like URL's/priorities). Although I have never used it I think it is similar to Growl. You could for example send a notification on it detecting motion and then link to a CCTV snapshot, or as it does support open URL's then you could send from an event to ring a certain phone number.

    This is a simple plugin with only one action and no triggers/conditions/devices. It is aimed to be a little more user friendly than a script would be.

    Instructions:
    1. Sign up for Pushover
    2. Once signed up you need to create an application, relatively simple to do and you just on their website look for 'Your Applications' and then 'Create A New Application'. Once in here you give your application a name and can also describe what it is and give it an icon. After you have created this application you will get an API key - save this number.
    3. Go into the main dashboard at Pushover and in the top right should be a user key, also save this number.
    4. Place the attached DLL into your main HomeSeer directory and restart HS.
    5. The plugin should load and give a warning about the lack of an API key (it might also give a bad request error, ignore these at present)
    6. Go into Setup > Interfaces > Pushover (3P) > Config and then you will get a configuration page. Please enter the API & User key in this page from before.
    7. Try and send a message by creating a blank event and selecting 'Pushover Send Message' from the drop down list.The plugin does support replacement variables.

    If successful then the HS log should say Pushover Notification Sent. If not then a 'bad request' error indicates some formatting issues. If this happens please double check the API/User keys and if you still have a problem please post here.

    I hope the attached screenshots help illustrate what can be done (not sure why the icon is not displaying on the iPhone, seems to work fine on Android).

    Any issues/bugs that are found please post to this thread and I will try and sort them out. Hope it may be of use to someone, thanks.

    Edit: Forgot to mention the scripting command, messages can be sent from a script with the following call;

    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)

    Which in short means a call of;

    hs.plugin("Pushover (3P)").PushMessage("Test Message") will send a simple message with no title, no priority, no sound, no additional URL but if you fill in the additional parameters then you can specify those if you do want.

    Changes:

    v0.0.0.1 - Initial Release
    v0.0.0.2 - Time stamps not sent by default, scripting option still remains
    v0.0.0.3 - Fix for SSL errors on HomeTroller
    v0.0.0.4 - Added support for line breaks using \n syntax in messages
    v0.0.0.5 - Fixed web page bug for saving client details
    v0.0.0.6 - Support for emergency message triggers
    v0.0.0.7 - Support for new lowest priority messages
    Last edited by mrhappy; January 5th, 2017, 12:56 PM.
    My Plugins:

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

  • #2
    Re: Pushover (3P) Plugin

    This is very cool!!! I have a use fir this very thing. Dling and testing now.

    Thank you!
    Transitioning to HS3Pro .298 - WinXPEmbedded

    Hometroller S3 Pro - WinXPEmbedded - HSP 2.5.0.81 - BLStat - HSPhone - HSTouch Srvr 1.0.0.73 - Touchpad - BLLan - BLOccupied - DSC Plug 2.0.0.14 - BLStat .38

    Comment


    • #3
      Originally posted by Dafunktyfunk View Post
      This is very cool!!! I have a use fir this very thing. Dling and testing now.

      Thank you!
      Please do let me know how you get on with it, hopefully it is fairly intuitive.
      My Plugins:

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

      Comment


      • #4
        Ohhh! Nice.
        Don

        Comment


        • #5
          Ad,

          Very nice!

          I wish I had seen this before getting my own thing working...well mostly working. Course, this still passes through Google's servers. I've been trying to pull away from "cloud" stuff as much as I can. it all started with my move to pull in RSS after Google Reader died. I've been using TT-RSS for RSS feeds. I've been messing with OWNCloud for "google-drive/dropbox" like use. That coupled with "Kingsoft office" and Genius Scan gives me about 95-99% of all the Googel Drive features.

          I have a rooted Android, so I have been messing with creating a SSH link to my house.
          I am running a telnetd on my phone.
          I'm a little concerned about the security side of it still...but essentially to "bypass" the security of the phone company or any other firewalls I am behind, the SSH reaches OUT to my server to open the link.
          I have the ssh run a reverse port forward the correct port to my phone.
          Then, if I need to "pop" a message to my phone, I open a telnet link to that local port on my server (using a script), then write an 'echo "message" > /sdcard/message.txt'
          Finally, I have Tasker trigger on that file changing, and it gets processed or an alert is put into the notifications area. Works mostly...until the link is dropped. I need to make it more robust and what-not. I'm also worried about how much data this constant link will use. I know IMAP links do not take a LOT, as they just sent a constant no-op...so I might even just use IMAP and K-9 running my own server JUST for this link (since K-9 is so tightly coupled with Tasker). Might be easier, just to get messages across. HOWEVER, I find there is a LOT more that can be done (the +) and exploited the -) if I were to actually get this SSH link to work properly - assuming it isn't going to run my data up like crazy.

          This is, of course, stuff I can do remote from my house. I still have a few plugins to muck with for HS3!!

          --Dan
          Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

          Comment


          • #6
            Wish I could understand what you are doing Dan let alone do it myself! Yeah I've just been bitten by the cloud business with Google killing Latitude so I am now a bit wary of putting too much reliability on the cloud.
            My Plugins:

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

            Comment


            • #7
              It's actually simple.

              I run a telnet server on my phone. I have a script on my server that can access telnet server. I currently use that script to log into my virtual Linux boxes to perform maintenance (reboot, run RSYNC, etc.).

              I just redirected it to hit my phone.
              Since I have not reliably been able to get ADB to work with specific ROMS
              Tasker can trigger from a change to a file.

              IF my phone is connected to WIFI, I do not have control over what firewalls are there, so just as you would use something like LOGMEIN, or some other program, I use an SSH client to open a connection to my server. Then piggy backing on that, I can access the telnet server INTO my phone.

              From there, I can use *nix commands. echo will echo something. so I echo "my message" and pipe it with a > into a text file located on the sdcard, so I do not need root for the telnet server itself.

              Tasker triggers because the file changes and bing...action.
              Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

              Comment


              • #8
                Very Nice!
                I installed your plug-in and have a bug report.

                The timestamp of the notification on my phone is one hour after the actual time.
                You can see the inconsistency in the log:
                ----
                12-7-2013 20:15:32 - Pushover (3P) Debu - PushMessage Sub Called
                12-7-2013 20:15:32 - Pushover (3P) Debu - TimeToUnix: 1373656532
                12-7-2013 20:15:32 - Pushover (3P) Debu - Key: token
                -----
                Maybe you can add an option to not use the timestamp attribute?

                Comment


                • #9
                  Adam,
                  Thanks for the great plugin. Easy to use and works fast.
                  Just tested sms, email and pushover. sms notification came in 1 min after pushover, and email came in 2mins after pushover.
                  Thanks again!
                  Tom
                  Tom
                  baby steps...starting again with HS3
                  HS3Pro: Z-NET & 80 Z wave Devices,
                  HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
                  Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
                  In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
                  System: XP on Fanless Mini-ITX w/ SSD

                  Comment


                  • #10
                    Any chance of an HS3 version? Trying not to mess with my HS2 machine at the moment.
                    _______________________________________________

                    HS3 : HSpro (3.0.0.460) on Win2012 (vm on ESXi)
                    Plugins: HSTouch, UPBSpud, Kinect, Nest, IFTTT, DirecTV, EasyTrigger, Imperihome, Zwave, RFXcom, UltraMon3, UltraWeatherBug3, UltraGCIR3, UltraLog3, UltraPioneer, PHLocation, Pushover, Pushalot, MCSSPrinklers S, JowiHue
                    Jon00 Plugins: Bluetooth Proximity, Performance Monitor, DB Chart, Links

                    Comment


                    • #11
                      Originally posted by irritanterik View Post
                      Very Nice!
                      I installed your plug-in and have a bug report.

                      The timestamp of the notification on my phone is one hour after the actual time.
                      You can see the inconsistency in the log:
                      ----
                      12-7-2013 20:15:32 - Pushover (3P) Debu - PushMessage Sub Called
                      12-7-2013 20:15:32 - Pushover (3P) Debu - TimeToUnix: 1373656532
                      12-7-2013 20:15:32 - Pushover (3P) Debu - Key: token
                      -----
                      Maybe you can add an option to not use the timestamp attribute?
                      Yes no problem I will remove or fix it tonight, not sure of its actual value in any case. I don't know whether anyone really is going to use the time for anything, I imagine all of the notifications from HS will be sent live rather than delayed.

                      Adam,
                      Thanks for the great plugin. Easy to use and works fast.
                      Just tested sms, email and pushover. sms notification came in 1 min after pushover, and email came in 2mins after pushover.
                      Thanks again!
                      Tom
                      Many thanks for the feedback.
                      Any chance of an HS3 version? Trying not to mess with my HS2 machine at the moment.
                      I am afraid not certainly in the immediate future, I have no intention of updating to HS3 at this moment and as such I won't be writing any plugins for it. It is not a terribly difficult system to interface with and you could script it for HS3.
                      My Plugins:

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

                      Comment


                      • #12
                        Originally posted by irritanterik View Post
                        Very Nice!
                        I installed your plug-in and have a bug report.

                        The timestamp of the notification on my phone is one hour after the actual time.
                        You can see the inconsistency in the log:
                        ----
                        12-7-2013 20:15:32 - Pushover (3P) Debu - PushMessage Sub Called
                        12-7-2013 20:15:32 - Pushover (3P) Debu - TimeToUnix: 1373656532
                        12-7-2013 20:15:32 - Pushover (3P) Debu - Key: token
                        -----
                        Maybe you can add an option to not use the timestamp attribute?
                        Can you try this please and see if it works OK...the scripting option is there but it is not sent on an event triggered message.
                        Last edited by mrhappy; July 13th, 2013, 02:07 PM. Reason: Attachment removed, at the top of the thread.
                        My Plugins:

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

                        Comment


                        • #13
                          Adam:

                          Quick note of thanks. Very useful.
                          Don

                          Comment


                          • #14
                            I tested the new version and timestamps on my phone are ok now. Thanks for your quick reply!

                            Comment


                            • #15
                              Originally posted by donstephens View Post
                              Adam:

                              Quick note of thanks. Very useful.
                              Thanks Don for the feedback

                              Originally posted by irritanterik View Post
                              I tested the new version and timestamps on my phone are ok now. Thanks for your quick reply!
                              No problems and thanks for testing, it is now on the top of this thread.
                              My Plugins:

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

                              Comment

                              Working...
                              X