Working with Python 2.7 on Raspberry pi, I created a Pushbullet account and installed it on my iPhone 7 (iOS 12.4). In this instance, I'm using a github library from https://github.com/rbrcsk/pushbullet.py but I've noticed this lag using other methods as well.
Here's the code:
#!/usr/bin/env python
from pushbullet import Pushbullet
PB_API_KEY = 'o.00000000000000000000000000000000'
print("creating pb object with key:")
try:
pb = Pushbullet(PB_API_KEY)
except Exception as e:
print (str(e))
exit()
print("pushing note:")
try:
push = pb.push_note('important subject','this is a test')
except Exception as e:
print (str(e))
exit()
print ("done")
What happens is, when I run this script, it prints "creating pb object with key:" and then it appears to hang. 30 minutes (or so) later the notification appeared on my phone, and I saw that the next two print lines had appeared and the script had completed.
I'm anxious to begin using Pushbullet to push alarm notifications from my PI-GPIO home alarms. It appears to work, but why the big lag?