Pushover Plugin - push notifications

This subforum holds the older topics about this plugin before it was moved to open source. It's locked and only provided as historical reference.
vasisht
Posts: 24
Joined: Sat Dec 08, 2012 10:04 am

Re: Pushover Plugin - push notifications

Post 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')
User avatar
edrabbit
Posts: 39
Joined: Wed Apr 09, 2014 11:31 pm

Re: Pushover Plugin - push notifications

Post 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.
User avatar
edrabbit
Posts: 39
Joined: Wed Apr 09, 2014 11:31 pm

Re: Pushover Plugin - push notifications

Post 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
DrLove
Posts: 260
Joined: Fri Dec 12, 2014 7:28 am
Location: Sweden
Contact:

Re: Pushover Plugin - push notifications

Post 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
Love Kull (yes it's my name)
Blog (in Swedish)
Sweden
richo
Posts: 161
Joined: Tue Nov 25, 2014 3:54 am
Location: Pomorskie, Poland

Re: Pushover Plugin - push notifications

Post 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 :(
Ryszard
MarcoGT
Posts: 1140
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: Pushover Plugin - push notifications

Post by MarcoGT »

I haven't looked at docs yet (I have downloaded it).
Does it send push notifications also via Internet?
davinci

Re: Pushover Plugin - push notifications

Post 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]
MarcoGT
Posts: 1140
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: Pushover Plugin - push notifications

Post by MarcoGT »

As far as I understood, the pushover account is free for only 7 days, right?
MarcoGT
Posts: 1140
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: Pushover Plugin - push notifications

Post by MarcoGT »

Bought the iOS license, installed and configured, working like a charm.
Wonderful plugin, thanks :)
markf424
Posts: 58
Joined: Wed Dec 25, 2013 1:52 pm

Re: Pushover Plugin - push notifications

Post 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.
markf424
Posts: 58
Joined: Wed Dec 25, 2013 1:52 pm

Re: Pushover Plugin - push notifications

Post 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.
User avatar
discgolfer1138
Posts: 45
Joined: Thu Jul 28, 2011 10:56 pm
Location: Golden, CO
Contact:

Re: Pushover Plugin - push notifications

Post 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 :)
Indigo 6.1.0 | Mac Mini | OS 10.10.3 (Yosemite)
Fork Me on GitHub!
MarcoGT
Posts: 1140
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: Pushover Plugin - push notifications

Post 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
DrLove
Posts: 260
Joined: Fri Dec 12, 2014 7:28 am
Location: Sweden
Contact:

Re: Pushover Plugin - push notifications

Post by DrLove »

I've seen this behavior to. I had to put a delay between the events :/
Love Kull (yes it's my name)
Blog (in Swedish)
Sweden
MarcoGT
Posts: 1140
Joined: Thu Sep 11, 2014 1:06 pm
Location: Germany

Re: Pushover Plugin - push notifications

Post 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...
Locked

Return to “Archives”