Re: PushBullet plugin (Pako)
Posted: Thu Sep 24, 2015 7:03 pm
Some more info on the whole SMS handling:
Some more info on this:
https://plus.google.com/110170333398787 ... JtXGauyhsJ
https://blog.pushbullet.com/2014/06/19/ ... -computer/
https://blog.pushbullet.com/2015/07/15/ ... -computer/
Honestly, I don't totally understand how they are doing this yet.
If I set the "sync sms with my computer" option in PB, then all my native phone texts DO get synced with the PB computer app and I can send and receive them all from my computer.
However, the only event I seem to receive (using EG plugin to monitor the websocket message is):
PushBullet: WebSocket message: {u'push': {u'source_device_iden': u'XXXXXXXXXXXXX', u'type': u'sms_changed'}, u'type': u'push', u'targets': [u'stream']}
Put, the PB computer app sees the text that I received, and allows me to reply. It must be doing this out of band somehow - the first link I sent you might provide some more insight, but I don't think they have really give enough information.
Personally, I use hangouts and everyone uses my GV number, so the standard mirrors are great for me.
My wife however uses the native Verizon messaging app, so the best I can do for her right now is just to pop up a generic alert that an sms arrived - without any backing information.
UPDATE:
I was able to get it to work using the following:
curl --header 'Access-Token: XXXXXXXXXXXXXXXXXXXXXXX' "https://api.pushbullet.com/v2/permanent ... Xx_threads"
as per the googleplus link I send above.
However I'm still not sure how to tell what thread has changed or the syntax in general.
I suppose what needs to happen is that when we get an sms_changed the handler needs to work like your getPhonebook:
And then parse that for the appropriate thread.id to grab the actual data.
It's a little beyond me right now, perhaps you can make quicker sense of it...
UPDATE:
Ok....I figured it out...at least I think to get the most common functionality.
It seems that the latest message will always be the first of the retrieved threads.
So, I've added code to my sms_changed handler to query the threads as soon as the sms_changed comes in.
This way we grab the latest message as the "changed event" and parse that out to present the actual SMS data.
No need to dismiss these messages either because we only get the latest, but I suppose it could be done.
It seems the dismissal for these notificaitons is not the same as for a mirror, so I'm not quite sure how to do it yet.
Attached script update will work to handle these sms messages.
Some more info on this:
https://plus.google.com/110170333398787 ... JtXGauyhsJ
https://blog.pushbullet.com/2014/06/19/ ... -computer/
https://blog.pushbullet.com/2015/07/15/ ... -computer/
Honestly, I don't totally understand how they are doing this yet.
If I set the "sync sms with my computer" option in PB, then all my native phone texts DO get synced with the PB computer app and I can send and receive them all from my computer.
However, the only event I seem to receive (using EG plugin to monitor the websocket message is):
PushBullet: WebSocket message: {u'push': {u'source_device_iden': u'XXXXXXXXXXXXX', u'type': u'sms_changed'}, u'type': u'push', u'targets': [u'stream']}
Put, the PB computer app sees the text that I received, and allows me to reply. It must be doing this out of band somehow - the first link I sent you might provide some more insight, but I don't think they have really give enough information.
Personally, I use hangouts and everyone uses my GV number, so the standard mirrors are great for me.
My wife however uses the native Verizon messaging app, so the best I can do for her right now is just to pop up a generic alert that an sms arrived - without any backing information.
UPDATE:
I was able to get it to work using the following:
curl --header 'Access-Token: XXXXXXXXXXXXXXXXXXXXXXX' "https://api.pushbullet.com/v2/permanent ... Xx_threads"
as per the googleplus link I send above.
However I'm still not sure how to tell what thread has changed or the syntax in general.
I suppose what needs to happen is that when we get an sms_changed the handler needs to work like your getPhonebook:
Code: Select all
'GET',
API + 'permanents/' + sms_devs[dev] + '_threads')It's a little beyond me right now, perhaps you can make quicker sense of it...
UPDATE:
Ok....I figured it out...at least I think to get the most common functionality.
It seems that the latest message will always be the first of the retrieved threads.
So, I've added code to my sms_changed handler to query the threads as soon as the sms_changed comes in.
This way we grab the latest message as the "changed event" and parse that out to present the actual SMS data.
No need to dismiss these messages either because we only get the latest, but I suppose it could be done.
It seems the dismissal for these notificaitons is not the same as for a mirror, so I'm not quite sure how to do it yet.
Attached script update will work to handle these sms messages.