Page 4 of 15

Re: Pushover Plugin - push notifications

PostPosted: Fri Nov 28, 2014 10:28 pm
by vasisht
OK took a very long time - but finally figured out how to send a pushover alert with python, so I removed my prior questions.

Here's my code for anyone else who is interested in replicating this

Code: Select all
def sendAlert(alert, priority=0):
          alertPlugin = indigo.server.getPlugin('io.thechad.indigoplugin.pushover')
          if alertPlugin.isEnabled():
                    indigo.server.log('pushover plugin is available')
                    alertProps = {  'msgTitle'       :      'Home automation server',
                                        'msgBody'        :      alert,
                                        'msgSound'       :      'pushover',
                                        'msgPriority'    :      priority,
                                        'msgDevice'      :      '',
                                        'msgSupLinkUrl'  :      '',
                                        'msgSupLinkTitle':      ''
                                     } 
                    alertPlugin.executeAction("send", props=alertProps)
          else:
                    indigo.server.log('pushover plugin is not available')

Re: Pushover Plugin - push notifications

PostPosted: Sun Dec 14, 2014 2:56 pm
by edrabbit
Running into a bit of a weird problem.

Running Indigo 6.0.16 on OS X 10.9.5
Installed v1.1.2 of Pushover plugin (https://github.com/IndigoDomotics/indig ... tag/v1.1.2)
Set things up, working great, did not try variable substitution.
Downloaded and upgraded to marceltrapman's v2.0.5 (https://github.com/IT2BE/indigo-pushover/tree/v2.0.5) because I wanted to support multiple keys.
Created a simple test Action to try sending a message with a variable that tells me the score of my cat bathroom using a variable "cat_bathroom_score". (More info)
Message is simply:
Code: Select all
Cat Bathroom score is too damn high %%v:cat_bathroom_score%%

I try executing from the Indigo client manually to test, and it does not give any errors, however I never receive a push notification. As far as I can tell it never gets to Pushover's server.
If I try to open up the Action and click "Edit Action Settings" the dialog for setting title/message/etc doesn't show and eventually I see the following in the Event Log:

Code: Select all
Error (client)                  timeout waiting for plugin response from io.thechad.indigoplugin.pushover for request UiGetValues2
  Error (client)                  timeout waiting for plugin response from io.thechad.indigoplugin.pushover for request CallPluginFunc
  Error (client)                  dialogForActionId() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]


I'm unable to get to the Edit Action Settings dialog both from a client on the same machine as the server as well as a remote client on another machine running OS X 10.9.5. I have to restart the Indigo Server in order to go back in and edit the action settings. Then it works fine until I try to execute it and then I have to restart again. I upgraded to Indigo 6.0.18 in case it was a bug in Indigo, but same behavior.

If I remove "%%v:cat_bathroom_score%%" from the message, push works totally fine. Looks like either I'm doing something wrong, or there's some errors that aren't being handled, or something.

Re: Pushover Plugin - push notifications

PostPosted: Sun Dec 14, 2014 2:58 pm
by edrabbit
Of course I forgot to mention my appreciation for such a useful plugin! Thanks to everyone putting in work on this. It really changes things for me and my house. :D

Re: Pushover Plugin - push notifications

PostPosted: Wed Dec 31, 2014 8:21 am
by DrLove
Hi, great plug in!

Is it possible to send messages to more than one client and not all? Say iPhone1 and iPhone2 but not iPad3?
Tested w/ iPhone1,iPhone2 and iPhone1;iPhone2 but all clients receive the message.

Best regards, L

Re: Pushover Plugin - push notifications

PostPosted: Thu Jan 15, 2015 7:02 am
by richo
Unfortunatelly I also have problems with variables. If I insert it either in the title or body Pushover plugin hangs for a while and I get the following message in the log:

Code: Select all
Error (client)                  timeout waiting for plugin response from io.thechad.indigoplugin.pushover for request UiGetValues2
  Error (client)                  timeout waiting for plugin response from io.thechad.indigoplugin.pushover for request CallPluginFunc
  Error (client)                  dialogForActionId() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]



Anything can be done? I desperately need it working :(

Re: Pushover Plugin - push notifications

PostPosted: Tue Jan 20, 2015 3:47 am
by MarcoGT
I haven't looked at docs yet (I have downloaded it).
Does it send push notifications also via Internet?

Re: Pushover Plugin - push notifications

PostPosted: Sun Feb 15, 2015 1:22 pm
by davinci
Indigo almost crashes when using variables in the pushover plugin.

It recovers with this message:

Code: Select all
  Error (client)                  timeout waiting for plugin response from io.thechad.indigoplugin.pushover for request UiGetValues2
  Error (client)                  timeout waiting for plugin response from io.thechad.indigoplugin.pushover for request CallPluginFunc
  Error (client)                  dialogForActionId() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]

Re: Pushover Plugin - push notifications

PostPosted: Tue May 05, 2015 1:51 am
by MarcoGT
As far as I understood, the pushover account is free for only 7 days, right?

Re: Pushover Plugin - push notifications

PostPosted: Wed May 20, 2015 12:32 am
by MarcoGT
Bought the iOS license, installed and configured, working like a charm.
Wonderful plugin, thanks :)

Re: Pushover Plugin - push notifications

PostPosted: Thu May 21, 2015 4:26 pm
by markf424
Agreed - so glad to be done with the Google SMS method of alerting. Pushover is much more powerful, with the time of day alerts, specific sounds, etc.

Re: Pushover Plugin - push notifications

PostPosted: Wed Jun 03, 2015 2:41 pm
by markf424
Also a note to those having trouble with the variable substitution - make sure you're using the variable ID instead of the name. That is, your substitution should look like:

Code: Select all
%%v:54353621%%

and not
Code: Select all
%%v:hotPotato%%


The plugin doesn't validate this field and that's why it dies with the error listed above in the thread.

Re: Pushover Plugin - push notifications

PostPosted: Fri Jul 10, 2015 8:29 pm
by discgolfer1138
So glad to see folks are finding this useful! Sorry I haven't had any free time to update it, but it sounds like Marcel and others have adopted it. Huge thanks to them for their hard work :)

Re: Pushover Plugin - push notifications

PostPosted: Thu Jul 16, 2015 11:38 pm
by MarcoGT
Yesterday I had a strange behaviour.

I was testing my alarm system.
I have a trigger on a movement sensor, and when it gets breached:

- it send email + pushover notification
- it sets the variable alarmStatus to "fault"; this variable change triggers another trigger which sends e-mail+pushover notification.

I do not understand why I only got the second pushover notification (if I test the first alone, without the second trigger everything is fine).
Why?
Pushover does not accept two notifications in a short time?

Thanks
Marco

Re: Pushover Plugin - push notifications

PostPosted: Fri Jul 17, 2015 2:30 am
by DrLove
I've seen this behavior to. I had to put a delay between the events :/

Re: Pushover Plugin - push notifications

PostPosted: Fri Jul 17, 2015 5:45 am
by MarcoGT
Thanks for the confirmation.

By the way, in the Indigo logs I see that both Pushover notification have been sent, but I receive only one...