Power Trace is a local real-time energy monitoring system for tracking electricity consumption through a Tuya-compatible smart relay (such as Atorch GR2PWS or any device that supports Tuya Local Protocol). It runs entirely on your own computer — no cloud servers, no real-time internet connection required.
This section is used to automatically retrieve the Device ID, IP address and Local Key of your relay from the Tuya cloud. If you already have those credentials, skip this section and go straight to Device.
p7n8fk3x2q...••••XXXX. Click the 👁 button to temporarily reveal it.secret.key) on your computer and is never sent anywhere other than Tuya's servers during a scan.
The core section. Without filling in these fields the collector cannot connect to the relay and no data will be collected. If you used the Tuya Cloud scan and clicked Use this device, most fields will be auto-filled.
bfefafdde42999f1887ghk. Found in the Tuya / Smart Life app or retrieved via the cloud scan.192.168.0.114. Required for a direct local connection. If the scan did not find an IP, check the DHCP client list in your router's admin panel, or assign a static IP to the device.The collector is the background process that connects to the relay and writes data to the database. The default values work fine for most setups — only change them if you have a specific reason.
Restarts the background collector process. Press this after changing any parameters in the Device or Collector sections, and also if the collector is stuck or fails to connect. Always save your configuration first — otherwise the restart will use the old parameters.
These control the collector's internal reconnection logic — how it detects a lost or silent connection to the relay, and how it escalates from a quick retry to a full network rescan. The defaults are tuned to the relay's ~60-second tick interval and work fine for most setups.
Same button as in the Collector section above — recovery settings are read only when the collector process starts, so press this after saving any changes here.
Controls the network port for the local API server that the dashboard and Settings page talk to. Most setups never need to touch this.
Power Trace refuses configuration changes that arrive under an unexpected hostname. This blocks DNS rebinding, an attack where a web page you visit tricks your browser into sending commands to devices on your home network. Local addresses are trusted automatically: localhost, any private LAN address (192.168.x.x, 10.x.x.x, 172.16–31.x.x), Tailscale addresses and *.ts.net names, and *.local names. You do not need to configure anything for a normal setup.
If you put Power Trace behind a reverse proxy on a public domain, that domain is not local and is therefore not trusted by default. Saving settings then fails with host_not_allowed. Add your domain to config.yaml by hand and restart the server:
config.yaml (there is no field for it in Settings). Example: server: → allowed_hosts: ["power.example.com"]. List the hostname only — no scheme and no port. Reading the dashboard is never blocked; only requests that change something are.Defines how the cost of electricity consumption is calculated. Without filling in this section the dashboard will show dashes in the Bill and Total Energy fields.
Tariff (per kWh) — the price of one kilowatt-hour, e.g.
0.32 or 4,32 (both dot and comma accepted).Currency Symbol — e.g.
$, €, or ₴.Zone 1 (day) — From / To: the start and end of the daytime rate, e.g.
07:00 – 23:00. Wrap-around is supported: if the night zone crosses midnight, define Zone 1 as the daytime hours and the system fills in Zone 2 automatically.Zone 1 Rate / Zone 2 Rate: price per kWh for each zone. Zone 2 time boundaries fill in automatically as the inverse of Zone 1.
Currency Symbol is shared between both zones.
Colors for chart lines, card values, and bars. The defaults are tuned for the dark theme. Each color can be set with the color picker or by typing a HEX code (e.g. #4caf50). Both stay in sync.
All text labels in the interface. Use these to adapt terminology to your own wording — Consumption instead of Total Energy, or a different unit style.
config.yaml, so they survive a language change.
m (minutes) and h (hours) used in the 30m / 1h / 2h buttons.Sets the language of the whole interface — dashboard, Settings, Rules, the Analysis report and the tray menu. The dropdown lists every pack found in the lang/ folder next to config.yaml; adding a language means dropping a JSON file there, with no rebuild. A pack that is only partly translated shows its progress in the dropdown, and any key it lacks falls back to English. Saving reloads the page.
Separate from the interface language, and deliberately so: it controls the language of month names on chart axes and in tooltips, and the two are often not the same. Enter a locale tag in the standard language-REGION form — uk-UA, de-DE, en-US (the IETF BCP 47 format). A live preview below the field shows all 12 month names in real time.
| Locale tag | Language | Month names (Jan → Dec) |
|---|---|---|
en-US |
English | Jan · Feb · Mar · Apr · May · Jun · Jul · Aug · Sep · Oct · Nov · Dec |
uk-UA |
Ukrainian | Січ · Лют · Бер · Кві · Тра · Чер · Лип · Сер · Вер · Жов · Лис · Гру |
de-DE |
German | Jan · Feb · Mär · Apr · Mai · Jun · Jul · Aug · Sep · Okt · Nov · Dez |
fr-FR |
French | janv. · févr. · mars · avr. · mai · juin · juil. · août · sept. · oct. · nov. · déc. |
zh-CN |
Chinese (Simplified) | 1月 · 2月 · 3月 · 4月 · 5月 · 6月 · 7月 · 8月 · 9月 · 10月 · 11月 · 12月 |
How time, date, and temperature are displayed on the dashboard.
14:05.12-hour — AM/PM format:
2:05 PM. When selected, AM label and PM label fields appear so you can localise the suffixes.02:05. Off: 2:05.Applies only to Month, Year, and Custom modes when the range spans more than 2 days. Controls which single value represents each day or month on the Power, Voltage, Current, and Power Factor charts.
How many seconds after the last received data packet the dashboard switches to OFFLINE. The relay sends new data approximately once every 60 seconds — a firmware limit. The default of 120 s covers two missed transmissions in a row.
When to increase: if your relay is on an unstable Wi-Fi connection. For example, 180 s allows three missed ticks before going offline.
Do not set below 60 seconds — the dashboard will flicker between ONLINE and OFFLINE.
The minimum horizontal width, in pixels, given to each data point on the charts. Charts scroll horizontally once the points no longer fit — this setting controls how spread out they are.
Higher values spread points further apart, making individual ticks easier to read but requiring more scrolling. Lower values fit more of the day on screen at once, at the cost of more tightly packed points.
How long a silence has to last before the chart line is broken instead of drawn straight through. Power Trace records every tick the relay sends, so a stretch with no records means the collector genuinely received nothing — a power cut, a Wi-Fi drop, or the application not running. Joining those points with a smooth line would make a blackout look like a steady reading.
Setting it to 0 disables breaks entirely and always draws a continuous line.
Do not set below 3 minutes. The relay reports roughly once every 60 seconds and the interval drifts, so a low threshold marks ordinary jitter as an outage and fills the chart with breaks that mean nothing.
When to increase: if your relay is on a weak Wi-Fi signal and brief reconnects are normal for your setup, raising this to 10–15 keeps the chart readable and reserves breaks for real outages.
When the connection to the relay drops for a long time, the meter inside the relay keeps counting but Power Trace records nothing. On reconnect, the energy consumed during the outage is recovered from the meter and spread evenly across the missing hours. That spread is an estimate, not a measurement — nobody knows how the load actually behaved while the device was offline.
Bars on the Energy and Bill charts whose energy is at least this fraction estimated are drawn dimmed, and a note appears above the chart. A bar that is 30% estimated stays normal at the default 0.5, and becomes dimmed at 0.3.
0 — dim any bar containing even a trace of estimated energy. 1 — dim only bars that are entirely estimated.
The threshold controls dimming only. Whenever a chart contains any estimated energy at all, a note above it reports the exact amount — for example 0.90 / 23.40 kWh — whatever the threshold is set to. So an estimate is never hidden: the colour tells you whether a single bar can be trusted, the note tells you how much of the whole period was estimated.
This matters most on the Month and Year charts, where one bar is a whole day. A two-hour outage in a 12 kWh day is only 7% of that bar, so it stays undimmed at the default — correctly, since the day as a whole is reliable — but the note still accounts for those kilowatt-hours, because they are on your bill.
By default the dashboard is only accessible on the computer where Power Trace runs (http://localhost:8000, or whichever port you set as the API Server Port in the Server section), or from other devices on the same Wi-Fi. If you want to view it from your phone outside your home, you need Tailscale.
my-pc). Port fills in automatically from your API Server Port setting — only change it by hand if you use a reverse proxy or port-forwarding.http://my-pc:8000. Click 📋 Copy URL and open it on any Tailscale-connected device.config.yaml. If you open Settings in a different browser the fields will be empty and Port will re-sync from the API Server Port setting, but the Tailscale network itself will keep working.
This section is read-only — it reports the current state of your database rather than a setting you configure. It shows the file size on disk, the total number of stored measurements, and the free space remaining on this drive.
If you ever delete rows from the database by hand (for example with a SQL tool), the file will not shrink on its own — SQLite keeps the freed space inside the file for reuse rather than returning it to the operating system. To actually shrink the file, you need to run a VACUUM.
Linux / Raspberry Pi — from a terminal, in the Power Trace folder:
sqlite3 db/energymonitor.db "VACUUM;"
Windows — sqlite3.exe is not included by default. Use the free DB Browser for SQLite instead: open db\energymonitor.db, then Tools → Compact Database.
Power Trace can tell you when a newer version has been released. It never downloads or installs anything by itself — it only shows a small notice on the dashboard with a link to the download page, and updating stays entirely your decision.
getpowertrace.com containing the latest version number. Nothing is sent except the version you are running — no readings, no device details, no identifiers. See the Privacy Policy for the full description.
config.yaml, not on what is currently shown on screen.config.yaml on disk. Before saving, all fields are validated — if there are errors a message is shown and nothing is saved. Empty Device ID / IP / Local Key triggers a confirmation dialog. The dashboard picks up the new configuration automatically without reloading the page.config.yaml. Use this if you changed something and want to undo it without reloading the page.