[Nut-upsuser] [EXTERNAL] trying to talk to TrippLite SMX1500LCD using RPI & NUT
Cor Koelewijn
cor.koelewijn at gmail.com
Wed Nov 25 13:50:25 GMT 2020
Hi Stuart,
You steered me on the right path!
With that infor I did a bit of Ducking and found that Raspberry-pi's are
actually PPPS capable!
So I downloaded the script from: https://github.com/mvp/uhubctl and
compiled it and sure enough: it works!
So now I can reload the driver and reset the power in a shell script but
the question I still have is how to make nut to run that script?
Is there a way to run that script when the ups is 'stale'..?
Thanks soo much for your help!
Cor Koelewijn
Tororo - Uganda (where power is TOOOO unstable ;-)
On Tue, Nov 24, 2020 at 9:43 PM Stuart D Gathman <stuart at gathman.org> wrote:
> On Tue, 24 Nov 2020, Marco Walther wrote:
>
> > On 11/24/20 9:11 AM, Kirk Bocek wrote:
> >>
> >> On 11/24/2020 8:10 AM, David Zomaya wrote:
> >>>>> Only when I physically unplug it and plug it in again will it start.
>
> You need a USB hub that supports either mandatory all ports off (even
> though it is mandatory, very few hubs sold actually implement it),
> or optional PPPS (per port power switching). With older kernels,
> I was able to use hub-ctrl to power off the port with the UPS, and
> then power it on again - which has the same effect as unplugging the
> cable. I put all this into a package (trippfix on github) for CentOS-6.
>
> With newer kernels, e.g. CentOS-8, the kernel knows how to deal with
> this kind of braindamage, and will do the PPPS power cycle
> automatically (which won't work, of course, unless you have a hub
> that actually supports it). So with C8, I don't need my package.
>
> Here is an example from dmesg of the kernel doing the power cycle
> automatically:
>
> [1909765.932951] usb 2-1.4-port4: disabled by hub (EMI?), re-enabling...
> [1909765.933328] usb 2-1.4.4: USB disconnect, device number 17
> [1909766.898490] usb 2-1.4-port4: Cannot enable. Maybe the USB cable is
> bad?
> [1909767.754326] usb 2-1.4-port4: Cannot enable. Maybe the USB cable is
> bad?
> [1909767.754586] usb 2-1.4-port4: attempt power cycle
> [1909768.774301] usb 2-1.4.4: new low-speed USB device number 20 using
> ehci-pci
> [1909768.817887] usb 2-1.4.4: New USB device found, idVendor=09ae,
> idProduct=3016, bcdDevice= 0.02
>
> >>>>> Is there a way I can do something about that?
>
> Get a hub that supports PPPS.
>
> Since all USB microcontrollers on the market support PPPS, you can
> also add it yourself if you are so inclined:
>
>
> http://hackaday.com/2014/02/05/software-controlled-per-port-power-switching-for-usb-hubs/
>
> For a list of working hubs when I bought mine in 2016:
>
> https://github.com/codazoda/hub-ctrl.c
>
> This is not something NUT can really do anything about (other than
> the driver recovering properly when the UPS goes away and then comes back).
> It is braindead USB hardware in many Tripplite boxes.
>
> My Tripplite does really well at handling the surges that come with
> power failures and switching to alternate circuits or home generator
> power. So it was worth it to work around its USB braindamage. Buying a
> higher end device might have been more cost effecting considering
> my time - but wouldn't be nearly as fun...
>
>
> _______________________________________________
> 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/20201125/7fbdeb70/attachment.html>
More information about the Nut-upsuser
mailing list