Author Topic: Push Notification Plugin  (Read 125966 times)

Offline Massalia

  • Full Member
  • ***
  • Posts: 166
  • Karma: +2/-0
Push Notification Plugin
« on: August 13, 2012, 06:35:22 pm »
    Current Version : 0.98
    If you are a Push Over user, upgrade to this version and use your Own Application Key.

    Hi, All
    A plugin for sending notification using the following Push Services
    Notes about service limitations:
    Prowl : Have a limit of 1000 messages per hour
    PushOver : Messages limit per Month (Use Custom Application key to allow 7500 messages Per User/Per Month) , Messages are currently limited to 512 characters, including a title. Supplementary URLs are limited to 500 characters, and URL titles to 50 characters.
    Toasty : Image file must be in .png format and no larger than 128x128 pixels.
    XendApp : No restriction founds on provider Web Site.


    General Functions
    • Summary Tab
    • Tab for Each Service Parameters
    • Last Error/Succes repport on Dashborad
    • Ability to reset number of sent message for each service
    • Ability to send test message for each service from the setup tab
    Prowl Functions
    • HTTPS connexion to server to preserve your ID
    • Add serial of sending Unit to subject
    • Use priority in notification
    • Ability to Add URL in notification
    PushOver Functions
    • Allow custom application key (Allow 7500 Messages per User/per Month)
    • HTTPS connexion to server to preserve your ID
    • Add serial of sending Unit to subject
    • Use priority in notification
    • Ability to Add URL in notification
    • Ability to Add URL Title in notification
    • Ability to change notification sound
    Toasty Functions
    • Add serial of sending Unit to subject
    • Add your own image in notification
    XendApp Functions
    • Add serial of sending Unit to subject
    • Use multiple channels for notification

    Tested only with UI5 on Vera Lite (1.5.408)

    VERSION HISTORY
    • 0.5 Initial public release
    • 0.6 Add priority, and URL parameters
    • 0.7 Add PushOver support, Change summary Tab, Add Tabs for service setup, Prowl remaining messages and reset date are now moved on Prowl Tab
    • 0.8 Add URL, URL Title Priority to PushOver service, GUI modification, Bug Fixes, Rename to Push Notification
    • 0.9 Change PushOver service usage, Bug Fixes, New Icon
    • 0.91 Add new PushOver Quiet priority
    • 0.92 Add new PushOver Per-notification Sounds function (Require Version 1.5+ of Mobile Application), and Ability to send Test message from Setup Tab.
    • 0.93 Add toasty Service Support, Move test message to specific tab, Improve PushOver code.
    • 0.94 Add toasty image notification.
    • 0.95 Extend PushOver API Usage.
    • 0.98 Add XendApp Notification, Remove PushOver Limits by using your Own application Key.

    INSTALLATION
    Automatic Installation version may be older due to validation Delay

    Automatic
    https://apps.mios.com/plugin.php?id=2508

    Manual
    Upload the plugin files :
    - In the Toolbox section open MiOS Developers >> Luup Files and upload all the files you downloaded. check the Restart Luup after upload checkbox and click GO.

    Create the IOS Notification Device:
    - Open Create Device.
    - In the UpnpDevFilename input box enter D_IosPush.xml
    - In the Upnp Implementation Filename input box enter I_IosPush.xml
    - In the Description input box enter a name for the panel device, e.g. My Push Notification.
    - Click Create device.
    - Close this window and Save.

    Configuration
    Go to the corresponding service Tab and Fill the required parameters


    Advanced Configuration
    - In the device advanced control tab, you can find the following parameters (See screenshot)

    • Plugin Version
    • Plugin ID (Internal Usage)
    • Status (Unused)
    • Last Error message with readable time
    • Message (Update notification ... )
    • Prowl API Key
    • Prowl Application Name
    • Add serial of sending Unit to Prowl notification
    • Prowl Default Priority
    • Number of successfull Prowl notification sent
    • Number of remaining usable prowl message for the actual period
    • Timestamp of prowl reset date
    • PushOver User Key
    • PushOver Custom Application Key  (Details here)
    • Activate Use of your Custom Application Key
    • PushOver Application Name
    • PushOver Default Sound
    • PushOver Sounds List
    • Add serial of sending Unit to PushOver notification
    • PushOver Default Priority
    • Number of successfull PushOver notification sent
    • Timestamp of last Error
    • Timestamp of last successful send
    • Toasty Device ID
    • Add serial of sending Unit to Toasty notification
    • Toasty Application Name
    • Number of successfull Toasty notification sent
    • XendApp UserName
    • XendApp Password
    • XendApp Application Name
    • XendApp channel Name List
    • XendApp channel ID List
    • XendApp Default Channel
    • XendApp Message Encryption
    • XendApp Content type Option ( Can be 1 or 2). 1 - PlainText, 2 - HTML.)
    • Add serial of sending Unit to XendApp notification
    • Number of successfull XendApp notification sent
    • Prowl API message URL
    • PushOver API message URL
    • PushOver API Sound List URL
    • Toasty API URL
    • Toasty Image URL
    • XendApp API URL
    • Debug Flag

    USAGE IN SCENE
    You just have to fill informations in bold the other can be left blank if not used

    SendProwlNotification action
    Send a notification using Prowl service
    • Event
    • Description
    • Priority
    • URL
    The value for priority can be :
    -2 Very Low
    -1 Moderate
     0 Normal
     1 High
     2 Emergency

    SendPushOverNotification action
    Send a notification using PushOver service
    • Title
    • Message
    • Priority
    • URL
    • URL Title
    • Sound
    The value for priority can be :
     0 Normal
     1 High
    -1 Quiet

    The value for sound can be :
    bike
    bugle
    cash Register
    classical
    cosmic
    falling
    gamelan
    incoming
    intermission
    magic
    mechanical
    piano Bar
    siren
    space Alarm
    tug Boat

    This list can change and is automaticaly updated from PushOver web site, so if you want the last updated list,
    use pushoversoundlist field in the advanced tab.

    SendToastyNotification action
    Send a notification using toasty service
    • Title
    • Message
    • ImageUrl

    SendXendAppNotification
    • Title
    • Message
    • Channel
      (Not mandatory if you specify a default channel)

    [/list]

    ResetProwlCount action
    Reset Prowl count of sent message(s)

    ResetPushOverCount action
    Reset PushOver count of sent message(s)

    ResetToastyCount action
    Reset toasty count of sent message(s)

    ResetXendAppCount action
    Reset XendApp count of sent message(s)

    USAGE IN CODE

    Assuming that the Plugin was installed as Device 99, the following tests should work. Your installation will have a different Device number, please adjust accordingly.
    Code: [Select]
    luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendProwlNotification",{ Event= "Title", Description="Message", Priority=2, URL=""}, 99)

    luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendPushOverNotification",{ Title= "Title", Message="Message", Priority=1, URL="", URLTitle="", Sound="Siren"}, 99)

    luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendToastyNotification",{ Title= "Title", Message="Message", ImageURL="" }, 99)

    luup.call_action("urn:upnp-org:serviceId:IOSPush1", "SendXendAppNotification",{ Subject= "Subject", Message="Message", Channel="<ChannelID>" }, 99)



    « Last Edit: August 21, 2013, 10:07:06 am by Massalia »

    Offline Massalia

    • Full Member
    • ***
    • Posts: 166
    • Karma: +2/-0
    Re: IOS Push Notification Plugin
    « Reply #1 on: August 13, 2012, 06:52:38 pm »
    Reserved for more documentation.
    « Last Edit: May 16, 2013, 12:15:44 pm by Massalia »

    Offline parkerc

    • Sr. Hero Member
    • ******
    • Posts: 2458
    • Karma: +35/-48
    • Life Moves Pretty Fast....
    Re: IOS Push Notification Plugin
    « Reply #2 on: August 13, 2012, 07:07:38 pm »
    Looks great !!

    I've been using the code for this, so I'm looking forward to being ablework with the UI, which for me is easier to use/understand.

    Keep up the great work !!

    I've seen your recent email notification post and now this one, So I look forward to seeing what comes next ;)

    Offline parkerc

    • Sr. Hero Member
    • ******
    • Posts: 2458
    • Karma: +35/-48
    • Life Moves Pretty Fast....
    Re: IOS Push Notification Plugin
    « Reply #3 on: August 14, 2012, 05:12:15 pm »
    Hi Massalia

    I've just created the device and run it a few time and it works really well - thank you again for sharing ...

    Out of interest do you have any plans to add more options to the input values from the API (http://www.prowlapp.com/api.php)  e.g. Priority, URL etc ?


    Offline Massalia

    • Full Member
    • ***
    • Posts: 166
    • Karma: +2/-0
    Re: IOS Push Notification Plugin
    « Reply #4 on: August 15, 2012, 05:21:52 am »
    @parkerc, it was enough to ask ;-)

    New version 0.6 just published with new priority and URL parameters available in scene.

    « Last Edit: August 23, 2012, 05:00:59 pm by Massalia »

    Offline davidd1205

    • Full Member
    • ***
    • Posts: 158
    • Karma: +0/-0
    Re: IOS Push Notification Plugin
    « Reply #5 on: August 15, 2012, 06:40:44 am »
    Hello

    good job  ;)

    possible to do a plugin with pushinbox ?

    thanks

    Offline davidd1205

    • Full Member
    • ***
    • Posts: 158
    • Karma: +0/-0
    Re: IOS Push Notification Plugin
    « Reply #6 on: August 15, 2012, 10:41:18 am »
    @davidd1205

    That was my initial plan but it's impossible now to install pushingme.to App from Appstore, it raise an error.
    I send a message to the support and i've got ... no answer.

    If someone can send me the Iphone IPA file in private (The apps is free, so no piracy stuff),  i can install it and add the required code.

    it's not pushme it's http://www.pushingbox.com/
    this service send notification to pushme ,android and karotz etc..

    Offline Massalia

    • Full Member
    • ***
    • Posts: 166
    • Karma: +2/-0
    Re: IOS Push Notification Plugin
    « Reply #7 on: August 15, 2012, 11:01:21 am »
    @davidd1205

    Ooops misreading sorry, Yes i can do it, but probably in a new plugin.
    I'm just finishing PushOver Integration before.
    « Last Edit: August 15, 2012, 11:25:11 am by Massalia »

    Offline davidd1205

    • Full Member
    • ***
    • Posts: 158
    • Karma: +0/-0
    Re: IOS Push Notification Plugin
    « Reply #8 on: August 16, 2012, 04:31:54 am »
    @davidd1205

    Ooops misreading sorry, Yes i can do it, but probably in a new plugin.
    I'm just finishing PushOver Integration before.

    no worries ....


    I did not know pushover I'll test on my android and my ios

    thank you anyway for your work it will simplify notificaqtions for vera

    Offline Massalia

    • Full Member
    • ***
    • Posts: 166
    • Karma: +2/-0
    Re: IOS Push Notification Plugin
    « Reply #9 on: August 17, 2012, 09:19:50 am »
    New version 0.7 just published with new GUI improvment and Basic PushOver service support.

    See first post for details, and roadmap.

    Offline garrettwp

    • Beta Testers
    • Master Member
    • *****
    • Posts: 6371
    • Karma: +227/-128
    • Vera 3, Lite, ISY994
    Re: IOS Push Notification Plugin
    « Reply #10 on: August 17, 2012, 09:28:08 am »
    Great work Massalia. I will give the plugin a go with the PushOver service as I only use android devices.

    - Garrett

    Offline kiwi

    • Sr. Newbie
    • *
    • Posts: 43
    • Karma: +0/-0
    Re: IOS Push Notification Plugin
    « Reply #11 on: August 23, 2012, 10:15:07 am »
    Hi Massalia,

    I have tested 0.7 with Prowl on UI5 1.5.408...

    Seems that the plugin doesn't keep my prowl API key... Is this normal ?

    It still keep old values even after "press" save button ?

    /xavier
    --
    Vera3 UI5 1.5.408 -

    Offline Massalia

    • Full Member
    • ***
    • Posts: 166
    • Karma: +2/-0
    Re: IOS Push Notification Plugin
    « Reply #12 on: August 23, 2012, 01:21:42 pm »
    @kiwi

    After uploading or updating files, you must
    • Restart Luup engine
    • Refresh your web page in your browser
    « Last Edit: September 23, 2012, 10:35:49 am by Massalia »

    Offline Massalia

    • Full Member
    • ***
    • Posts: 166
    • Karma: +2/-0
    Re: Push Notification Plugin
    « Reply #13 on: August 23, 2012, 04:35:34 pm »
    New version 0.8 just published with new GUI improvment and PushOver full service support.
    Add per service message count and reset function. BugFix

    See first post for details, and roadmap.
    « Last Edit: August 23, 2012, 04:45:23 pm by Massalia »

    Offline kiwi

    • Sr. Newbie
    • *
    • Posts: 43
    • Karma: +0/-0
    Re: Push Notification Plugin
    « Reply #14 on: August 24, 2012, 10:02:13 am »
    Hi !

    0.8 works much better, BTW I have installed it using apps.mios.com that push the installation..

    I can confirm now that plugin remember my prowl settings :) But went sending some event I get : Missing file... error see captures :)
    --
    Vera3 UI5 1.5.408 -