OnMeters Documentation
Everything you need to set up, connect and integrate your Metron optical reader.
Quick start
1. Place the magnetic optical head over the round IR port on your meter's front panel. It self-aligns and holds.
2. Power: the device runs wire-free on its coin cell battery. For permanent installation (or WiFi mode, which uses more power), connect any USB-C supply — a phone charger works.
3. The status LED blinks while reading. Within 60 seconds the first full readout completes.
4. Connect: the device starts in Bluetooth mode — open the web app in Chrome/Edge and tap Connect. Or switch to WiFi mode (below) for the dashboard.
Switching between BLE and WiFi
Only one radio runs at a time. The active mode is stored and survives power cycles. Three ways to switch:
| Method | How |
|---|---|
| Button | Hold the mode (BOOT) button for 3 seconds — the LED flashes and the device reboots into the other mode. |
| Bluetooth | Send the command MODE=WIFI from the web app or any BLE terminal. |
| HTTP | In WiFi mode, call GET /api/mode?set=ble to go back to Bluetooth. |
SSID=YourNetwork and PASS=YourPassword over Bluetooth, then MODE=WIFI. If the network can't be joined, the device opens its own hotspot OnMeters-Setup (password onmeters123) — connect to it and open 192.168.4.1.BLE commands
OnMeters exposes a Nordic UART Service (NUS). Write commands to the RX characteristic; responses arrive as notifications on TX, terminated by a newline.
| Command | Action |
|---|---|
READ | Trigger a fresh meter readout, then return full JSON. |
DATA | Return the latest cached readout as JSON. |
INFO | Device, firmware, detected protocol and meter ID. |
SSID=name / PASS=secret | Store WiFi credentials. |
MQTT=host[:port] | Store MQTT broker (default port 1883). |
MQTTUSER=u / MQTTPASS=p | Store MQTT credentials (if your broker needs them). |
INTERVAL=seconds | Set the read interval, e.g. INTERVAL=900 = every 15 min. |
RATE=n/hour|day|month | Set rate by count, e.g. RATE=48/day, RATE=100/month. |
SLEEP=ON / SLEEP=OFF | Enable battery deep-sleep mode (see below). |
BATTERY | Return battery voltage (mV) and low-battery flag. |
MESH | List all other Metrons heard over the mesh: module ID, meter ID, kWh, power, battery, hops. |
NEIGHBORS | Installation survey: 3-second listen, then reports which Metrons this unit hears directly, with signal strength (dBm), approximate distance and link quality — plus which are reachable only via relay. |
PRICE=0.30 | Set your electricity tariff per kWh — enables cost calculation. |
CURRENCY=USD | Currency label for cost values (USD, EUR, SAR, EGP...). |
MODE=WIFI | Switch to WiFi mode (reboots). |
Battery & deep sleep
OnMeters runs wire-free on a CR2450 coin cell. To maximise battery life, enable deep-sleep mode: SLEEP=ON over BLE (or sleep=on via /api/config). The device then wakes on a timer, reads the meter, publishes the data, stays connectable over Bluetooth for 60 seconds, and goes back to deep sleep (a few µA).
Choose how often it reads with INTERVAL= (seconds) or RATE= — for example RATE=24/day for hourly readings or RATE=30/month for a daily reading. Fewer reads = longer battery life.
RGB status LED
| Colour | Meaning |
|---|---|
| ⚪ White | Booting / switching mode |
| 🔵 Blue pulse | Bluetooth pairing — advertising, waiting for a phone |
| 🔵 Blue blip | Bluetooth connected |
| 🟡 Yellow | Connecting to WiFi |
| 🩵 Cyan | Reading the meter |
| 🟢 Green flash | Read successful / WiFi connected |
| 🔴 Red flash | Read failed — check probe alignment |
| 🟠 Orange pulse | Low battery — replace the coin cell |
HTTP API (WiFi mode)
Base URL: http://onmeters.local (or the device IP).
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Built-in live dashboard. |
/api/data | GET | Latest readout as JSON. |
/api/read | GET | Force a fresh readout, return JSON. |
/api/mode?set=ble | GET | Switch to Bluetooth mode. |
/api/config | POST | Set ssid, pass, mqtt_host, mqtt_port, mqtt_user, mqtt_pass, interval, rate, sleep, price, currency (form fields). |
/api/mesh | GET | JSON table of all Metrons heard over the BLE mesh (collected while in Bluetooth mode). |
/api/history | GET | Full reading history as CSV (epoch,kwh,power_w,vbat_mv). Add ?clear=1 to erase. |
/update | GET/POST | Over-the-air firmware update — open in a browser and upload the compiled .bin. |
History log
Every successful read is appended to flash storage (~64 KB ring, oldest entries trimmed automatically). Timestamps come from NTP when the device is in WiFi mode; in battery/BLE mode the epoch is 0 and rows are still ordered. Pull the CSV into Excel, Grafana or a script via /api/history.
Cost calculation
Set your tariff once (PRICE=0.30 + CURRENCY=USD) and OnMeters reports the total energy cost in the JSON (cost_total), and publishes a Home Assistant "monetary" sensor at onmeters/cost.
Mesh relay (beta)
Every Metron embeds its latest reading in its Bluetooth advertisement — like Apple's Find My network. Nearby Metrons overhear it and re-broadcast it (up to 3 hops), with no pairing, router or internet. Connect to any unit and send MESH to see every meter in range of the chain. Each entry carries two identities: the module ID (unique per device, from its radio chip — shown as OM-XXXXXX) and the meter ID (the serial read from the meter itself), so readings stay tracked per meter even if a module is moved.
Installation survey
When installing multiple units, connect to each one and send NEIGHBORS. It listens for 3 seconds and reports every Metron it hears directly, with signal strength and a rough distance estimate:
{ "module_id": "OM-4B22F1",
"neighbors": [
{ "module_id": "OM-A3F210", "direct": true, "rssi_dbm": -62,
"approx_m": 3.2, "link": "strong" },
{ "module_id": "OM-77B4C1", "direct": true, "rssi_dbm": -84,
"approx_m": 14.8, "link": "weak" },
{ "module_id": "OM-99D2E0", "direct": false, "via": "relay", "hops": 2 } ],
"direct_count": 2, "relay_only_count": 1,
"hint": "some nodes reachable only via relay - links are working" }
If a far unit shows "link": "weak" or doesn't appear at all, place an extra Metron (or any USB-powered unit) roughly halfway between them and run NEIGHBORS again. Distance estimates assume open air — walls and metal meter cabinets shorten real range considerably.
OTA firmware updates
In WiFi mode, open http://onmeters.local/update, choose the official update file downloaded from onmeters.com and click Flash. The device reboots into the new firmware in seconds — no cables, and all settings are kept.
Response format
{
"device": "OnMeters", "fw": "1.5.0",
"vbat_mv": 2980, "battery_low": false,
"interval_s": 1800, "sleep": true,
"price": 0.30, "currency": "USD", "cost_total": 3854.20,
"meter": "ISK5MT174-0001", "protocol": "IEC",
"reads": 42, "age_s": 12, "mode": "wifi",
"obis": [
{ "code": "1.8.0", "name": "Energy import total",
"value": "012847.335", "unit": "kWh" },
{ "code": "16.7.0", "name": "Active power",
"value": "1240", "unit": "W" }
]
}
MQTT & Home Assistant
Set a broker once and OnMeters publishes every register plus Home Assistant auto-discovery — sensors appear in HA automatically with correct units and device classes. No YAML needed.
# configure over HTTP (or use BLE: MQTT=192.168.1.10)
curl -X POST http://onmeters.local/api/config \
-d "mqtt_host=192.168.1.10" -d "mqtt_port=1883" \
-d "mqtt_user=ha" -d "mqtt_pass=secret"
| Topic | Payload |
|---|---|
onmeters/<obis> | Plain value per register, e.g. onmeters/1.8.0 → 012847.335 |
onmeters/json | Full readout JSON. |
onmeters/availability | online / offline (LWT, retained). |
homeassistant/sensor/onmeters_*/config | Retained discovery messages. |
OBIS reference
Common registers OnMeters decodes (availability depends on your meter):
| OBIS | Meaning | Unit |
|---|---|---|
0.0.0 | Meter serial number | — |
1.8.0 | Active energy import, total | kWh |
1.8.1 / 1.8.2 | Energy import tariff 1 / 2 | kWh |
2.8.0 | Active energy export, total | kWh |
3.8.0 / 4.8.0 | Reactive energy import / export | kvarh |
16.7.0 / 1.7.0 | Instantaneous active power | W |
32.7.0 / 52.7.0 / 72.7.0 | Voltage L1 / L2 / L3 | V |
31.7.0 / 51.7.0 / 71.7.0 | Current L1 / L2 / L3 | A |
14.7.0 | Grid frequency | Hz |
13.7.0 | Power factor | — |
0.9.1 / 0.9.2 | Meter time / date | — |
Firmware updates
Metron updates itself over the air — no cables, no tools. When a new firmware version is released, put one device in WiFi mode, open http://onmeters.local/update, select the update file from onmeters.com and click Flash. The device reboots into the new version in seconds; all your settings are kept.
The rest of your Metrons update themselves. Once one unit runs the new version, it announces it over the mesh — nearby units download it directly from that unit, verify its cryptographic signature, flash, reboot, and pass it onward. A whole building updates from a single flash, with no internet.
waiting_battery and the update resumes automatically after charging. Updates that fail verification are rejected and the current firmware keeps running.Troubleshooting
| Symptom | Fix |
|---|---|
| No readings, LED blinks continuously | Check head alignment on the IR port; rotate slightly. Some meters need PIN activation via the utility to enable extended data. |
| Garbage characters | Contact support — your meter's optical port may use an inverted signal, which we fix with a firmware update. |
| onmeters.local not found | Use the device IP (check your router's client list). Some Android devices don't resolve mDNS. |
| Web Bluetooth won't connect | Use Chrome or Edge over HTTPS; Bluetooth must be on. iOS Safari doesn't support Web Bluetooth — use WiFi mode there. |
| Sensors missing in Home Assistant | Verify broker host/credentials, and that HA's MQTT integration uses the same broker. Check onmeters/availability is online. |
© 2026 OnMeters · onmeters.com · info@onmeters.com