Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Question

Posted

A scene to use Pushover for push messages.

1. Create global variable: Pushover

2. Create a scene with the following code:

Please login or register to see this code.

3. Replace the lines user and token with the right values

4. replaces the lines pushTitle, pushMsg, priority and sound with your titles, messages, priority and sound. They must have the same amount of options!

5. You can now trigger it in any scene or VD with the following command:

fibaro:setGlobal("Pushover", "DEVICEID.MSGID");

DEVICEID = ID of the device that initiated the trigger

MSGID = ID of the message you want to show. In my example “Dead node” is 1 and "Battery low" is 2 etc. (id of element in array)

DONT FORGET THE DOT!!!

That is it

Please login or register to see this attachment.

8 answers to this question

Recommended Posts

  • 0
Posted

Are you able to push to the same message twice to the same device? I don't think it works twice... the global variable needs clearing after a push? or setting to 0?

[ Added: 2015-01-24, 20:23 ]

Yes if you add

fibaro:setGlobal("Pushover", "SUCCESS");

or

fibaro:setGlobal("Pushover", "ERROR");

to your error handling it will wipe out the previous value each time... i am no programmer but i think it does help?

  • 0
  • Inquirer
  • Posted

    You are right. I adjusted the code somewhat. I cleared the global variable. Need to adjust it to not run when it is empty, but that is for tomorrow

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" />

    Thats why I love this forum, thanks!

    • 0
    Posted

    Nice one..

    Please login or register to see this code.

    Will say everything is ok even if it's actually not (test with a wrong userkey). It's better to actually look at the json response you get from pushover.

    • 0
    Posted

    NO! Thank you this is a great little scene

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Without being awkward what are the chances of adding priority and sound? would polish this off beautifully making it a complete replacement for the built in push!

    • 0
  • Inquirer
  • Posted
    Nice one..

    Please login or register to see this code.

    Will say everything is ok even if it's actually not (test with a wrong userkey). It's better to actually look at the json response you get from pushover.

    Should be fixed.

    Also changed the code if the global variable is empty it will not run.

    [ Added: 2015-01-24, 22:10 ]

    Without being awkward what are the chances of adding priority and sound? would polish this off beautifully making it a complete replacement for the built in push!

    The only way I can fix this is to have a default priority and/or sound per msg, you cannot provide more dots (or other seperator) in a global...

    This is what I added:

    pushTitle = {"Title1", "Title2"};

    pushMsg = {"Msg1", "Msg2"};

    priority = {"0", "1"}

    sound = {"pushover", "siren"};

    So I hope it suits your needs

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Also added a testmode, you have to put it to true and set a value in testvalue and you can just press run to see if it is working. (I tested it with the doorbell and the kids are in bed... so needed a solution

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" />)

    • 0
    Posted

    Excellent

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> very silly why Fibaro do not provide priority notifications for there Alarm Panel considering most people do use silent modes on phones!

    Thanks again for you taking the time to do this... it is much appreciated!

    • 0
    Posted

    Not to piss on your parade but what is the advantage in using this and predefinded VD buttons, if you can only send pre-defined messages?

    I think what I posted a few days back is more versatile, it will allow any message with any priority and any sound to be send at any time to any device, I used sj3fk3's code to create it.

    Please login or register to see this link.

    • 0
    Posted

    Nothing it is an alternative

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />

    Just like Vera is to Home Center 2

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" /> we could argue all day which is the most reliable

    Please login or register to see this image.

    /emoticons/default_icon_wink.gif" alt=";-)" />

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...