Solved Using the API to send a notification

Discussion in 'Join' started by ryand, Apr 9, 2016.

  1. ryand

    ryand New Member

    Joined:
    Apr 9, 2016
    Messages:
    6
    Likes Received:
    0
    Hey, so I'm a long time Pushbullet user and my primary use case is sending custom notifications to my phone from my desktop programmatically. For instance, I have scripts on my desktop that monitor various things and then use either the Pushbullet Python package or NodeJS package to send me alerts for certain events (service crashed, build finished, etc).

    It seems like Join could be used to do the same. And I am able to successfully use the API URL to send some text to Join on my phone. But Join doesn't seem to fire any notifications itself when it receives some text. I have to actually open the Join app and look to see the text that was sent. Am I missing something?

    I'm pretty bad at Tasker, but I also tried setting up Tasker profile triggered on the event of Join receiving a push and then running the 'Notify Sound' task with the %jointext. That works but only sometimes, maybe once in 30 pushes. So there's clearly something I'm not understanding in Tasker too.

    Can I do what I want with Join?

    Thanks for any help.
     
  2. ryand

    ryand New Member

    Joined:
    Apr 9, 2016
    Messages:
    6
    Likes Received:
    0
    Ok, my Tasker profiles seem to be working much more reliably after uninstalling and then reinstalling both Tasker and Join and then switching both to run in the foreground. For what it's worth, I'm running CyanogenMod 13. Seems like I can do what I want now. Thanks.
     
  3. ryand

    ryand New Member

    Joined:
    Apr 9, 2016
    Messages:
    6
    Likes Received:
    0
    Hmm, well, no. Seems I'm back to square one and my Tasker profiles are only firing rarely whether Tasker and Join are in the foreground or not. Turning on the Tasker debug log, when it works I get this...

    10-04-2016 M: 09.39.27#M: QUERY PLUGIN: Join Received Push / com.twofortyfouram.locale.intent.action.QUERY_CONDITION 17 bundle keys
    10-04-2016 M: 09.39.27#M: Join Received Push: plugin comp: com.joaomgcd.join/com.joaomgcd.join.tasker.broadcastreceiver.BroadcastReceiverQuery
    10-04-2016 M: 09.39.27#M: send event broadcast pid 9 for Join Received Push
    10-04-2016 M: 09.39.27#M: qpwec: 3: profile not enabled
    10-04-2016 M: 09.39.27#M: qpwec: Join Test: profile not enabled
    10-04-2016 M: 09.39.27.253#M: handleStart: finished handling ID 7
    10-04-2016 WakeLockManager: 09.39.27#WakeLockManager: release: M
    10-04-2016 WakeLockManager: 09.39.27.259#WakeLockManager: cancel clear alarm, lastSetTime 1460306367234
    10-04-2016 WakeLockManager: 09.39.27.261#WakeLockManager: cancelled clear alarm
    10-04-2016 M: 09.39.27#M: received SATISFIED from plugin Join Received Push / Join Received Push Variable Names: Name, status
    10-04-2016 M: 09.39.27#M: check instant activation id: 9: active, not cooling down

    And when it doesn't work, I get the same log pretty much except this line instead of SATISFIED:

    10-04-2016 M: 09.39.33#M: received UNSATISFIED from plugin Join Received Push / Join Received Push Variable Names: Name, status

    Those logs are from back to back pushes using the exact same push URL and arguments. I didn't open Join or Tasker or change anything. In fact, the full log has about 5 or 6 UNSATISFIEDs before finally getting one SATISFIED and then going back to failing.

    Is this a bug or some quirk I'm not understanding?

    Edit: I should also note that if I open Join and click the "TASKER" link on one of my pushes, that reliably triggers my Tasker profile 100% of the time. So I'm less inclined to think this is a Tasker bug or something I've done wrong in my profile there.
     
  4. ryand

    ryand New Member

    Joined:
    Apr 9, 2016
    Messages:
    6
    Likes Received:
    0
    Strange, after rebooting again and no other changes, things seem to be working reliably again. Hopefully it will last this time.
     
  5. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    I'm going to add some features that will allow remote notification creation with the API :) Hope your current solution works for you until then.
     
  6. ryand

    ryand New Member

    Joined:
    Apr 9, 2016
    Messages:
    6
    Likes Received:
    0
    Thanks! Very much looking forward to that. In the meantime I'll keep fiddling with Tasker and keep Pushbullet around a little while longer as a failsafe.
     
  7. ryand

    ryand New Member

    Joined:
    Apr 9, 2016
    Messages:
    6
    Likes Received:
    0
    Hi again, I see you added support for this in the latest update with the Title parameter to the API. Thank you!! It's working perfectly, and the Icon parameter was a nice surprise too. My notifications are looking better than ever and are very reliable now. Awesome work.
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Great! :) Glad you're enjoying it @ryand
     
: join

Share This Page