[Nut-upsdev] GPIO as NUT driver interface?

Jim Klimov jimklimov+nut at gmail.com
Tue Feb 21 20:33:34 GMT 2023

Thanks, looks promising.

Were there any changes to adelsystem sources? (Not on PC now to check

Also `gpio` naming is too generic (might mean helpers to talk to gpio pins,
e.g. some code shareable by i2c or something of the sort). Does this handle
GPIO UPSes in general (e.g. helped by `rules` line arg), or more tightly
aimed at certain models like yours?

Style-wise, there's indeed a fair amount of clean-up desireable. Can you
post a PR with this (or improved) codebase, at least to claim a commit in
git history? :) A man page would be nice.


On Tue, Feb 21, 2023, 20:49 MODRIS BĒRZONIS <modrisb at apollo.lv> wrote:

> Hi!
> I have CyberPower CyberShield CSN27U12V UPS. This device don't have
> usual for UPS interface, just open collector pins. I connected these
> pins to GPIO interface on Orange Pi Zero and wrote NUT driver for this
> case. Any interest from NUT community to add this driver to regular
> build tree?
> See driver code in attachment. Code is fully functional, needs cleanup
> to match coding guidelines and needs more tests for rules processing
> part. Driver reads GPIO line statuses and transforms them to NUT
> statuses using short rules description parameter in the form of status
> strings and logical operations on line values.
> Modris
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20230221/b53adde7/attachment.htm>

More information about the Nut-upsdev mailing list