<div dir="ltr"><div>Hello all,</div><div><br></div><div> Recently there were a few issue discussions the crux of which was that when</div><div>some UPS values are overridden e.g. by `override.battery.charge.low=40` then</div><div>the driver knows this value (and in case of "override.*" vs "default.*" has it "bolted"</div><div>even if the device reports something else), but there is no value-setting actually</div><div>propagated to a device (so a capable UPS HW/FW would raise the LB alarm</div><div>at that charge level). Setting the value explicitly with `upsrw` as part of driver</div><div>service unit startup (for devices which support setting that, but do not remember</div><div>it across power-cycles) helped in the discussed cases.<br></div><div><br></div><div> My proposal is to introduce another prefix for such values where the driver</div><div>would actively push them to the device during daemon start-up. So far I came</div><div>up with a couple of ideas, e.g.:</div><div>* `initialize.battery.charge.low` - push the setting to device (if possible) and then<br></div><div> act as `default.battery.charge.low` so if the device HW/FW does not actually</div><div>
support that toggle, the driver knows the value from config; and if it does - the</div><div> driver knows it from an actual
reading.</div><div>
* `initialize.(default|override).battery.charge.low` - like above, but explicitly say</div><div> how the value is treated next (e.g. `override` like before makes sense for broken</div><div> firmware). One downside is that such spelling is longer and more cumbersome,</div><div> but on the upside - explicit and less open to surprises.<br></div><div><br></div><div>So far this was just an idea in the back of my head, no code written - so a good</div><div>moment to discuss: whether there is merit to this? Is `initialize` a proper keyword</div><div>for the idea? Which of the two ideas above, or some alternate one, is better?</div><div>What is the best bike-shed color? Would anyone step up to code this? (Should</div><div>be a dozen lines I think, plus docs).</div><div><br></div><div>Jim Klimov</div><div><br></div><div> </div></div>