Announcement

Collapse
No announcement yet.

HS3 Pushover Plugin

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

  • akurz
    replied
    Hi there.

    Looks like with the latest version 0.0.0.52 sending messages from a script in HS3 doesn't work anymore. There's no errors or anything - just no message sent. Same script with same parameters works fine with 0.0.0.48. I've downgraded and got everything working for now, so no pressure.

    Here's the relevant part of the script:

    Code:
    Dim CO(8) as Object
    CO(0) = "phone1|phone2"
    CO(1) = "Roomba hat eine Reinigungsaufgabe in " & Total_Time & " Minuten erledigt und ist nun zurück im Dock."
    CO(2) = "Roomba Reinigung beendet"
    CO(3) = Nothing
    CO(4) = "Gamelan"
    CO(5) = Nothing
    CO(6) = Nothing
    CO(7) = "iRobot"
    CO(8) = Nothing
    
    hs.PluginFunction("Pushover 3P", "", "Pushscript", CO)
    Cheers,
    Alex

    Leave a comment:


  • SteveMSJ
    replied
    Originally posted by Ltek View Post
    One small feature request if you can... it would be extremely helpful if you were able to have a tab in the PI that lists all the PO notifications used in Events (and the event they are associated to). I find that with over 350 events and growing, I often duplicate notifications and/or forget where a notification 'lives'. In the Vera system, I could see all event notifications in a table and see what-is-where.
    Originally posted by mrhappy View Post
    This would be useful for me just as much as anyone else...sadly this is a HS limitation (and any other solution involves a huge amount of work to move the event structures outside of the HS provided solutions). If you query the events via the scripting call then all you get is the list of events and when it comes to the actions it just says that they belong to a plugin with no further information, as such I can't get a list of them easily. I contemplated making a list when an event is called and then saving that event into a list but that will be out of date should the action be changed or the action be deleted so I'd rather not have something than have something that was inaccurate.
    Ltek It might not be exactly what you want but have you tried Jon00's Event Viewer? It has many uses and you can filter by search words. If you enter 'Send Pushover' as the search words then it will list out all your events that have a Pushover message as an action.

    It's also very useful for finding broken events by using 'broken' as the search term, but that's a separate topic..

    Steve

    Leave a comment:


  • teladog01
    replied
    Originally posted by mrhappy View Post

    I'm with you all the way but I am afraid that this would be great to do but just too much work for me at the minute. When the plugin was written then I was new to HS3 and in hindsight I would have gone with a different route to store messages in a queue and then depending on what came back then deal with them like in your case to strip things out that caused an error or in the case of no internet connection to do periodic retries and then send the messages when it came back online...I wanted to do something quickly but in this case it was probably me not thinking for such eventualities (and indeed many of the later additions to pushover that cause these errors were simply not in the pushover functionality).
    Understood, thank you for the explanation 👍

    Leave a comment:


  • Ltek
    replied
    Originally posted by mrhappy View Post

    This would be useful for me just as much as anyone else...sadly this is a HS limitation (and any other solution involves a huge amount of work to move the event structures outside of the HS provided solutions). If you query the events via the scripting call then all you get is the list of events and when it comes to the actions it just says that they belong to a plugin with no further information, as such I can't get a list of them easily. I contemplated making a list when an event is called and then saving that event into a list but that will be out of date should the action be changed or the action be deleted so I'd rather not have something than have something that was inaccurate.
    understood... HS has a lot of these. Curious if you put in a feature request... not that it would help ;-)

    Leave a comment:


  • mrhappy
    replied
    Originally posted by teladog01 View Post

    Yep, I see the improved logging for this situation now:
    Code:
    Sep-16 4:09:58 PM Pushover 3P Pushover Plugin WebException Error: The remote server returned an error: (400) Bad Request.
    Sep-16 4:09:58 PM Pushover 3P Error: html and monospace are mutually exclusive
    Would it be possible to go ahead and send the message, just disable the monospace option?

    Since the monospace option wasn't working before, this invalid message config went unnoticed. So it's possible I have other Pushover message events like this. As it is now, I won't even know that I am missing notifications due to this invalid config, unless I explicitly check the log.

    It's not that big of a deal, but if it's not much work I think that would be preferable to go ahead and send the message if possible. Sorry to be a pain about this...
    I'm with you all the way but I am afraid that this would be great to do but just too much work for me at the minute. When the plugin was written then I was new to HS3 and in hindsight I would have gone with a different route to store messages in a queue and then depending on what came back then deal with them like in your case to strip things out that caused an error or in the case of no internet connection to do periodic retries and then send the messages when it came back online...I wanted to do something quickly but in this case it was probably me not thinking for such eventualities (and indeed many of the later additions to pushover that cause these errors were simply not in the pushover functionality).

    Leave a comment:


  • mrhappy
    replied
    Originally posted by Ltek View Post
    mrhappy I get it, I was thinking about the wrong thing, I only see the default HS3 Devices (see screenshot) - so, no problem there, they are not used in any Events

    One small feature request if you can... it would be extremely helpful if you were able to have a tab in the PI that lists all the PO notifications used in Events (and the event they are associated to). I find that with over 350 events and growing, I often duplicate notifications and/or forget where a notification 'lives'. In the Vera system, I could see all event notifications in a table and see what-is-where.

    Hope you can make that happen?

    thx for the very very useful plug!
    This would be useful for me just as much as anyone else...sadly this is a HS limitation (and any other solution involves a huge amount of work to move the event structures outside of the HS provided solutions). If you query the events via the scripting call then all you get is the list of events and when it comes to the actions it just says that they belong to a plugin with no further information, as such I can't get a list of them easily. I contemplated making a list when an event is called and then saving that event into a list but that will be out of date should the action be changed or the action be deleted so I'd rather not have something than have something that was inaccurate.

    Leave a comment:


  • teladog01
    replied
    Originally posted by mrhappy View Post

    Good spot, yes of course please try this version.
    Yep, I see the improved logging for this situation now:
    Code:
    Sep-16 4:09:58 PM Pushover 3P Pushover Plugin WebException Error: The remote server returned an error: (400) Bad Request.
    Sep-16 4:09:58 PM Pushover 3P Error: html and monospace are mutually exclusive
    Would it be possible to go ahead and send the message, just disable the monospace option?

    Since the monospace option wasn't working before, this invalid message config went unnoticed. So it's possible I have other Pushover message events like this. As it is now, I won't even know that I am missing notifications due to this invalid config, unless I explicitly check the log.

    It's not that big of a deal, but if it's not much work I think that would be preferable to go ahead and send the message if possible. Sorry to be a pain about this...

    Leave a comment:


  • Ltek
    replied
    mrhappy I get it, I was thinking about the wrong thing, I only see the default HS3 Devices (see screenshot) - so, no problem there, they are not used in any Events

    One small feature request if you can... it would be extremely helpful if you were able to have a tab in the PI that lists all the PO notifications used in Events (and the event they are associated to). I find that with over 350 events and growing, I often duplicate notifications and/or forget where a notification 'lives'. In the Vera system, I could see all event notifications in a table and see what-is-where.

    Hope you can make that happen?

    thx for the very very useful plug!
    Attached Files

    Leave a comment:


  • mrhappy
    replied
    Unfortunately yes Ltek and I recognise the pain it can cause, I don't personally use the pushover devices and don't know what people typically use them for. Events with just pushover actions to send messages will be fine.
    ​​​
    ​​The reason I moved away was to remove the reliance on the PED and also the device enumerator and instead reference the devices by address. This was to make it more HS4-proof as I don't think the enumerator is really advertised any more.

    The old version should still work OK and to be honest there isn't a great amount of changes so if it causes too much pain you don't have to update.

    Leave a comment:


  • Ltek
    replied
    Originally posted by mrhappy View Post
    5) Re-done the devices, if you use the devices then you will need to delete them and let the plugin create them again. The devices are virtually the same but I've set the icons and can now add other devices easily if it ever came to it.


    Event actions should stay the same (this was obviously my concern) and existing events should work just fine, you won't need to do any additional setup apart from replacing this file (and deleting old devices if you had them)
    I'm confused... are you saying that we manually delete the existing devices and the PI will re-create them with the exact same Device ID so HS3 doesnt get confused?
    I have about 30 devices, many are used in events, dashboards, etc. --really dont want to comb through all my events and fix them.

    thx

    Leave a comment:


  • mrhappy
    replied
    Originally posted by teladog01 View Post
    I was getting a bunch of these in the log today:
    Code:
    Sep-12 11:01:37 PM Pushover 3P PushMessage Exception: Object reference not set to an instance of an object.
    Eventually I tracked it down to an event that had some HTML tags in the Message body, and also had the monospace option checked. I realize that monospace HTML is probably not a valid thing, but maybe the plugin could deal with this a little more gracefully?
    Good spot, yes of course please try this version.
    Attached Files

    Leave a comment:


  • teladog01
    replied
    I was getting a bunch of these in the log today:
    Code:
    Sep-12 11:01:37 PM           Pushover 3P     PushMessage Exception: Object reference not set to an instance of an object.
    Eventually I tracked it down to an event that had some HTML tags in the Message body, and also had the monospace option checked. I realize that monospace HTML is probably not a valid thing, but maybe the plugin could deal with this a little more gracefully?

    Leave a comment:


  • teladog01
    replied
    Originally posted by mrhappy View Post

    Can you give the new version (.51) in post #1249 a go please, those issues should be fixed.
    Yep, initial tests look good for both of the issues. I'll keep an eye on it the next few days.

    Leave a comment:


  • mrhappy
    replied
    Originally posted by teladog01 View Post
    Looks like there are also issues with messages that contain HTML tags. Here's an example comparison of messages sent from the same event, version .48 vs version .50:

    Click image for larger version

Name:	fullsizeoutput_1520.jpeg
Views:	381
Size:	51.8 KB
ID:	1417856

    Click image for larger version

Name:	fullsizeoutput_151f.jpeg
Views:	367
Size:	61.1 KB
ID:	1417857

    Click image for larger version

Name:	Screen Shot 2020-09-08 at 12.05.49 PM.png
Views:	377
Size:	26.5 KB
ID:	1417855
    Can you give the new version (.51) in post #1249 a go please, those issues should be fixed.

    Leave a comment:


  • teladog01
    replied
    Looks like there are also issues with messages that contain HTML tags. Here's an example comparison of messages sent from the same event, version .48 vs version .50:

    Click image for larger version

Name:	fullsizeoutput_1520.jpeg
Views:	381
Size:	51.8 KB
ID:	1417856

    Click image for larger version

Name:	fullsizeoutput_151f.jpeg
Views:	367
Size:	61.1 KB
ID:	1417857

    Click image for larger version

Name:	Screen Shot 2020-09-08 at 12.05.49 PM.png
Views:	377
Size:	26.5 KB
ID:	1417855

    Leave a comment:

Working...
X