Skip to content

Inhero MR2 – CLI Cheat-Sheet

All board-specific CLI commands at a glance. Prefix is always board. — i.e. get board.<cmd> or set board.<cmd> <value>.

See FAQ.md for explanations of key parameters (imax, fmax, batcap) and DATASHEET.md for chemistry details.


Setters (Change Configuration)

# Battery chemistry
set board.bat liion1s          # Li-ion 1S (3.7V nominal)
set board.bat lifepo1s         # LiFePO4 1S (3.2V nominal)
set board.bat lto2s            # LTO 2S (2x 2.3V nominal)
set board.bat naion1s          # Na-ion 1S (3.1V nominal)
set board.bat none             # No battery / unknown (charging disabled)

# Battery capacity (100–100000 mAh)
# Rule of thumb: 90% of nominal capacity (see FAQ #4)
set board.batcap 10000

# Maximum charge current (50–1500 mA)
set board.imax 500

# Frost charge current reduction (T-Cool approx. -2 °C to +3 °C, see JEITA table in README)
set board.fmax 0%              # Charging blocked
set board.fmax 20%             # max. 20% of imax
set board.fmax 40%             # max. 40% of imax
set board.fmax 100%            # no reduction
# Note: No effect on LTO / Na-ion (JEITA disabled)

# MPPT on/off
set board.mppt 1               # Enable MPPT
set board.mppt 0               # Disable MPPT

# LEDs on/off (Heartbeat + BQ Stat)
set board.leds on              # Enable LEDs  (on/1)
set board.leds off             # Disable LEDs (off/0)

# Manually set SOC (0–100%)
set board.soc 85.0

Calibration

# NTC temperature calibration
# Best practice: run in the early morning before sunrise,
# when battery temperature has equalized with ambient (see FAQ #12).
set board.tccal                # Auto-calibration via BME280
set board.tccal reset          # Reset offset to 0.00

Getters (Query Status)

# Configuration & Hardware
get board.bat                  # Current battery type
get board.batcap               # Battery capacity in mAh (set/default)
get board.imax                 # Maximum charge current in mA
get board.fmax                 # Frost charge behavior (0%/20%/40%/100% or N/A)
get board.mppt                 # MPPT status (0/1)
get board.leds                 # LED status (ON/OFF)
get board.conf                 # Summary of all configs (B, F, M, I, Vco, V0)

# Real-time telemetry
get board.telem                # Battery+Solar: V, I, T, SOC

# Energy & Statistics
get board.stats                # Energy balance (24h/3d/7d), C/D, MPPT%, Batt-TTL
                               #   Batt-TTL = battery time-to-live (hours until battery empty),
                               #   not a packet hop limit
                               #   Basis: 7-day average of daily net deficit
                               #   from hourly INA228 coulomb counter samples (168h ring buffer)
                               #   Formula: extractable / |7d-avg-deficit| × 24, where
#   extractable = SOC% × capacity − trapped charge
#   (cold-temperature derating; 0 at normal temperatures)
                               #   Batt-TTL only shown in BAT mode (net deficit)
                               #   Prerequisite: min. 24h data + capacity known

# Charger & Diagnostics
get board.cinfo                # Charger status + last PG-stuck HIZ toggle
get board.bqdiag               # Diagnostic/debug: compact BQ25798 register dump
                               #   PG/charge state, TS region (COLD/COOL/WARM/HOT),
                               #   active status/fault flags (e.g. VINDPM, VBAT_OVP)
get board.selftest             # Probe all I2C devices (INA228/BQ25798/RV-3028/BME280)
                               #   Output: "INA:OK BQ:OK RTC:OK BME:OK"
                               #   RTC includes user-RAM write/readback verify
                               #   to catch cold-solder joints (chip ACKs but
                               #   rejects writes). Possible per-device states:
                               #     OK      — device responds and (RTC) persists writes
                               #     NACK    — device does not ACK on I2C bus
                               #     WR_FAIL — (RTC only) ACKs but write/readback mismatched
get board.socdebug             # Diagnostic/debug: SOC tracking internals
                               #   SHUNT_CAL, precise current, CHARGE register (mAh),
                               #   current-hour charge/discharge accumulators,
                               #   update count, RTC time, temperature derating factor

# Calibration
get board.tccal                # NTC temperature offset in °C (0.00 = default)

Getter Quick Reference

Command Description
get board.bat Battery type (liion1s, lifepo1s, lto2s, naion1s, none)
get board.batcap Battery capacity in mAh (set/default)
get board.imax Maximum charge current in mA
get board.fmax Frost charge behavior (0%/20%/40%/100%, LTO/Na-ion: N/A)
get board.mppt MPPT status (0/1)
get board.leds LED status Heartbeat + BQ Stat (ON/OFF)
get board.conf Summary: B(at) F(max) M(ppt) I(max) Vco V0
get board.telem Real-time telemetry: Battery/Solar V, I, T, SOC — see TELEMETRY.md
get board.stats Energy balance (24h/3d/7d), C/D, MPPT%, Batt-TTL (7d-avg-based)
get board.cinfo Charger status + PG-stuck HIZ toggle (e.g. "PG / CC HIZ:3m ago")
get board.bqdiag Diagnostic/debug: BQ25798 register dump — PG/charge state, TS region, active fault flags
get board.selftest I2C device probe — INA:OK BQ:OK RTC:OK BME:OK (RTC also write-verified)
get board.socdebug Diagnostic/debug: SOC internals — SHUNT_CAL, current, CHARGE, hour accumulators, derating factor
get board.tccal NTC temperature offset in °C (0.00 = default)

Setter Quick Reference

Command Range Description
set board.bat liion1s · lifepo1s · lto2s · naion1s · none Set battery chemistry
set board.batcap 100100000 (mAh) Set battery capacity
set board.imax 501500 (mA) Set max charge current
set board.fmax 0% · 20% · 40% · 100% Frost charge reduction (not for LTO/Na-ion)
set board.mppt 0/1 · true/false Enable/disable MPPT
set board.leds on/off · 1/0 Enable/disable LEDs
set board.soc 0100 (%) Manually set SOC
set board.tccal reset · (empty = auto) Calibrate or reset NTC temperature

Quick-Start Recipes

Li-ion 1S with 10Ah and Solar

set board.bat liion1s
set board.batcap 10000
set board.imax 500
set board.fmax 20%
set board.mppt 1
set board.leds off

LiFePO4 1S with 6Ah and Solar

set board.bat lifepo1s
set board.batcap 6000
set board.imax 300
set board.fmax 40%
set board.mppt 1
set board.leds off

LTO 2S with 18Ah and Solar

set board.bat lto2s
set board.batcap 18000
set board.imax 700
set board.mppt 1
set board.leds off

Na-ion 1S with 10Ah and Solar

set board.bat naion1s
set board.batcap 10000
set board.imax 500
set board.mppt 1
set board.leds off

Status Check (everything at a glance)

get board.conf
get board.telem
get board.stats
get board.cinfo

See Also