pushover not working

Free domotica! Forums How can I …? Synology NAS pushover not working

This topic contains 16 replies, has 4 voices, and was last updated by  K.Rens 1 year, 5 months ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #2554

    matthijsvanroemburg
    Participant

    hello,

    i use the usb stick with my synology NAS.
    it’s the ZU1401 Z-Wave.

    I also have the Fibaro FGK101 Door opening sensor.

    i have everything working on my NAS.
    if i look in the PulseStation dashboard i can see my sensor. if it is “closed” the state is is off en when i activate the sensor, the status changed to on.

    so by this knowlegde I know my sensor is working and correct.

    I configured and create a pushover account.
    from their website i can send myself a test message.
    i also create a application for pulsestation.
    so i get a api key.

    What i want to build, for example, is this

    if my frontdoor is open, i want to get a message from pushover.
    if my frontdoor is closed, i want to get a message from pushover.

    problem: i don’t get a notifaction.
    what am i missing??

    here’s is my blockly.

    and the php

    $event = “empty”;
    if(isset($argv[1])){
    $event = $argv[1];
    }

    if(!function_exists(“getValue”)){
    function getValue($service,$deviceid, $valueid){
    $abspath = dirname(__FILE__);
    $datapath = $abspath.DIRECTORY_SEPARATOR.”..”.DIRECTORY_SEPARATOR.$service.”.json”;
    $content = file_get_contents($datapath);
    $json = json_decode($content);
    foreach($json as $object){
    if($object->id == $deviceid){
    $values = array();
    if(isset($object->values)){
    $values = $object->values;
    }
    foreach($values as $value){
    if($value->id == $valueid){
    $v = “”;
    if(isset($value->value)){
    $v = $value->value;
    }
    return $v;
    }
    }
    }
    }
    return “”;
    }
    }

    if(!function_exists(“setValue”)){
    function setValue($service,$deviceid, $valueid,$value){
    $url = “http://localhost:4020/message=”;
    $message = “1|scene|”.$service.”|UPDATEPROPERTY|”.$deviceid.”|”.$valueid.”|”.$value;
    $messageURL = $url . rawurlencode($message);
    file_get_contents($messageURL);
    sleep(1);
    }
    }

    if(!function_exists(“sendPushover”)){
    function sendPushover($apptoken, $userkey,$title, $message, $priority, $sound){
    curl_setopt_array($ch = curl_init(), array(
    CURLOPT_URL => “https://api.pushover.net/1/messages.json”,
    CURLOPT_POSTFIELDS => array(
    “token” => $apptoken,
    “user” => $userkey,
    “priority” => $priority,
    “sound” => $sound,
    “title” => $title,
    “message” => $message,
    ),
    CURLOPT_SAFE_UPLOAD => true,
    ));
    curl_exec($ch);
    curl_close($ch);
    }
    }

    if ($event == ‘zwave-2_ON’) {
    sendPushover(getValue(“pushover”,”pushover-2″,”1″),getValue(“pushover”,”pushover-2″,”2″),’Sensor ON’,’Motion Start’,”2″,”pushover”);} else if ($event == ‘zwave-2_OFF’) {
    sendPushover(getValue(“pushover”,”pushover-2″,”1″),getValue(“pushover”,”pushover-2″,”2″),’Sensor OFF’,’Motion end’,”2″,”pianobar”);}

    #2556

    Coyote
    Member

    Hi,

    I think this is not a pushover problem. To see that, try to make a rule with only pushover (If time = xx: xx then … Pushover)… and maybe you’ll receive your notification.
    Put ‘Add log’ block in your scene too, and you’ll see if the loop is oki or not.

    I think that your problem comes from ‘Device event’ block.. Many people have problem with this block that stop well working with the last version of PulseStation.
    Try to watch your ‘scene.log’ and ‘core.log’ to see if you can find something with ‘event’ inside …

    I think that Mika is aware about this. 😉

    JMarc

    #2557

    matthijsvanroemburg
    Participant

    hello

    i made this

    but still nothing happend.
    i can’t find the “addlog” in blockly.

    and just to be sure, i just make a blockly, save it and than it’s became actief?

    #2558

    Coyote
    Member

    ok,

    1) ‘add log’ block is at the end of the ‘util’ panel, and will add a text in the scene.log (if the loop is correct)
    2) You have to add PushOver on your cellphone (PlayStore for exemple), and check that your device is added on your PushOver acount on the web (In ‘Your devices’ list)
    3) Get your USER Key and API Token key from your PushOver account
    3) Make sure that pushover service is started in PulseStation, and that you’ve put the right token and user key caracters in the property tab.
    4) Your simple rule seems to be great.. It should work if you do all this steps before..

    Good luck 😉

    JMarc

    #2559

    matthijsvanroemburg
    Participant

    I did find the “Add Log”.:)

    in the “scene log” I find this:

    2016-01-30 21:13:00 Periodic : End
    2016-01-30 21:14:00 Periodic : Start
    2016-01-30 21:14:00 Periodic : End
    2016-01-30 21:14:01 MATTHIJS LOG
    2016-01-30 21:15:00 Periodic : Start
    2016-01-30 21:15:00 Periodic : End

    in the “core log” I find this:

    2016-01-30 21:14:00.520 scene : Message received – 1|scene|scene|CHECKSCENESPERIODIC|1454184840476|4f25b0b73882fe544e003a0eb1919e0e
    2016-01-30 21:14:00.628 Message In Core : 9|4f25b0b73882fe544e003a0eb1919e0e|3|scene|HUB|1|CHECKSCENEPERIODIC_OK
    2016-01-30 21:14:00.973 pushover : Message received – 1|pushover|pushover|CHECKPERIODIC|1454184840937|2ab050cd3a58443e59b2284960caa617
    2016-01-30 21:14:01.087 vdevices : Message received – 1|vdevices|vdevices|CHECKPERIODIC|1454184841059|5b0384c046b892661390c30acfefaf54
    2016-01-30 21:14:01.853 Forwarding message : 0|HUB|HUB|AUTORESTART
    2016-01-30 21:14:02.041 Message Finished, remove it from the stack (0|HUB|HUB|AUTORESTART)
    2016-01-30 21:14:11.056 Forwarding message : 0|HUB|HUB|AUTORESTART
    2016-01-30 21:14:11.243 Message Finished, remove it from the stack (0|HUB|HUB|AUTORESTART)
    2016-01-30 21:14:21.257 Forwarding message : 0|HUB|HUB|AUTORESTART
    2016-01-30 21:14:21.455 Message Finished, remove it from the stack (0|HUB|HUB|AUTORESTART)
    2016-01-30 21:14:31.466 Forwarding message : 0|HUB|HUB|AUTORESTART
    2016-01-30 21:14:31.654 Message Finished, remove it from the stack (0|HUB|HUB|AUTORESTART)
    2016-01-30 21:14:41.664 Forwarding message : 0|HUB|HUB|AUTORESTART
    2016-01-30 21:14:41.852 Message Finished, remove it from the stack (0|HUB|HUB|AUTORESTART)
    2016-01-30 21:14:51.864 Forwarding message : 0|HUB|HUB|AUTORESTART
    2016-01-30 21:14:52.052 Message Finished, remove it from the stack (0|HUB|HUB|AUTORESTART)
    2016-01-30 21:15:00.205 vdevices : Message received – 1|vdevices|vdevices|CHECKPERIODIC|1454184900145|029ead93e8539fc25c55f2abe0303d6b
    2016-01-30 21:15:00.253 pushover : Message received – 1|pushover|pushover|CHECKPERIODIC|1454184900224|504720d6026b3f41970854180ebc8a16
    2016-01-30 21:15:00.597 scene : Message received – 1|scene|scene|CHECKSCENESPERIODIC|1454184900562|9e8dba32a8ee729e69c44fd84f300891
    2016-01-30 21:15:00.708 Message In Core : 9|9e8dba32a8ee729e69c44fd84f300891|3|scene|HUB|1|CHECKSCENEPERIODIC_OK
    2016-01-30 21:15:01.068 Forwarding message : 0|HUB|HUB|AUTORESTART
    2016-01-30 21:15:01.257 Message Finished, remove it from the stack (0|HUB|HUB|AUTORESTART)

    #2560

    Coyote
    Member

    Try to remove the ’emergency mode’ in the ‘pushover’ bloc.. Leave the ‘normal mode’ in the priority box.

    JM

    #2561

    K.Rens
    Keymaster

    Inside your log I see:
    2016-01-30 21:14:01 MATTHIJS LOG

    This means that either:
    1) You have set wrong parameters inside the pushover service.
    2) Or: the version you are running on has a broken pushover service.
    This could be the case, as I am running on the beta version and that one is working, just tested your rule.
    I remember Mika fixed something on Pushover, but I do not know whether it is broken in your release or only in a previous beta.
    A new release is coming soon, which will have it fixed.
    And otherwise contact me in case you want to become a beta tester and have it fixed now 😉

    Kind regards,
    K.Rens

    #2562

    matthijsvanroemburg
    Participant

    i changed the emergency mode to normal.
    now it works.

    and as i understand now, if the blockly rule is activated/triggered, it will create a log in “scene log”.

    that’s nice.

    so I started this problem thinking it was the pushover message that was the problem, but it basically is that my scene doesn’t do anything.

    i build the blockly

    bud it doesn’t show up in the scene log. but my sensor works, according to the dashboard.

    open

    closed

    #2563

    K.Rens
    Keymaster

    Hi,

    The scene (blocky) rule seems to work with time.
    If you use the “add log” block in your “event device” scene, right after the if, do you then see it writing to your logs, or not?

    Dutch: We vinden het wel, de aanhouder wint 😉

    Kind regards,
    K.Rens

    #2565

    Coyote
    Member

    Now you’re face on the same problem we have for the moment with the ‘device event block’ …

    #2566

    K.Rens
    Keymaster

    I confirm Coyote also has issues with this block, but for me it’s working fine.
    We just have to find what is the cause and fix it.
    It cannot be that 2 users have this issue, that’s unacceptable 😉

    Kind regards,
    K.Rens

    #2567

    matthijsvanroemburg
    Participant

    K.Rens,

    i have it like this now:

    is that what you mean?
    i see nothing happening in the scene log.

    what can i do for the device event block?

    #2568

    K.Rens
    Keymaster

    I will contact you directly.
    We didn’t find the issue at Coyote, but maybe your installation reveals more details on the cause.

    Kind regards,
    K.Rens

    #2569

    Coyote
    Member

    As K.Rens said, we have issues with this block.

    You’re like Guillaume (Fibaro smoke sensor post), like Leroymth (janvier 21, 2016 at 11:39) , like Coldbringer and like me..

    Mika knows and is working on association problem..He has an access to my system.
    We have to wait to find the solution 😉

    JMarc

    #2600
    Mika
    Mika
    Keymaster

    I did an update of the zwave service last week. There was some problem with the association.
    Can you try to see if your association are correct ?

    You can also check the zwcfg*.xml file and see if you find something in the association ?

    Note : Dont forget that the associations will be ok once your device woke up.

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.