xfinity-data-usage

by naterator

Helm chartv1.30.0App v0.30.0Verified publisher

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

About this chart

Helm Chart for Xfinity Data Usage

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

To learn more, visit https://github.com/zachowj/xfinity-data-usage.

Prerequisites

  • Kubernetes 1.10+

Installing the Chart

helm repo add naterator https://naterator.github.io/helm-charts/
helm repo update
helm install \
  --set config.xfinity.username=USERNAME_HERE \
  --set config.xfinity.password=PASSWORD_HERE \
  xfinity-data-usage naterator/xfinity-data-usage

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall the xfinity-data-usage release:

helm uninstall xfinity-data-usage

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration parameters

The following table lists the configurable parameters of the Xfinity Data Usage chart and their default values.

ParameterDescriptionDefault
config.xfinity.usernameUsername for Xfinity.""
config.xfinity.passwordPassword for Xfinity.""
config.xfinity.intervalInterval at which to update usage data (in minutes).60
config.xfinity.pageTimeoutNumber of seconds until request times out (in seconds).30
config.httpEnable HTTP endpoints for most recent data.true
config.post.urlURL where to post usage data to.unset
config.mqtt.hostAddress of MQTT server.unset
config.mqtt.portPort of MQTT server.unset
config.mqtt.usernameUsername for MQTT server.unset
config.mqtt.passwordPassword for MQTT server.unset
config.mqtt.topicTopic to publish usage data to if Home Assistant is not set.unset
config.mqtt.homeassistant.prefixAuto discovery prefix topic.unset
replicaCountNumber of pod replicas. Only one replica is currently supported.1
image.repositoryRepository of the container image.docker.io/zachowj/xfinity-data-usage
image.tagTag of the container image.latest
image.pullPolicyContainer image pull policy.Always
image.imagePullSecretsName of image pull secrets to be used by kubernetes.[]
nameOverrideOverrides the name of the chart.""
fullnameOverrideOverrides the full name of the chart.""
service.typeService type.NodePort
service.portIncoming port to access Xfinity Data Usage.7878
ingress.enabledEnable ingress.true
ingress.classNameIngress className.""
ingress.annotationsIngress annotations.{}
ingress.hostsIngress hosts.[]
ingress.tlsIngress TLS configuration.[]
resourcesCPU/memory resource requests/limits.{}
nodeSelectorNode labels for pod assignment.{}
tolerationsToleration labels for pod assignment.[]
affinityAffinity settings for pod assignment.{}
podSecurityContextSet SecurityContext on the pod level.{}
podAnnotationsSet annotations on the pod level.{}
podLabelsSet labels on the pod level.{}
securityContextSet the securityContext for the pod.{}
volumesAdditional volumes available to containers.[]
volumeMountsAdditional mount points of volumes in a container.[]

Specify each parameter using the --set key=value argument to helm install. For example,

helm repo add naterator https://naterator.github.io/helm-charts/
helm repo update
helm install \
  --set config.xfinity.username=USERNAME_HERE \
  --set config.xfinity.password=PASSWORD_HERE \
  xfinity-data-usage naterator/xfinity-data-usage

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

helm install -f values.yaml xfinity-data-usage naterator/xfinity-data-usage

Tip: You can use the default values.yaml

Deploy xfinity-data-usage with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has xfinity-data-usage on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartxfinity-data-usage is pinned at v1.30.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply