I am not sure how to get started on the python API?
I used - pip3 install sixfab-power-python-api to install the module and then used pip3 install sixfab-power-python-api -U to upgrade as I was getting a “No module named ‘power_api’” Issue.
However, now I can’t seen to run any example as they all give out
File “”, line 1, in
File “/home/pi/.local/lib/python3.7/site-packages/power_api/power_api.py”, line 102, in get_input_temp
raw[PROTOCOL_HEADER_SIZE : COMMAND_SIZE_FOR_INT32 - 2], “big”
TypeError: ‘int’ object is not subscriptable
Problems. Any help and guidance will be appreciated.
Out of curiosity do you have a touchscreen attached to your i2c pins? I do and when I disconnect the touchscreen and ssh into the pi instead, it all works perfectly. How can I find out what to do to fix it? I2c addressing?
Check this issue in Github. Other people are experiencing the same thing.
Some things to do
pip3 install sixfab-power-python-api -U
2) Add error handling - one of the users on that posts suggested using this
3) Stop this service and see if it works
sudo systemctl stop pms_agent.service
Support by sixfab is really bad. I remember I bought a few of the quectel EC25 4G module hats and they didnt give any help/reply to my emails lol. I might have to move to Witty Pi 3 to set my pi to sleep like I had previously configured.
Will do my best to keep you updated on what I can find!