-
Notifications
You must be signed in to change notification settings - Fork 6
Environmental Flags
Kasa Collector can be configured with the following environment variables:
-
KASA_COLLECTOR_INFLUXDB_URL
: InfluxDB instance URL.- Example:
http://influxdb.lux4rd0.com:8086
- Example:
-
KASA_COLLECTOR_INFLUXDB_TOKEN
: InfluxDB token for authentication.- Example:
your-influxdb-token
- Example:
-
KASA_COLLECTOR_INFLUXDB_ORG
: Organization name for InfluxDB.- Example:
Lux4rd0
- Example:
-
KASA_COLLECTOR_INFLUXDB_BUCKET
: InfluxDB bucket name for data storage.- Example:
kasa
- Example:
-
KASA_COLLECTOR_WRITE_TO_FILE
: Whether to write polled device data to individual JSON files.- Default:
false
- Values:
"true"
or"false"
- Default:
-
KASA_COLLECTOR_OUTPUT_DIR
: Directory where output files will be saved.- Default:
output
- Default:
-
KASA_COLLECTOR_FETCH_MAX_RETRIES
: Maximum number of retries for fetching data from devices.- Default:
5
- Default:
-
KASA_COLLECTOR_FETCH_RETRY_DELAY
: Delay (in seconds) between fetch retries.- Default:
1
- Default:
-
KASA_COLLECTOR_DEVICE_DISCOVERY_INTERVAL
: How often to discover devices (in seconds).- Default:
300
- Default:
-
KASA_COLLECTOR_DISCOVERY_TIMEOUT
: Timeout (in seconds) for device discovery.- Default:
5
- Default:
-
KASA_COLLECTOR_DISCOVERY_PACKETS
: Number of discovery packets to send.- Default:
3
- Default:
-
KASA_COLLECTOR_DATA_FETCH_INTERVAL
: How often to poll devices for energy data (in seconds).- Default:
15
- Default:
-
KASA_COLLECTOR_SYSINFO_FETCH_INTERVAL
: Interval (in seconds) for fetching system information.- Default:
60
- Default:
-
KASA_COLLECTOR_KEEP_MISSING_DEVICES
: Whether to keep missing devices in the list.- Default:
true
- Values:
"true"
or"false"
- Default:
-
KASA_COLLECTOR_ENABLE_AUTO_DISCOVERY
: Enables/disables automatic device discovery.- Default:
true
- Values:
"true"
or"false"
- Default:
-
KASA_COLLECTOR_TPLINK_USERNAME
: TP-Link account username (email) for devices requiring login.- Default:
None
- Default:
-
KASA_COLLECTOR_TPLINK_PASSWORD
: TP-Link account password for devices requiring login.- Default:
None
- Default:
-
KASA_COLLECTOR_DEVICE_HOSTS
: Comma-separated list of device hosts (IP addresses) for manual configuration.- Default:
None
- Default:
-
KASA_COLLECTOR_LOG_LEVEL_KASA_API
: Log level for Kasa API module.- Default:
INFO
- Values:
DEBUG
,INFO
,WARNING
,ERROR
,CRITICAL
- Default:
-
KASA_COLLECTOR_LOG_LEVEL_INFLUXDB_STORAGE
: Log level for InfluxDB storage module.- Default:
INFO
- Values:
DEBUG
,INFO
,WARNING
,ERROR
,CRITICAL
- Default:
-
KASA_COLLECTOR_LOG_LEVEL_KASA_COLLECTOR
: Log level for Kasa Collector.- Default:
INFO
- Values:
DEBUG
,INFO
,WARNING
,ERROR
,CRITICAL
- Default:
-
KASA_COLLECTOR_AUTH_MAX_RETRIES
: Maximum number of retries for device authentication.- Default:
3
- Default:
-
KASA_COLLECTOR_AUTH_TIMEOUT
: Timeout (in seconds) for device authentication.- Default:
10
- Default: