-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for X708 UPS HAT #3087
Conversation
Thats an interesting integration. I see if I can get a hands on those boards to test your integration. I added it to the v1.8.2 milestone for possible merge .. a bit up the line because v1.8.0 & 1.8.1 wil be very WebUI focused.
You can keep things in your repo and install it on demand, but then after cloning the repo within RaspiBlitz script it should checkout to a certain commit hash for security reasons. |
d88bbc1
to
7fe1c6e
Compare
It would be great to have someone double-check the whole thing.
|
Progress looks great. If you think you have everything in there you can remove |
Done changing title. I think only repo maintainers can add tags/labels. |
7fe1c6e
to
9c3fe41
Compare
Bumped the repo version to checkout. A major improvement was added.
Now, to do it right, when the x708 starts waiting for Pi to shutdown a background loop is started with a specific timeout after which the UPS is triggered to wait for Pi shutdown again. This way the RaspiBlitz shutdown script can take very long and the hat will properly cut off the power afterwards. |
9c3fe41
to
5f1d671
Compare
Bumped again. The functionality seems fully developed. It would be nice to get some feedback from others using this UPS board with the scripts. |
@HiLivin if you prepare a tweet asking for broader feedback on this feature (Call for Testers) .. I am happy to share. |
I have installed the X708 V2.0 and I have applied this PR to 1.7.2. After reboot, it is doing now every time a shutdown. I will wait what will happen when the battery are fully loaded. (They are now at 25%) |
After reaching MIN_VOLTAGE = 4.0, my raspi could start. |
Great! So that's a new board. The automatic shutdown should be called when |
5f1d671
to
7782c19
Compare
I have installed the X708 V2.0 on my raspiblitz V. 018.0 and all works . |
Perfect - so I am merging to be included in v1.8.1 release. |
A suggestion would be the integration of a simple monitoring of the battery charge. - x708.info.py My battery setting MIN_VOLTAGE = 3.7 # (volts) shutdown when voltage drops below this value I optimised my fans at HIGH_THRESHOLD = 56 # (degrees Celsius) Fan running at high speed at this temperature. |
@smamamo if you like to add furthe rimprovements, it best to start a new PR on it |
This adds a possibility to install X708 scripts with
blitz.ups.sh on x708
.Succesfully tested the code on the
dev
branch with Raspberry Pi 4B+ and X708 v1.2 UPS HAT.The
blitz.shutdown.sh
is executed before cutting off the power to the Raspberry PiThe I2C is being enabled to allow getting data from the on-board battery management chip. I haven't found any issues as referenced by i2c /dev entries driver #1058
The battery voltage and AC state are correctly fetched by
_background.scan.sh
and later displayed on the status windowStill, I'd like to know if it's alright to link to my repo for downloading the scripts or maybe it would be better to pack them and put somewhere along with other RaspiBlitz code.