Sunday, November 18, 2012

Shared Usage Alerter

Cell companies (Verizon, AT&T, Sprint, T-Mobile, etc.) all offer "family plans" or "share plans" that allow multiple people to share a bucket of minutes, texts, and data. This is an interesting arrangement because as a rule, the cell companies intentionally don't provide a way to limit individual users or the account as a whole. Like banks with their overdraft fees, cell companies enjoy socking customers with overage charges.

To help address this problem, today I wrote a small Python module called Shared Usage Alerter. It's open source, and it comes with a demo program and a unit-test suite. It allows a savvy account administrator (such as a parent) to automatically determine if anyone's usage poses a red flag. The program will detect such usage and generate a warning. The warning can then be emailed to the offender and/or the account administrator.

In addition to preventing inadvertent overages, Shared Usage Alerter also watches for underutilization and notifies users if they should feel free to use more data. (This is very conservative, of course.)

This is not (yet) a push-button operation. The account administrator needs to be familiar with Python and scheduled tasks to make this thing work. The missing piece is integration with the cell phone companies. I actually do not have access to any family/share plan, so I wasn't able to write a screen-scraper for per/user utilization. If you have such access, I'd love to borrow it, with a promise not to vandalize your account. So for now, Shared Usage Alerter requires you to integrate it yourself with your mobile provider. Once you do, run it as frequently as you like. It'll generate warnings, and then you decide what to do with these. (I'd send an email or a text message using an email-to-SMS gateway.)

Finally, here's the output of the demo program:
== Scenario 1 ==
Global status (4.4 / 7.5 GB) is Ok.  Estimated usage by EOBC: 22.0 GB.
Philip the Model Citizen (used 1.0 / 2.0 GB):
        to account admin: Ok.  Est. local use by EOBC: 5.0 / 2.0 GB.
John the Hermit (used 0.1 / 2.0 GB):
        to account admin: Ok.  Est. local use by EOBC: 0.5 / 2.0 GB.
Yuri the Streamer (used 2.2 / 2.5 GB):
        to account admin: Overuse.  Est. local use by EOBC: 11.0 / 2.5 GB.
        to user: Extrapolating your usage to the end of the billing cycle, you may exceed your personal quota.  Be careful.
David the Downloader (used 1.1 / 1.0 GB):
        to account admin: Overage.  Est. local use by EOBC: 5.5 / 1.0 GB.
        to user: Please stop using data.  You've exceeded your portion.  Any additional data you use will steal from someone else's bucket or cause an overage charge that you'll be fully responsible for.

Time flows... we're approaching the end of the billing cycle, but data usage doesn't change

== Scenario 2 ==
Global status (4.4 / 7.5 GB) is Ok.  Estimated usage by EOBC: 5.5 GB.
Philip the Model Citizen (used 1.0 / 2.0 GB):
        to account admin: Underuse.  Est. local use by EOBC: 1.2 / 2.0 GB.
        to user: Rock on... feel free to use more data.  Use it or lose it.
John the Hermit (used 0.1 / 2.0 GB):
        to account admin: Underuse.  Est. local use by EOBC: 0.1 / 2.0 GB.
        to user: Rock on... feel free to use more data.  Use it or lose it.
Yuri the Streamer (used 2.2 / 2.5 GB):
        to account admin: Ok.  Est. local use by EOBC: 2.8 / 2.5 GB.
David the Downloader (used 1.1 / 1.0 GB):
        to account admin: Overage.  Est. local use by EOBC: 1.4 / 1.0 GB.
        to user: Please stop using data.  You've exceeded your portion.  Any additional data you use will steal from someone else's bucket or cause an overage charge that you'll be fully responsible for.

No comments:

Post a Comment