Skip to main content

A library for reading EcoTracker energy consumption data from everHome's local HTTP endpoint

Project description

EcoTracker Library by everHome

A Python library for reading energy consumption data from everHome's EcoTracker device via a local HTTP endpoint. This library is designed to work with EcoTracker devices that expose power and energy counter data via a JSON API.

Installation

pip install ecotracker

Usage

Basic Usage

from ecotracker import EcoTracker

# Initialize the EcoTracker device with the IP address of your device
meter = EcoTracker("192.168.1.100")

# Update the meter data
if meter.update():
    # Get the current power consumption
    power = meter.get_power()
    print(f"Current power consumption: {power} W")
    
    # Get the energy counter for incoming energy
    energy_in = meter.get_energy_counter_in()
    print(f"Energy counter in: {energy_in} kWh")
    
    # Get all available data
    all_data = meter.get_all_data()
    print(f"All data: {all_data}")

Available Methods

The EcoTracker class provides the following methods:

  • update(): Updates the electricity meter data from the HTTP endpoint
  • get_power(): Gets the current power consumption in watts
  • get_power_phase1(): Gets the current power consumption of phase 1 in watts
  • get_power_phase2(): Gets the current power consumption of phase 2 in watts
  • get_power_phase3(): Gets the current power consumption of phase 3 in watts
  • get_power_avg(): Gets the average power consumption in watts
  • get_energy_counter_out(): Gets the energy counter for outgoing energy in kWh
  • get_energy_counter_in(): Gets the energy counter for incoming energy in kWh
  • get_energy_counter_in_t1(): Gets the energy counter for incoming energy in tariff 1 in kWh
  • get_energy_counter_in_t2(): Gets the energy counter for incoming energy in tariff 2 in kWh
  • get_all_data(): Gets all electricity meter data as a dictionary

Running Tests

python -m unittest discover tests

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecotracker-0.1.5.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecotracker-0.1.5-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file ecotracker-0.1.5.tar.gz.

File metadata

  • Download URL: ecotracker-0.1.5.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for ecotracker-0.1.5.tar.gz
Algorithm Hash digest
SHA256 beb8f708b4c2fb8f76c7d3c4ad8baca4007a115cd6aa34606a46a0f113647e7f
MD5 8ad2172778dd124a3004b5dd42300e94
BLAKE2b-256 cf0e50e8ea2f1dd0c0f271124c7313e93e9c8b613a9a099bc1bbf2e1a69706f7

See more details on using hashes here.

File details

Details for the file ecotracker-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: ecotracker-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for ecotracker-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 12d15bc89d936d86c444bb83599d52e10ecf083fdf9af19b302919331f5ae144
MD5 0efae1c2145e59d266d929eac53fe64f
BLAKE2b-256 5c87c077dbf4be5e9ec92a1de82c92fe3cb4e0c0770395203c8cf3aba8aed32c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page