Skip to content

Latest commit

 

History

History
 
 

pushover

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Pushover

Pushover is one out of many push services, which is compatible with Android, IOS and Windows Clients. This plugin make it possible to push messages to your clients from SmartHomeNG.

Requirements

Python libraries

Other

  • Pushover API-KEY - get it from here for free, after registration.

Changelog

2017-08-13:

  • Initial version

Configuration

plugin.conf (deprecated) / plugin.yaml

[po]
    class_name = Pushover
    class_path = plugins.pushover
    apiKey = <your-api-key>
    userKey = <your-user-key>
#   device = <your-device-string(optional)>
po:
    class_name: Pushover
    class_path: plugins.pushover
    apiKey: <your-api-key>
    userKey: <your-user-key>
#   device: <your-device-string(optional)>

Description of the attributes:

  • apiKey: set api-key globally of the sending application
  • userKey: set user-key globally so it will be used as defaul receiving user - you can override this on each call
  • device: set receiving device globally to filter the receive device - you can override this on each call - you can define multiple devices seperated by comma - this is optional - without all devices will receive messages

Usage:

sh.po(title, message [, priority] [, retry] [, expire] [, sound] [, url] [, url_title] [, device] [, userKey] [, apiKey])

Send a message to your device.

Parameters

  • title: The title of the message
  • message: The message - some html code possible, read https://pushover.net/api#html
  • priority: Priority of the message - read https://pushover.net/api#priority
  • retry: when Emergency priority set, this specifies how often (in seconds) the Pushover servers will send the same notification to the user - read https://pushover.net/api#priority
  • expire: when Emergency priority set, this specifies how many seconds your notification will continue to be retried for (every retry seconds) - read https://pushover.net/api#priority
  • sound: override a user's default tone choice on a per-notification basis - read https://pushover.net/api#sounds
  • url: adds a supplementary URL that is not included in the message text, but available for the user to click on - read https://pushover.net/api#urls
  • url_title: the title for the a supplementary URL - read https://pushover.net/api#urls
  • device: defines and/or override the globally defined name of the receiving device
  • userKey: defines and/or override the globally defined user-key of the receiving user
  • apiKey: defines and/or override the globally defined api-key of the sending application

All params can set to None (only message not), so they will not be set or in case of device, userKey and apiKey the global vars will be used.

Example

# send simple message, without title (this are the min. params you need, if you defined userKey and apiKey globally)
sh.po(None, "This is my test message.")

# send simple message, with title
sh.po("Simple Test", "This is my test message.")

# send a high priority message
sh.po("Warning", "Your door is not locked!", 1)

# send simple message to device with id: e6653
sh.po("Simple Test", "This is my test message", None, None, None, None, None, None, "e6653")