在Raspberry pi上使用Python2.7时,我创建了一个Pushbullet帐户,并将其安装在我的iPhone 7 (iOS 12.4)上。在本例中,我使用的是来自https://github.com/rbrcsk/pushbullet.py的github库,但我也注意到使用其他方法时出现了这种延迟。
代码如下:
#!/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")发生的情况是,当我运行这个脚本时,它输出"creating pb object with key:“,然后它似乎挂起了。30分钟(大约)后,通知出现在我的手机上,我看到接下来的两行打印已经出现,脚本已经完成。
我迫不及待地想开始使用Pushbullet来推送我的PI-GPIO家用闹钟的报警通知。它似乎是有效的,但为什么会有这么大的滞后呢?
发布于 2019-10-08 04:36:22
这个问题与我的路由器中不正确的ipV6设置有关(例如,由于某种原因,它被启用了)。这给了我一个网关和DNS地址堆栈,在我可以发出请求之前,这些地址必须超时。所以-这个问题与pushbullet无关。
很抱歉这是假警报。
https://stackoverflow.com/questions/58275461
复制相似问题