reorganize moat.* code
integrate moat.ems.sched
implement battery error conditions
disable if ESS mode != 3
modularize control (DistKV vs. DBus)
disable inverter on low battery
adjust voltages by internal resistance
auto-discover battery and cell internal resistance
use a sigma function for approximating stable points
add a longer-term amperage averager for the battery
add inverter-amperage mode (i.e. if I=0, take the energy
for Multiplus + EXT from AC)
Fix battery-amperage mode

implement meter parameter file, forward to MQTT and distkv, then to Victron
