dgtlmoon/xfinity-data-usage

Fetch Xfinity data usage and serve it via an HTTP endpoint, publish it to MQTT or post it to an URL.

1

stars

165

commits

TypeScript

primary language

Dec 7, 2021

updated

hub.docker.com/r/zachowj/xfinity-data-usage

README

Release Version Docker Pulls License

BuyMeCoffee

Xfinity Data Usage

Fetch Xfinity data usage and serve it via an HTTP endpoint, publish it to MQTT or post it to an URL.

Getting Started

Configuaration

config.yml located in the /config directory

xfinity

Xfinity Account credentials are required.

OptionDescription
usernamerequiredUsername for Xfinity
passwordrequiredPassword for Xfinity
intervalThe interval at which to update usage data. Defaults to 60 seconds.
pageTimeoutNumber 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.

OptionDescription
urlrequiredURL where to post usage data to

mqtt (optional)

OptionDescription
hostrequiredAddress of MQTT server
portPort of MQTT server defaults to 1883
usernameUsername for MQTT server
passwordPassword for MQTT server
topicrequiredTopic to publish usage data to if Home Assistant is not set
homeassistantWhen set will publish to auto-discovery topics
homeassistant.prefixAuto discovery prefix topic. Defaults to homeassistant

imap (optional)

When defined will attempt to reset your Xfinity password when necessary.

OptionDescription
hostrequiredAddress of IMAP server server
portPort of IMAP server defaults to 993
auth.userrequiredUsername for IMAP server
auth.passrequiredPassword for IMAP server

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"

imap:
  host: "imap.gmail.com"
  auth:
    user: "xxxx@gmail.com"
    pass: "longpasscode"

docker-compose

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

Volumes

  • /config - Directory for the config file

Logging

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

Find Us

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contributors

zachowj

125 commits

ronaldheft

2 commits

chrisjsmithnz

1 commits

dgtlmoon/xfinity-data-usage

Fetch Xfinity data usage and serve it via an HTTP endpoint, publish it to MQTT or post it to an URL.

1

stars

165

commits

TypeScript

primary language

Dec 7, 2021

updated

hub.docker.com/r/zachowj/xfinity-data-usage

README

Release Version Docker Pulls License

BuyMeCoffee

Xfinity Data Usage

Fetch Xfinity data usage and serve it via an HTTP endpoint, publish it to MQTT or post it to an URL.

Getting Started

Configuaration

config.yml located in the /config directory

xfinity

Xfinity Account credentials are required.

OptionDescription
usernamerequiredUsername for Xfinity
passwordrequiredPassword for Xfinity
intervalThe interval at which to update usage data. Defaults to 60 seconds.
pageTimeoutNumber 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.

OptionDescription
urlrequiredURL where to post usage data to

mqtt (optional)

OptionDescription
hostrequiredAddress of MQTT server
portPort of MQTT server defaults to 1883
usernameUsername for MQTT server
passwordPassword for MQTT server
topicrequiredTopic to publish usage data to if Home Assistant is not set
homeassistantWhen set will publish to auto-discovery topics
homeassistant.prefixAuto discovery prefix topic. Defaults to homeassistant

imap (optional)

When defined will attempt to reset your Xfinity password when necessary.

OptionDescription
hostrequiredAddress of IMAP server server
portPort of IMAP server defaults to 993
auth.userrequiredUsername for IMAP server
auth.passrequiredPassword for IMAP server

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"

imap:
  host: "imap.gmail.com"
  auth:
    user: "xxxx@gmail.com"
    pass: "longpasscode"

docker-compose

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

Volumes

  • /config - Directory for the config file

Logging

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

Find Us

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contributors

zachowj

125 commits

ronaldheft

2 commits

chrisjsmithnz

1 commits

Languages

TypeScript

94.4%

Dockerfile

5.6%