-
Notifications
You must be signed in to change notification settings - Fork 43
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
I2C sensor #159
Comments
After starting a new branch for your modification: First you need to put a modified version of https://github.com/suptronics/x120x/blob/main/bat.py file into the ext_sensor_lib folder. You need to modify it because it will be executed directly if you import it. Maybe you use an Modify your config.py
Then you need to modify the src/rpi-cpu2mqtt.py file:
There are many possibilities, this is just one idea. Maybe not the best. When I implemented the external sensors I tried already to give a little structure. |
Thanks for the detailed feedback, but I think it is out of my programming skills to go and modify the code. Knowing that it is possible gives me hope that someone can do it, or at least help me write the code and test it. Congratulations on the great job you did, I'm a little jealous...hahaha |
I wrote some code for you. https://github.com/pallago/rpi-mqtt-monitor/tree/suptronicsx1202
|
Thanks, you are really awesome! I tried everything you told me, and when I send the checkrun command: [['UPS', 'x1202', '0x36', [1, 100]]] but no new sensors in HA. |
Did you try with the original master version? Only if this works, then we can continue to think why this does not work. In case it works, maybe a refresh (F5) in Home Assistant helps? |
Maybe I'm doing something wrong...let's recap:
At this point I'm sure I'm confusing something, because I always get the same output and no new sensors in HA, I've tried and tried several times, deleting and redoing everything from scratch but with no results. |
Hi, if I remember correctly, a sensor that can read from the Pi's I2C bus has recently been integrated, I'm using a Suptronics X1202 UPS on my Pi 5, I would like to know if it is possible to read voltage and capacity, from their script I can do it and it would be great to have it on HA.
X1202 Script here: https://suptronics.com/Raspberrypi/Power_mgmt/x120x-v1.0_software.html
The text was updated successfully, but these errors were encountered: