PyBroadcast functions as an Email-SMS gateway, adding a wide range of functionality to SendGrid that it previously lacked. PyBroadcast allows bulk email and SMS broadcasting at the same time through a small, easy to use script. SendGrid's API allows both to be sent simultaneously to the python server, which parses the messages and follows commands 'sendemail' or 'sendsms' found in the messages from SendGrid. On the reverse, SMS can be sent in to the python server and transformed into emails, then broadcast back out. This allows seamless communication while roaming even if there's no wifi or data around.

The inspiration behind this came because my phone carrier, Republic Wireless, does not support Email-SMS and so I cannot send myself messages from my computer to my phone. This project allows me to bypass that deficit and communicate with my phone, both forwards and backwards while away. My current phone plan also does not support any roaming data, so every communication to my device needs to be across SMS if I'm not on wifi. PyBroadcast will, in the future, allow me to function as if I did have data by packaging up files on the server, sending them across SMS to my phone, and recompiling them, ~140 bytes per SMS message, to display appropriately.

My favorite part of the project was the most frustrating and, in the end, the most rewarding. Python has built in libraries for parsing RMTP messages, which look something like this, but the parser fails whenever there are reply chains being parsed. I had to build my own parser using Regular Expressions (RegEx) which was quite the experience, but in the end a simple two lines of code grabbed exactly what was needed from the mess.

I believe the project has multiple real world applications. Without modification, PyBroadcast can be used as an Emergency SMS and Email broadcast system simultaneously. If something happened on campus and necessitated immediate broadcast of 30,000 SMS and Email messages, PyBroadcast could handle it all within half an hour from one script, or many times less with parallel scripts running.

In third world countries, there is nigh ubiquitous cell coverage yet virtually no data. PyBroadcast bypasses this problem and allows data to be sent via SMS along with easy email functionality from the phone.

Built With

Share this project: