Experiment record
SwitchBot Plug Mini (JP): interpreting OpenAPI power data by measurement
A short empirical test of the SwitchBot Plug Mini (JP) OpenAPI fields, update cadence, and the practical meaning of the `weight` value.
Conclusion
A SwitchBot Plug Mini (JP) was queried through SwitchBot OpenAPI v1.1 while powering a refrigerator/freezer load. The observed API behaviour supports the following practical interpretation:
voltage -> voltage [V]
electricCurrent -> current [mA]
weight -> instantaneous active power [W], inferred
electricityOfDay -> powered-on time for the current day [min]
The strongest experimental result concerns weight. Its value changed on a time scale of seconds, which is incompatible with a daily accumulated energy quantity. In addition, the ratio weight / (voltage × current) produced physically plausible power-factor-like values for an AC appliance load. Therefore, treating weight as instantaneous active power is the most consistent interpretation of the measured data.
Test setup
- Device: SwitchBot Plug Mini (JP)
- API: SwitchBot OpenAPI v1.1
- Load: refrigerator/freezer
- Authentication: Token + Secret with HMAC-SHA256, handled locally
- Public privacy boundary: credentials, exact device identifiers, and household-identifying information are not published
The device status endpoint returned fields including power, voltage, weight, electricityOfDay, and electricCurrent.
Five-second logging run
A first run collected 151 samples over approximately 12 minutes 32 seconds at a nominal five-second interval.
Observed ranges included:
weight: approximately 116.2 to 129.4 W during the sampled operating stateelectricCurrent: approximately 1630 to 1747 mAvoltage: approximately 102 to 103 V
Most importantly, electricityOfDay increased by approximately one count every 60 seconds. That directly supports the interpretation that this field represents powered-on time in minutes for the current day.
One-second logging run
A second run collected 223 samples over approximately 3 minutes 43 seconds at a nominal one-second interval.
The API could be polled every second, but new electrical values were not produced every second.
Observed change behaviour:
weight: typically changed every 2 to 3 secondselectricCurrent: typically changed every 2 to 3 secondsweightandelectricCurrent: change timing was almost always synchronizedvoltage: changed less clearly because values are rounded to 0.1 VelectricityOfDay: continued to advance at approximately 60-second intervals
This means a one-second polling loop often receives repeated values. For long-duration logging, a 2- to 3-second interval is a more efficient practical choice unless sub-second timing of API responses itself is under study.
Interpreting weight
The public API documentation uses wording around weight that is difficult to reconcile with the unit watt if it is read as a daily accumulated quantity. A daily energy total would normally require an energy unit such as Wh or kWh.
The measured value instead changed quickly, for example through transitions such as:
11.0 W -> 126.5 W -> 82.9 W -> 94.1 W
That behaviour is characteristic of instantaneous power, not daily accumulated energy.
Power-factor-like cross-check
To test whether weight behaves like active power, a power-factor-like value was calculated as:
PF_like = weight[W] / (voltage[V] * current[A])
Across the 223-point one-second dataset:
- mean: approximately 0.893
- median: approximately 0.945
- minimum: approximately 0.375
- maximum: approximately 1.004
The load also separated into distinct operating regions:
- low to medium load: typically about 0.94 to 0.99
- high load: typically about 0.60 to 0.70
Example:
V = 103.4 V
I = 1.291 A
weight = 87.9 W
apparent power ~= 103.4 * 1.291 = 133.5 VA
PF_like ~= 87.9 / 133.5 = 0.658
This is physically plausible for a refrigerator/freezer operating through motor and power-electronic loads and strongly supports the interpretation of weight as active power.
Important limitation
PF_like should not be treated as a laboratory-grade power factor measurement. The API does not establish that voltage, electricCurrent, and weight are captured at exactly the same instant, and each field may be subject to rounding and internal update timing. Values slightly above 1.0 were observed, which is consistent with timing and quantization mismatch rather than a true physical power factor above unity.
What was established
- Plug Mini (JP) can expose voltage, current, and power-related values through OpenAPI v1.1.
voltageis consistent with volts.electricCurrentis consistent with milliamperes.electricityOfDaybehaves as daily powered-on time in minutes and increments roughly once per minute.weightis not a daily accumulated quantity in the observed API behaviour.weightis most consistently interpreted as instantaneous active power in watts.weightandelectricCurrentare typically refreshed on a roughly 2- to 3-second cadence.- One-second polling frequently returns repeated measurements.
What remains unverified
- Whether the internal electrical sampling interval and the API cache/update interval are identical.
- Whether voltage, current, and active-power values are generated from one exactly synchronized measurement frame.
- Whether
weightagrees with a calibrated reference power meter over a wide load range. - Whether operating modes such as compressor stop, normal operation, and high-load operation can be reliably classified from power and
PF_likeover long runs.
Reproducibility note
The public article intentionally omits authentication credentials, exact device IDs, and raw household measurement logs. The experiment can be reproduced with any authorised SwitchBot Plug Mini (JP), the OpenAPI v1.1 device-status endpoint, and a logger that records timestamp, voltage, current, weight, and electricityOfDay at known intervals.