This repository has been archived and is no longer maintained. For continued functionality and improvements, please check out the Xfinity Hassio Add-On repository instead.
Fetch Xfinity data usage and serve it via an HTTP endpoint, publish it to MQTT or post it to an URL.
config.yml
located in the /config
directory
xfinity
Xfinity Account credentials are required.
Option | Description | |
---|---|---|
username | required | Username for Xfinity, can be defined as an environment variable XFINITY_USERNAME |
password | required | Password for Xfinity, can be defined as an environment variable XFINITY_PASSWORD |
interval | The interval at which to update usage data. Defaults to 60 minutes. | |
pageTimeout | Number of seconds until request times out. Defaults to 30 seconds |
http (optional)
Enable HTTP endpoints for most recent data. Defaults to port 7878.
Raw data at http://ipaddress:7878
Home Assistant rest sensor at http://ipaddress:7878/homeassistant
post (optional)
Enable posting of data after an update to the provided URL.
Option | Description | |
---|---|---|
url | required | URL where to post usage data to |
mqtt (optional)
Option | Description | |
---|---|---|
host | required | Address of MQTT server |
port | Port of MQTT server defaults to 1883 |
|
username | Username for MQTT server, can be defined as an environment variable MQTT_USERNAME | |
password | Password for MQTT server, can be defined as an environment variable MQTT_PASSWORD | |
topic | required | Topic to publish usage data to if Home Assistant is not set |
homeassistant | When set will publish to auto-discovery topics | |
homeassistant.prefix | Auto discovery prefix topic. Defaults to homeassistant |
Complete config
xfinity:
username: USERNAME
password: PASSWORD
interval: 60
http:
post:
url: http://localhost:1880/xfinity
mqtt:
host: localhost
port: 1883
username: USERNAME
password: PASSWORD
topic: xfinity
homeassistant:
prefix: "homeassistant"
XFINITY_USERNAME
- Xfinity usernameXFINITY_PASSWORD
- Xfinity passwordXFINITY_RECORD_VIDEO
- Record video of the browser session. Defaults tofalse
XFINITY_RECORD_VIDEO_DIR
- Directory to save the video. Defaults to/config
MQTT_USERNAME
- MQTT usernameMQTT_PASSWORD
- MQTT password
version: '3.7'
services:
xfinity:
image: zachowj/xfinity-data-usage:latest
container_name: xfinity
restart: unless-stopped
ports:
- 7878:7878
volumes:
- config:/config
environment:
TZ: America/Los_Angeles
LOGGING_LEVEL: info
/config
- Directory for the config file
The logging level can be changed by adding the environment variable LOGGING_LEVEL
. Default level is info
.
Valid log levels: error
, warn
, info
, verbose
, debug
, silly
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- zachowj - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details.