-
Notifications
You must be signed in to change notification settings - Fork 103
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 plugin for piusv #981
base: develop
Are you sure you want to change the base?
Add plugin for piusv #981
Conversation
Anyone able to test this? |
piusv/__init__.py
Outdated
Main class of the Plugin. Does all plugin specific stuff and provides the update functions for the items | ||
""" | ||
# Handle | ||
piusv_handle = smbus.SMBus(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does instantiation connect to SMBus? In that case please initialize as None and intantiate in run(). Otherwise, I'd also recommend moving this to init to prevent class-members to span multiple instances (cleaner code)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will have a look
Do I need to install the new piupsmon version in order to run the plugin? I can test the plugin if it runs with the original versio n. |
The plugin does not need any piupsmon. I communicates with piusv via I2C. You can disable piupsmon. |
Thanks for the plugin! It has been on my to-do list for a long time but I'm not really familiar with Python (yet). Configuration docs are missing but I got it running. Had to activate i2c in raspi-config and add the user "smarthome" to the "i2c" group.
The Webif is working well, however. It would be nice to see the voltage / current values in their physical units and an explanation of the status code would be great. Do I have to add |
I added the missing status variable. Surprisingly I did not get this error. The status value is the raw value from the piusv. You are right, it should be translated: |
Starts now without error. Thanks!
|
This is for the piusv+.
The original SW for piusv+ is not up to date any longer. A open source version in C is available here:
https://github.com/dehapama/piupsmonitor-raspberrypi
The plugin communicates directly with the PIUSV via I2C. There is still some work to do but the major
functions are OK. Fine tuning is still needed.