Announcement

Collapse
No announcement yet.

HS3 Pushover Plugin

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

  • Originally posted by mwolter View Post
    Not sure if I'm doing this properly but I downloaded v .38, disabled the plugin, copied the new version to HS, enabled the plugin and rebooted HS for good measure.

    Downloaded the latest version of PushOver on my iPhone. I receive the message but it has a generic image icon.

    Haha, just figured it out. I had to click the icon to see the image! Do you know if the image can be shown automatically, without having to click on it?

    BTW, I'm on Linux HS 409, Mono 5.0.1.1.


    I think it varies and as a new mobile app side feature, we need to give pushover some time to work through it.

    Comment


    • Originally posted by mwolter View Post
      Not sure if I'm doing this properly but I downloaded v .38, disabled the plugin, copied the new version to HS, enabled the plugin and rebooted HS for good measure.

      Downloaded the latest version of PushOver on my iPhone. I receive the message but it has a generic image icon.

      Haha, just figured it out. I had to click the icon to see the image! Do you know if the image can be shown automatically, without having to click on it?

      BTW, I'm on Linux HS 409, Mono 5.0.1.1.
      Originally posted by aponte2 View Post
      Works now. Great.

      Thanks!
      Thanks for testing, I'll add version .38 to the updater in that case.

      In terms of the icon not displaying then I have noticed that appears more the case if you have the app open and send a message you will get the blank icon when the message arrives. If I send a message and then go into the app from new the image appears to normally be loaded. I'm confident that Pushover will probably fix that in due course.
      My Plugins:

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

      Comment


      • Mrhappy,
        I'm in the process of cleaning up the HS logs on my system and would only like only errors to be logged. I looked through the PI settings page and didn't find anything related to a logging level. Maybe I overlooked it?

        Since you are working on the plugin, wanted to drop this message and see if it's possible to add a log level setting.

        Comment


        • Originally posted by mwolter View Post
          Mrhappy,
          I'm in the process of cleaning up the HS logs on my system and would only like only errors to be logged. I looked through the PI settings page and didn't find anything related to a logging level. Maybe I overlooked it?

          Since you are working on the plugin, wanted to drop this message and see if it's possible to add a log level setting.
          I don't tend to have logging levels in any of my plugins, the HS log is something I avoid writing debug stuff to. I'll either write it to a file or rely on the console window output. These are the only calls that should go into the HS log;

          Log("Error executing action: " & ex.Message, LogLevel.Both)
          Log("CustomReplacement Exception " & ex.Message.ToString, LogLevel.Both)
          Log("File exists but is too lage, please check it - sending plain message", LogLevel.Both)
          Log("Attachment does not exist - check path/file status and try again - will send plain message", LogLevel.Both)
          Log("Message Length Greater Than 512 characters", LogLevel.Both)
          Log("Sending Pushover Message Attachment - " & attachPath, LogLevel.Both)
          Log("Receipt ID " & xmlReply.SelectSingleNode("/response/receipt").InnerText, LogLevel.Both)
          Log("Pushover Notification Sent - Message Title " & Title, LogLevel.Both)

          Log("WebException Error " & e.Message, LogLevel.Both)
          Log("Web Exception Response " & str, LogLevel.Both)
          Log("Error POST URL " & ex.Message, LogLevel.Both)
          Log("No API Token/User Key Given - possible disabled client, no send attempt", LogLevel.Both)
          Log("Messages Disabled in Pushover Device", LogLevel.Both)
          Log("Unknown Exception in Pushmessage " & ex.Message, LogLevel.Both)
          Log("Request Invalid - " & replyStr, LogLevel.Both)
          Log("WebException Error " & e.Message, LogLevel.Both)
          Log("Web Exception Response " & str, LogLevel.Both)
          Catch ex As Exception : Log("Error POST URL " & ex.Message, LogLevel.Both)
          Log("Downloading sounds from Pushover", LogLevel.Both)
          Log("Downloaded " & sndArray.GetUpperBound(0) & " sounds from Pushover - Adding Device Default", LogLevel.Both)
          Log("No User Key Specified, please enter in config page", LogLevel.Both)
          Log("Attempting To Produce a Client/Group List", LogLevel.Both)
          Log("Starting Flood Control Timer", LogLevel.Both)
          Log("Glance Message Delay Value " & MessageDelay, LogLevel.Both)
          Log("Plugin Starting - Starting Thread", LogLevel.Both)
          Catch ex As Exception : Log("Error ending " & IFACE_NAME & " Plug-In", LogLevel.Both)
          Catch e As WebException : Log("WebException Error: " & e.Message, LogLevel.Both)
          Log("Error Validating Application: " & ex.Message, LogLevel.Both)
          Log("Unknown Exception in ValidateApplication: " & ex.Message, LogLevel.Both)
          Log("Flood Timer - " & FloodTotal & " Messages Sent In Last Minute - ***Disabled*** Until Plugin Restarts", LogLevel.Both)
          Log("Resending Pushover Message", LogLevel.Normal)
          Log("Unable To Resend Message - No Current Data", LogLevel.Normal)
          Log("Creating Base Devices", LogLevel.Normal)
          Log("Non Emergency Message - Disabled By Device", LogLevel.Normal)
          Log("Application Not Found In HomeSeer (Using First) - " & sAPIStr, LogLevel.Normal)
          Log("Glances Notification Sent", LogLevel.Normal)
          Log("Message Unable To Send - Delay Between Messages", LogLevel.Normal)
          Log("Messages Disabled in Pushover Device", LogLevel.Normal)
          Log("Unknown Exception in GlanceMessage " & ex.Message, LogLevel.Normal)
          Log("Emergency Message Expired", LogLevel.Normal)
          Log("Emergency Message Acknowledged", LogLevel.Normal)
          Log("Emergency Message Withdrawn - Stopping Timer", LogLevel.Normal)
          Log("Cannot withdraw emergency message, last message was Not emergency priority", LogLevel.Normal)
          Log("Error In SoundLoad " & ex.Message, LogLevel.Normal)
          Log("Clients " & clcurrLine(0) & " " & clcurrLine(0), LogLevel.Normal)
          Log("Clients " & clcurrLine(0) & " : " & clcurrLine(1), LogLevel.Normal)

          Log("Web Client is already running, wait a second", LogLevel.Normal)
          Log("Change in User Key", LogLevel.Normal)
          Log("Application Verification Failed", LogLevel.Normal)
          The ones in bold are the ones you will probably only see in conventional use with the remainder only either on startup or if something is wrong. I'd prefer to leave them going to the log for awareness of other users indeed I think someone asked specifically for the message title in the log.
          My Plugins:

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

          Comment


          • .38 is working well for me now after I figured out my 'user error'
            Last edited by Ltek; February 6th, 2018, 02:53 PM.

            Comment


            • @mrhappy
              <EDIT> Below WAS working... I sent 3 messages but now it shows "Message To Send" text... arg! Anything you can do to fix this so we can see the URL test in the initial message notification?


              Not sure if there is anything you can do about it but there when we remove all the text from the message box, it auto populates with "Message To Send"

              This is is not ideal if we want to use a URL and want only the URL Title to show.

              I figured out (by trial and error) is there is a workaround -did you put this in the code? Using HTML code the "Message to Send" will override the text in the 'Message Body' box.

              Example:

              in box for 'Message URL' I put...
              <a href="https://connected2.homeseer.com/JSON?user=USER&pass=PASS&request=controldevicebyvalue&ref=36 3&value=100">Late Night Mode</a>

              then in the message body, only the URL link named "Late Night Mode" shows. This is exactly what I want. so when the message pops up in PO client it can all be read without opening the message. Of course, to execute the URL, the message still needs to be opened.
              Last edited by Ltek; February 6th, 2018, 03:22 PM.

              Comment


              • Originally posted by Ltek View Post
                @mrhappy
                <EDIT> Below WAS working... I sent 3 messages but now it shows "Message To Send" text... arg! Anything you can do to fix this so we can see the URL test in the initial message notification?


                Not sure if there is anything you can do about it but there when we remove all the text from the message box, it auto populates with "Message To Send"

                This is is not ideal if we want to use a URL and want only the URL Title to show.

                I figured out (by trial and error) is there is a workaround -did you put this in the code? Using HTML code the "Message to Send" will override the text in the 'Message Body' box.

                Example:

                in box for 'Message URL' I put...
                <a href="https://connected2.homeseer.com/JSON?user=USER&pass=PASS&request=controldevicebyvalue&ref=36 3&value=100">Late Night Mode</a>

                then in the message body, only the URL link named "Late Night Mode" shows. This is exactly what I want. so when the message pops up in PO client it can all be read without opening the message. Of course, to execute the URL, the message still needs to be opened.
                I'm sorry but I'm having a bit of difficulty in trying to see what you are doing - can you put a screenshot up?

                You don't need to put formatted HTML in the message URL box and that is probably messing up the event page. Just put the https://connected2.... in that box then in the message url title put Late Night Mode.

                If you don't want a URL title then if you leave it blank but leave a URL in then it will display the full URL in the pushover message.

                I've looked through the code and can see that if you do not specify a message then I do revert to sending "Message To Send" - sending a message is mandatory according to Pushover - "Messages must contain a message parameter that contains the message body" hence why if you don't include one I make sure one is sent.
                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 sorry but I'm having a bit of difficulty in trying to see what you are doing - can you put a screenshot up?

                  You don't need to put formatted HTML in the message URL box and that is probably messing up the event page. Just put the https://connected2.... in that box then in the message url title put Late Night Mode.

                  If you don't want a URL title then if you leave it blank but leave a URL in then it will display the full URL in the pushover message.

                  I've looked through the code and can see that if you do not specify a message then I do revert to sending "Message To Send" - sending a message is mandatory according to Pushover - "Messages must contain a message parameter that contains the message body" hence why if you don't include one I make sure one is sent.
                  Just do exactly this...

                  'Message Title' : enter anything you want

                  'Message URL' :

                  <a href="https://connected2.homeseer.com/JSON?user=USER&pass=PASS&request=controldevicebyvalue&ref=36 3&value=100">Late Night Mode</a>

                  ... result is that the encoded info will override anything in the Message text box

                  See my screenshots where you can see in the PO app list the URL is in the main item... then you can open the item and its there also. It completely overwrite the text "Message to Send". I cant consistently replicate it - I think it was working fine in .37 and broke in .38 ... can you post .37 again?

                  Also, maybe you can make a version that gives us an option where is doesn't auto populate the 'Message Body' - that could help.
                  Attached Files
                  Last edited by Ltek; February 6th, 2018, 07:21 PM.

                  Comment


                  • I got it to work by just encoding this in the message - do not enter anything in the URL field - I have my URL field blank and put everything in the message.

                    My message body has the following:

                    HTML Code:
                    Doors open - click below to lock door
                    
                    <a href="https://connected2.homeseer.com/JSON?user=USER@yahoo.com&pass=PASS&request=runevent&group=IFTTT&name=TEST">Lock the Doors</a>

                    Comment


                    • Originally posted by rileydogmi View Post
                      I got it to work by just encoding this in the message - do not enter anything in the URL field - I have my URL field blank and put everything in the message.

                      My message body has the following:

                      HTML Code:
                      Doors open - click below to lock door
                      
                      <a href="https://connected2.homeseer.com/JSON?user=USER@yahoo.com&pass=PASS&request=runevent&group=IFTTT&name=TEST">Lock the Doors</a>
                      perfect, thank you!

                      I noticed this work for me on my Samsung S8 (Android OS 7) but on my wife's Google Pixel v1 (OS 8) the links dont work.

                      anyone else seeing discrepancies? (clearly OS and/or PO app related, not the HS3 plugin)

                      Comment


                      • Originally posted by Ltek View Post
                        perfect, thank you!

                        I noticed this work for me on my Samsung S8 (Android OS 7) but on my wife's Google Pixel v1 (OS 8) the links dont work.

                        anyone else seeing discrepancies? (clearly OS and/or PO app related, not the HS3 plugin)
                        Yes as has been pointed out only the message supports encoded HTML (be it a link or a tag), I don't know what was happening if it was appearing in other fields. You of course can put a link URL in the separate field but this link will always be at the bottom of the message whereas putting the HTML in the message enables you to put it where you wish. Hope it works for you OK, I've not changed the behaviour for these fields in some time so there is no difference between .37 and .38 in this regard.
                        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
                          Thanks for testing, I'll add version .38 to the updater in that case.

                          In terms of the icon not displaying then I have noticed that appears more the case if you have the app open and send a message you will get the blank icon when the message arrives. If I send a message and then go into the app from new the image appears to normally be loaded. I'm confident that Pushover will probably fix that in due course.
                          Sorry for the late response, I had some problems with my isp.
                          Just tested .38 and everything works like a charm.
                          Thank you very much for your effort.

                          Comment


                          • I only get the link to be a clickable state when i have previewed message then opened it and press back then open it again in pushover... not myhappy's plugin but a bug in pushover itself!

                            Great plugin love it

                            Comment


                            • Scripting issue

                              Hi Adam:

                              I'm trying to use the example you posted a couple of pages back and it's not working. No errors, just not seeing the push to my phone.
                              PHP Code:
                              hs.PluginFunction("Pushover 3P""""Pushscript", New Object() {"All Clients""Offline","Circle Problem: " VariableToSend"emergency""Tug Boat"NothingNothing"A.I Emergency"}) 
                              The function returns a 'false' if that helps.

                              Anything obvious that I'm missing?

                              Thanks
                              Don

                              Comment


                              • Originally posted by donstephens View Post
                                Hi Adam:

                                I'm trying to use the example you posted a couple of pages back and it's not working. No errors, just not seeing the push to my phone.
                                PHP Code:
                                hs.PluginFunction("Pushover 3P""""Pushscript", New Object() {"All Clients""Offline","Circle Problem: " VariableToSend"emergency""Tug Boat"NothingNothing"A.I Emergency"}) 
                                The function returns a 'false' if that helps.

                                Anything obvious that I'm missing?

                                Thanks
                                If you have upgraded (to .37 or later) then I am afraid there is an extra parameter that is needed on the script call. This is the path for the file if you wish to send an attachment, add another nothing onto it after AI Emergency and see if that works.
                                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