FHEM

Send Push-Notifications by pushsafer.com to iOS, Android and Windows 10 devices out of FHEM - perl server for house automation

Current plugin description

the latest plugin description with all available parameters you get herehttp://fhem.de/commandref.html#Pushsafer

Download

http://fhem.de/fhem.html#Download

Define

    define <name> Pushsafer <key>

    The parameter <key> must be a alphanumeric string. This can be a regular private key (20 digits) from your Pushsafer account or an E-Mail alias key (15 digits) which needs to be setup in your account.

    Example:
      define PushsaferAccount Pushsafer A1b2c3D4E5F6g7h8i9J0/ul>

    Set
      set <name> message <text> [<option1>=<value> <option2>=<value> ...]

      Currently only the message command is available to sent a message.

      So the very basic use case is to send a simple text message like the following example:

      set PushsaferAccount message "My first Pushsafer message."

      To send a multiline message, use the placeholder "\n" to indicate a newline:

      set PushsaferAccount message "My second Pushsafer message.\nThis time with two lines."

      Optional Modifiers

      It is possible to customize a message with special options that can be given in the message command after the message text. Several options can be combined together. The possible options are:

      title     - short: - type: text - A special title for the message text.
      device    - short: - type: text - The device ID as number, to send the message to a specific device, or "gs" + group ID to send to a device group (e.g. "gs23" for group id 23). By default the message will be send to all registered devices.
      sound     - short: - type: number - The ID of a specific sound to play on the target device upon reception (see Pushsafer.com for a complete list of values and their meaning).
      icon      - short: - type: number - The ID of a specific icon to show on the target device for this text (see Pushsafer.com for a complete list of values and their meaning).
      vibration - short: - type: number - The number of times the device should vibrate upon reception (maximum: 3 times; iOS/Android only). If not set, the default behavior of the device is used.
      url       - short: - type: text - A URL that should be included in the message. This can be regular http:// URL`s but also specific app schemas. See Pushsafer.com for a complete list of supported URL schemas.
      urlText   - short: ut - type: text - A text that should be used to display a URL from the "url" option.
      key       - short: - type: text - Overrides the private key given in the define statement. Also an alias key can be used.
      ttl       - short: - type: number - Defines a "time-to-live" given in minutes after the message will be deleted on the target device(s). Possible range is between 1 - 43200 minutes (30 days).
      picture   - short: - type: text - Attach a image to the message. This can be a file path located in your filesystem (e.g. picture=/home/user/picture.jpg) or the name of a IPCAM instance (like picture=IPCAM:<name>) to send the last snapshot image (e.g. picture=IPCAM:IpCam_Front_House). The supported image formats are JPG, PNG and GIF.
      picture2  - short: p2 - type: text - same syntax as for option "picture"
      picture3  - short: p3 - type: text - same syntax as for option "picture"

      Examples:

        set PushsaferAccount message "This is a message with a title." title="Super important"
        set PushsaferAccount message "Get down here We are waiting" title="Lunch is ready" device=100
        set PushsaferAccount message "Server is down" sound=25 icon=5 vibration=3
        set PushsaferAccount message "Look at my photos" url="http://www.foo.com/myphotos" urlText="Summer Vacation"

        It is also possible to use the short-term versions of options:

        set PushsaferAccount message "This is a message with a title." t="Super important"
        set PushsaferAccount message "Get down here\nWe are waiting" t="Lunch is ready" d=100
        set PushsaferAccount message "Server is down" s=25 i=5 v=3
        set PushsaferAccount message "Look at my photos" u="http://www.foo.com/myphotos" ut="Summer Vacation"


    Get
      N/A

    Atributes
    • do_not_notify
    • disabledForIntervals
    • readingFnAttributes


    Generated Readings/Events:
    • lastSuccess - The last successful status message received by the Pushsafer server
    • lastError - The last errur message received by the Pushsafer server
    • availableMessages-<device ID>-<device name> - The remaining messages that can be send to this device

For more information about replacing values (title, message, icon, icon color, sound, vibration) in your push notification, check out our API description!


© 2016 - 2024 Pushsafer.com, All rights reserved.