Skip to main content

stromleser.one Local API

The stromleser.one local API provides direct access to your electricity meter data over the local network. This API is only available locally and cannot be accessed over the internet.

Note

For general information about local APIs, see Local API Overview.

API Endpoint

The API is accessible via the following URL:

http://[DEVICE_IP]/v1/data

Example:

http://192.168.1.100/v1/data

Rate Limiting

The API has rate limiting implemented:

  • 1 request every 8 seconds
  • Requests exceeding the limit will be rejected
Respect Rate Limiting

Ensure your application doesn't send requests more than once every 8 seconds.

API Response

The API returns JSON data whose content depends entirely on your electricity meter. Depending on which values your meter supports and sends, these will appear in the API response.

Example Response

{
"device_id": "STROM_ONE_7211674295",
"timestamp": "1761908828",
"1.8.0": "22641332.800 Wh",
"1.8.1": "22641332.800 Wh",
"1.8.2": "0.000 Wh",
"2.8.0": "37307808.400 Wh",
"2.8.1": "37307808.400 Wh",
"2.8.2": "0.000 Wh",
"16.7.0": "3.000 W",
"36.7.0": "0.000 W",
"56.7.0": "0.000 W",
"76.7.0": "3.000 W",
"RSSI": "-54dBm"
}

Standard Fields

FieldTypeDescription
device_idStringUnique device ID of the stromleser.one
timestampStringUnix timestamp of the measurement
RSSIStringWiFi signal strength in dBm

Value Format

Important: All measurement values (OBIS codes) are returned as strings with units. The unit is transmitted directly from the electricity meter and is part of the value.

Format: "<numeric_value> <unit>"

Examples:

  • "22641332.800 Wh" - Energy in watt-hours
  • "3.000 W" - Power in watts
  • "22.641 kWh" - Energy in kilowatt-hours (if sent by the meter)

The units are not fixed and may vary depending on the electricity meter model.

Supported OBIS Codes

stromleser.one can decode the following SML OBIS codes. Important: Only values that your electricity meter actually sends will appear in the API response.

Energy Import (Consumption)

OBIS CodeDescription
1.8.0Total energy import (sum of all tariffs)
1.8.1Energy import tariff 1 (High Tariff / HT)
1.8.2Energy import tariff 2 (Low Tariff / NT)
1.8.3Energy import tariff 3
1.8.4Energy import tariff 4

Typical Unit: Watt-hours (Wh) or Kilowatt-hours (kWh)

Energy Export (e.g., Solar System)

OBIS CodeDescription
2.8.0Total energy export (sum of all tariffs)
2.8.1Energy export tariff 1 (High Tariff / HT)
2.8.2Energy export tariff 2 (Low Tariff / NT)
2.8.3Energy export tariff 3
2.8.4Energy export tariff 4

Typical Unit: Watt-hours (Wh) or Kilowatt-hours (kWh)

Instantaneous Power

OBIS CodeDescription
16.7.0Active instantaneous power (net, can be +/-)
15.7.0Absolute active instantaneous power
1.7.0Positive active instantaneous power (import)
2.7.0Negative active instantaneous power (export)
16.7Current power (alias for 16.7.0)

Typical Unit: Watt (W) or Kilowatt (kW)

Main Value

16.7.0 is the most commonly used value and shows the current total active power. Positive values = import, negative values = export.

Phase-Specific Power (3-Phase Meters)

OBIS CodeDescription
36.7.0Active instantaneous power phase L1
56.7.0Active instantaneous power phase L2
76.7.0Active instantaneous power phase L3

Typical Unit: Watt (W) or Kilowatt (kW)

Availability

These values are only available on 3-phase electricity meters that provide this information.

What Will Be Displayed for Me?

The availability of values depends on your electricity meter:

  • Modern Smart Meters: Usually provide many OBIS codes including phase data
  • Older Digital Meters: Often only basic values like total consumption and current power
  • Bidirectional Meters (with Solar): Additionally feed-in values (2.8.x)
  • Multi-Tariff Meters: Separate values for HT/NT (1.8.1 and 1.8.2)
Tip

Call the API once to see which values your meter provides. These are the values you can use in your applications.

Error Handling

Common Errors

  • 429 Too Many Requests: Rate limit exceeded, wait 10 seconds
  • 404 Not Found: API endpoint not available or wrong URL
  • Timeout: Device unreachable, check network connection

Troubleshooting

  1. Verify IP address: Use correct device IP
  2. Test network connection: Ping the device
  3. Respect rate limiting: Wait at least 10 seconds between requests
  4. Browser test: Access http://[IP]/v1/data in your browser

Integration with Home Assistant

For Home Assistant integration, see stromleser.one Home Assistant Integration.

Processing Values

Since all values are provided as strings with units, you need to parse them:

def parse_value(value_string):
"""
Parses a value with unit.
Example: "22641332.800 Wh" -> (22641332.800, "Wh")
"""
parts = value_string.split()
if len(parts) >= 2:
number = float(parts[0])
unit = parts[1]
return number, unit
return None, None

# Example usage
if '1.8.0' in data:
value, unit = parse_value(data['1.8.0'])
if value is not None:
print(f"Total consumption: {value} {unit}")

# Optional: conversion if in Wh
if unit == "Wh":
kwh = value / 1000
print(f"Total consumption: {kwh:.3f} kWh")

# Interpret power values
if '16.7.0' in data:
power, unit = parse_value(data['16.7.0'])
if power is not None:
if power > 0:
print(f"Import: {power} {unit}")
elif power < 0:
print(f"Export: {abs(power)} {unit}")
else:
print("No consumption/export")

Security Notes

  • API is only available on local network
  • No authentication required
  • Ensure your network is secure
  • Use firewall rules if needed
  • Do not expose the device directly to the internet