Xfinity Data Usage app for Hubitat

I was looking at a Docker container Docker Hub that monitors Xfinity data usage. I was able to implement the container and it creates a web server that makes a call to your Xfinity account every hour.

It returns several lines to a webserver it creates, but the last line is key:


Ideally, I am looking for an APP that would be able to extract the current usage from this routine so that I can access it in a Hubitat rule.

Does anyone else think this is a good idea? My Xfinity ISP limits me to 1200MB = 1.2TB per month which they calculate by total up and total down added together.

I think you could write a device driver for this. Barring that you might be able to use the Post in RM and parse it out and store the values in variables. There’s also a home assistant sensor that you could pull into hubitat if you’re already running HA.

I am not running Home Assistant. Maybe it is worth an instance for this perhaps. I was trying to avoid more complication since my configuration is scary complex and mondo giant.

I remembered you had webcore installed, maybe you can make the call with it and parse the response.

Maybe I can do a http post command and figure out how to parse the data. Good thought.

Did you have trouble with your password after setting this up? I tried it and the docker couldn’t log in to xfinity and now they’re asking me to reset my password. Maybe its not related, I haven’t logged in to xfinity in months..

Initially, I did have an issue. Be sure that your two factor authentication 2FA through the SMS time based one time password (TOTP) is turned off. Mine was on and I turned it off and then used my bitwarden to set a very complex password. After that it worked. I did get a lot of bad logins initially until I got it stabilized. The good part is the author worked on the code even yesterday, so it is an up to date project. I ended up deleting mine because I didn't like my configuration. I think it will work better if I create this as an LXC container and then I have the Docker instances run inside it. Let me know if you have anymore problems and I will be glad to help.

I got my dashboard completed. I will be happy to help if you want.

I got blasted for locking our account and logging off our rokus so I’m going to put this on the back burner for a while.

Your ISP locked your account for checking your data usage? Did they disconnect you? I would have told them we wouldn't need to check if they didn't have data caps. Xfinity charges $10 for each 50GB over the 1200gb monthly quota. They will give you unlimited data for $30 each month. In my opinion this is the same money grubbing tactics that ultimately killed the telephone company Land lines and forced many cell companies to offer unlimited data. Charging for actually using what you bought is a crime.

It was just a security thing on the credentials. Maybe not even related.

I ended up implementing my usage monitor by extracting the data with a Webcore piston.

The xfinity_string is a global variable containing my cumulative usage for the month.
Xfinity_Projected_data is a global variable the provides a project for the end of the month.

Another piston calls this piston and updates the Internet usage on my computer room dashboard.

The actual Docker container zachowj/xfinity-data-usage:latest runs on the hour.

The resulting dashboard looks like this.

Download the Hubitat app