-
Notifications
You must be signed in to change notification settings - Fork 6
How It Works
Kasa Collector is designed to automate data collection from Kasa Smart Plugs. It offers two modes: Automatic Device Discovery and Manual Device Configuration.
Kasa Collector automatically discovers compatible Kasa devices on your network. By default, it sends discovery packets regularly (KASA_COLLECTOR_DEVICE_DISCOVERY_INTERVAL
) and identifies devices that support energy monitoring.
To control automatic discovery, use the KASA_COLLECTOR_ENABLE_AUTO_DISCOVERY
environment variable:
-
Enable Auto-Discovery: Set
KASA_COLLECTOR_ENABLE_AUTO_DISCOVERY
totrue
. -
Disable Auto-Discovery: Set
KASA_COLLECTOR_ENABLE_AUTO_DISCOVERY
tofalse
.
If devices are not automatically discovered, or if you prefer manual configuration, you can specify device IPs or hostnames using the KASA_COLLECTOR_DEVICE_HOSTS
variable. This variable accepts a comma-separated list of device IPs/hostnames.
-
Example:
KASA_COLLECTOR_DEVICE_HOSTS="10.50.0.101,10.50.0.102"
For Kasa devices requiring TP-Link account authentication, provide your credentials with the KASA_COLLECTOR_TPLINK_USERNAME
and KASA_COLLECTOR_TPLINK_PASSWORD
variables. These credentials enable control of TP-Link cloud-authenticated devices.
Proceed to the Environmental Flags page for a complete list of environment variables used by Kasa Collector.