News for hackers. Stuff that matters.
Re:Getting a push message on your phone when your laptop bat... by userbinator on Sunday June 07, 2015 @09:57AM (#9674619)
This seems like a rather unusual use-case. If I'm leaving my laptop on for a long time, it will either be plugged in or I'll be working on it. In the former case it won't run out of battery, and in the latter case I know how much power is remaining.

I suppose this would be useful for those who need to have their laptop on for long periods of time, but are not actually using it...?

Re:Getting a push message on your phone when your laptop bat... by th0br0 on Sunday June 07, 2015 @07:24AM (#9674195)
Nice idea! But why go all the way with the python venv etc? Just using curl + GCM would seem quite sufficient.

(oh, and: don't you need some app installed either way for receiving the notifications on your phone?

Re:Getting a push message on your phone when your laptop bat... by zapu on Sunday June 07, 2015 @08:56AM (#9674465)
That's correct. Pushbullet does not have any complicated session handshake and management so just a simple request with predefined headers and content will suffice. I use it this way with logstash http output.
Re:Getting a push message on your phone when your laptop bat... by dewey on Sunday June 07, 2015 @07:31AM (#9674215)
You'll have to use the Pushbullet app to receive these notifications.
Re:Getting a push message on your phone when your laptop bat... by dewey on Sunday June 07, 2015 @07:19AM (#9674183)
Is there an equivalent of udev on Mac OS so I don't have to run a cronjob to check the battery percentage all the time? I know how to get the percentage from ioreg but i'd be nice to be able to just listen for that api call like udev does.
Re:Getting a push message on your phone when your laptop bat... by bluerobotcat on Sunday June 07, 2015 @10:38AM (#9674773)
I/O Kit can be used for this. [1]

[1] https://developer.apple.com/library/mac/documentation/Device... (I'm a bit surprised that the docs assume that the reader is implementing a driver. I have used I/O Kit in an app that was available on the App Store.)

Re:Getting a push message on your phone when your laptop bat... by sugarfactory on Sunday June 07, 2015 @09:57AM (#9674620)
I'm paranoid and it makes me sick the fact that there's no push platform that supports encryption. I don't want service providers to know what I push.
Re:Getting a push message on your phone when your laptop bat... by dmd on Sunday June 07, 2015 @10:44AM (#9674799)
Huh? How exactly are they stopping you from sending an encrypted message?
Re:Getting a push message on your phone when your laptop bat... by ianlevesque on Sunday June 07, 2015 @12:39PM (#9675327)
There's no mechanism to decrypt the result before display. So enjoy decrypting AES in your head!
Re:Getting a push message on your phone when your laptop bat... by dmd on Sunday June 07, 2015 @12:56PM (#9675394)
If you're worried about encryption, though, you wouldn't be using their app to display the pushed messages, you'd be using something you control; you only use their push infrastructure as infrastructure.
Re:Getting a push message on your phone when your laptop bat... by RubyPinch on Sunday June 07, 2015 @01:07PM (#9675454)
or just open source

There is still no "compile code, install app, and throw this process on a VPS" solution for pushes, from what I recall

Re:Getting a push message on your phone when your laptop bat... by mryan on Monday June 08, 2015 @02:14AM (#9677461)
Think of it like email: Email is not inherently secure, but there is nothing to stop you sending an encrypted message via email.

So in this case you would push an encrypted message, and your app would decrypt the message before displaying its contents.

Re:Getting a push message on your phone when your laptop bat... by h4waii on Sunday June 07, 2015 @02:47PM (#9675872)
Pushover uses SSL, and then hands off to GCM for notifications. Yes, it's not end to end and you don't control the keys, but it seems to be the best current option and is MILES better than Pushbullet, who have yet to come up with a way to monetize.

https://pushover.net/faq#security

They also have a warrant canary for what it's worth ttps://pushover.net/canary.asc

Re:Getting a push message on your phone when your laptop bat... by darkstar999 on Sunday June 07, 2015 @12:48PM (#9675361)
God forbid anyone know that your battery is low.