Live data from Hacker News

Getting a push message on your phone when your laptop battery is running low

dammit.nl

1–10 of 15 posts

Re: Getting a push message on your phone when your laptop battery is running low

#4
post #3

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?

You'll have to use the Pushbullet app to receive these notifications.

Re: Getting a push message on your phone when your laptop battery is running low

#5
post #3

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?

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 battery is running low

#6
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 battery is running low

#8
post #2

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.

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 battery is running low

#9

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.

Huh? How exactly are they stopping you from sending an encrypted message?

Re: Getting a push message on your phone when your laptop battery is running low

#10
post #9

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.

Huh? How exactly are they stopping you from sending an encrypted message?

There's no mechanism to decrypt the result before display. So enjoy decrypting AES in your head!
Post reply on HN