One thing that has come up a couple of times recently is student projects that require sending alerts or notifications to their phone from the project they’ve built. Immediately the mind turns to, “why not send an SMS or Email?”. Without getting into the detail, to do SMS or Email results in needing to choose to sacrifice one of the three things you want: (1) ease of setup, (2) reliable & prompt delivery, (3) zero or almost zero financial cost. … you can have two of those things but not all three.
The next place my mind turns to is, “I wonder how viable it would be to send a message via Instagram or Whatsapp” since most students already have those on their phones. Unfortunately, this also fails the “ease of setup” test.
Last time I looked at this, I successfully helped a student integrate the Slack messaging tool. Their documentation was a bit unintuitive but one evening of playing with it was all it took. If you ever want the sample code for that, send me a message.
I’ve been looking at the topic again this evening for another student, and I think I’ve decided that next time I’ll try Telegram rather than Slack (with Twitter being my next fallback option if required).
- Telegram developer documentation
- Python Telegram bot library
- Code snippets for sending messages, attachments etc
- Official “vanilla” demos
- Some more interesting example projects
Telegram looks really good, and probably about as simple to program as it get could get. You can use it to send attachments such as images, and have the phone user send reply messages back to your project. Some of the example projects are really interesting, everything from setting a Raspberry Pi powered alarm clock, through to running sudo commands on your server (Paolo that one’s for you). Should be some good fun to play with.
For the record, in case anyone particularly wants Twitter, take a look at the Tweepy library and this additional tut here). Finally another product that made it onto my shortlist but costs (an admittedly trivial) $5 after 7 days trial was pushover.net.