I searched the forum from the website and didn’t get any hits, so I thought I’d ask here. I have an RPi 4B running Home Assistant. It has the NUT integration, and I have a Geekworm X728 UPS Hat installed. It has an I2C interface for reading data. https://raspberrypiwiki.com/X728-Software I was wondering if NUT supports that? Nick Nick Ellson - from iPhone (forgive typos) CCIE #20018; VCIX-NV, CNSE Network Hobbyist "Educating Layer 8, one user at a time." -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20201105/d3b8f7ed/attachment.html>
On Thu, 5 Nov 2020, Nick Ellson wrote:> I searched the forum from the website and didn’t get any hits, so I thought I’d ask here. > I have an RPi 4B running Home Assistant. It has the NUT integration, and I have a Geekworm X728 UPS Hat installed. > > It has an I2C interface for reading data. > > https://raspberrypiwiki.com/X728-Software > > I was wondering if NUT supports that?Not in its current form. The installation script seems to be generating two Python2 scripts which very approximately play the role of a driver attached to NUT's upsd. To get this to work with NUT means writing a C language X728 driver based on the Python2 scripts. Whether it's possible to write a upsd driver in Python3 is an open question. Roger Health warning. Python2 is now well past its end-of-life. No support, not even security updates. It's urgent for X728 to migrate to Python3.
Manuel Wolfshant
2020-Nov-05 21:00 UTC
[Nut-upsuser] NUT with Geekworm x728 UPS Hat on RPi?
On 11/5/20 10:21 PM, Roger Price wrote:> [...] > Health warning. Python2 is now well past its end-of-life. No support, > not even security updates. It's urgent for X728 to migrate to Python3.unless you use a linux distribution which maintains its packages for a long time ( like 10 years ) in which case at least backports are used to close any security holes that are discovered and relevant.
While the init scripts are python 2, the UPS is straight I2C reads, using Python 3 to read and decode the I2C would be easy enough, if I knew how NUT needed to see things. Imma NUT Newbie 😬 Nick Ellson - from iPhone (forgive typos) CCIE #20018; VCIX-NV, CNSE Network Hobbyist "Educating Layer 8, one user at a time."> On Nov 5, 2020, at 12:21 PM, Roger Price <roger at rogerprice.org> wrote: > > On Thu, 5 Nov 2020, Nick Ellson wrote: > >> I searched the forum from the website and didn’t get any hits, so I thought I’d ask here. >> I have an RPi 4B running Home Assistant. It has the NUT integration, and I have a Geekworm X728 UPS Hat installed. >> It has an I2C interface for reading data. >> https://raspberrypiwiki.com/X728-Software >> I was wondering if NUT supports that? > > Not in its current form. The installation script seems to be generating two Python2 scripts which very approximately play the role of a driver attached to NUT's upsd. To get this to work with NUT means writing a C language X728 driver based on the Python2 scripts. Whether it's possible to write a upsd driver in Python3 is an open question. > > Roger > > Health warning. Python2 is now well past its end-of-life. No support, not even security updates. It's urgent for X728 to migrate to Python3._______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
On Thu, 5 Nov 2020, Nick Ellson wrote:> I searched the forum from the website and didn’t get any hits, so I thought I’d ask here. > I have an RPi 4B running Home Assistant. It has the NUT integration, and I have a Geekworm X728 UPS Hat installed. > > It has an I2C interface for reading data. > > https://raspberrypiwiki.com/X728-Software > > I was wondering if NUT supports that?Looking back on this thread, I think we got carried away by Python. To go back to your question: the answer is no, but if you are interested in developing a driver for the X728, there is a driver developer guide at https://networkupstools.org/docs/developer-guide.chunked/ar01s04.html Roger
Also for i2c specifically, you can look at examples in asem and recently pijuice drivers. Hope this helps, Jim Klimov On Wed, Nov 18, 2020, 11:25 Roger Price <roger at rogerprice.org> wrote:> On Thu, 5 Nov 2020, Nick Ellson wrote: > > > I searched the forum from the website and didn’t get any hits, so I > thought I’d ask here. > > I have an RPi 4B running Home Assistant. It has the NUT integration, and > I have a Geekworm X728 UPS Hat installed. > > > > It has an I2C interface for reading data. > > > > https://raspberrypiwiki.com/X728-Software > > > > I was wondering if NUT supports that? > > Looking back on this thread, I think we got carried away by Python. To go > back > to your question: the answer is no, but if you are interested in > developing a > driver for the X728, there is a driver developer guide at > https://networkupstools.org/docs/developer-guide.chunked/ar01s04.html > > Roger_______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20201118/b1e89e22/attachment.html>