v0.2-beta Measurements; OCR; Stability fixes
Pre-releaseIntro
This pre-release is one step before being able to automate the act of switching the mining on and off. It deals with supplying all the necessary measurements, yet still without the "Home Assistant" hardware, but rather the bare metal ones. It automates the part of acquiring the initial battery state - the only part that had to be supplied by hand to perform the simulation. Moreover, by adding a few more parameters to the battery.json
, described in the configuration documentation, the required conversions from voltage to charge percentage are being performed.
Major changes
Charging and discharging voltage modelling
Thanks to the voltage modelling, we can now translate the voltage readouts to battery charge in percent, yielding a linear calculation, ultimately being able to translate voltage to Ah (Ampere-hours): a unit of energy capacity, that's much simpler for calculations.
As described in the main documentation, the voltage input can be triggered with:
./soloptxmr.py --battery-charge-v 12.3 # Set the voltage of your battery to be converted to its current charge
OCR
Thanks to an incorporation of GasPumpOCR project, it's possible to reuse the existing examples of OCR modules or to write your individual ones. The right parameters of such a module can be learned with an interactive script called playground.py
of the GasPumpOCR project (example). See the new documentation. The OCR module can be generalized to just recognize certain rectangles, that could represent the battery charge in % already, rather than the raw voltages, like here . There's an example that does it as well.
Using the OCR module is done via:
./soloptxmr.py --battery-charge-ocr # Use image recognition to read the current battery voltage
Image capture
Closely related to OCR (and documented there) is a similarly interfaced image capture system, allowing you to write your own image capture models.
Temperature readouts
These will come very handy whenever there's a suspicion, that a given rig is overheating. In such an event the controlling PC will reduce the mining effort of the mining rig to let it cool down.
Optimization algorithm stability fixes
I noticed, that the algorithm behaved in an unstable way for a few reasons not worth mentioning. This part is simply being left in a working ad-hoc state for now, while I focus on the integration of many individual systems, like the ones mentioned above. There will come a time soon, when I'll focus on making the optimization algorithm work much better.
Full changes
What's Changed
- Random seed by @mj-xmr in #52
- Bump pillow from 9.1.0 to 9.1.1 by @dependabot in #53
- pip fallback by @mj-xmr in #54
- Config volatile by @mj-xmr in #56
- Mac fix cfg by @mj-xmr in #57
- Fixed dynamic linking of libopt by @mj-xmr in #58
- Image recognition by @mj-xmr in #59
- Discharge rates by @mj-xmr in #60
- Discharge rates in json by @mj-xmr in #61
- Charging above the minimum before mining by @mj-xmr in #62
- LCD OCR of a gas pump (not glowing) by @mj-xmr in #63
- Image tests for all supported images & scripts by @mj-xmr in #65
- Temperature readouts by @mj-xmr in #66
- Refactorings by @mj-xmr in #67
- Max charge voltage in the battery config by @mj-xmr in #68
- Unit tests: Habits by @mj-xmr in #69
- Voltage charge soc by @mj-xmr in #70
- Json reader refactoring by @mj-xmr in #71
- Modelling max charge voltage by @mj-xmr in #72
- Stability fixes by @mj-xmr in #73
- CI: segmentation of building and testing by @mj-xmr in #76
- Stability fixes by @mj-xmr in #75
- Production test separate by @mj-xmr in #77
- Voltage plots simplifications by @mj-xmr in #78
- Recognizing simple rectangles representing percentage by @mj-xmr in #79
- Image capture via SSH and a custom script by @mj-xmr in #80
- Docs - OCR & rectangle recognition by @mj-xmr in #81
- Doc: Rectangle recognition & Image capture module by @mj-xmr in #82
- Opti algo solution improvement by @mj-xmr in #83
New Contributors
- @dependabot made their first contribution in #53
Full Changelog: v0.1-beta...v0.2-beta