Skip to content

API Reference

Main Endpoints

  • FastAPI endpoints for meter data and device management
  • MQTT publishing via MQTTReading
  • See code in scripts/apifast.py, scripts/contract.py, and scripts/mqtt_client.py

Example Usage

from mqtt_client import MQTTReading
MQTTReading({
    'IMPORT': 51.31,
    'EXPORT': 157.91,
    'VOLTAGE': 240.1,
    'AMPS': 10.89,
    'PF': 0.91,
    'FREQUENCY': 49.27,
    'POWER': 2.61,
    'timestamp': '2025-11-18 12:30:45'
})