Mupihat Akku Status page #2504
Striker62
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've setup 2 Phonieboxes with the Mupiboxhat. After everithing worked fine I thought it would be helpfull to know the status of the Battery . The Mupibox has an Statuspage for the Battery . I asked splitti from the Mupibox project if can give me a hint where to start.
He pointed me to this :
https://github.com/splitti/MuPiBox/tree/main/scripts/mupihat
I've installed the python scripts and play around with them.
As I'm not so familiar with electronics I described my Idea to Chatgpt, here is the result.
Hardware setup ;
Raspberry pi 4 ( Bullseye)
Battery ENERpower 2S2P 10.000mAh
Mupihat v. 2 and v 3
From the Mupibox git I use
mupihat_bq25792.py
mupihat.py
I slidely change the 2 files because they need a json config file to be felxible for several batteries.
I only have one ;-)
the output of mupihat.py is a logfile in the temp folder of the pi.
I developed a pythonsript to analyze the log and privide a webpage with the result .
For the webpage I use flask because I don't whant to chnage to much of the original Phonie box software.
The script also create a csv file .
I placed the scripts here /home/pi/MupiHatT/scripts
The csv file will created here /home/pi/MupiHatT/log
the service files has to be placed here /etc/systemd/system
To reach the page from the Phoniebox webside I add a new topic in the navigation. I is done by adding one line to the file
/home/pi/RPi-Jukebox-RFID/htdocs/inc.navigation.php (search in my file for Akku Stat to find the new line)
Result page ;
I collect all stuff in the akkustat.zip also my 2 service files .
Akkustat.zip
I hope I did not miss somethig.
!!!!!! This is work in progress and only a template for others, so be carefull .
Beta Was this translation helpful? Give feedback.
All reactions