Gargoyle USB UPS daemon

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
wallythacker
Posts: 16
Joined: Wed Oct 28, 2015 12:14 pm

Gargoyle USB UPS daemon

Post by wallythacker »

In a nutshell, I'd like to have my router plugged into my USB APC UPS and have Gargoyle send shutdown commands to my NAS units when extended power goes out. All my NAS units are Linux based and I've gained root access to them.

Be nice to send remote shutdown commands to running PCs as well but I run all Windows on my user appliances.

I'm guessing this can be done as Linux doesn't seem to have any limitations? J/K.

Bear in mind I'm no Linux guru, I can barely remember that CLS clears a WIN CMD screen. HaHa.

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Gargoyle USB UPS daemon

Post by Lantis »

Install apcupsd and have a go.

That would be the first step.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

wallythacker
Posts: 16
Joined: Wed Oct 28, 2015 12:14 pm

Re: Gargoyle USB UPS daemon

Post by wallythacker »

Thanks,

I'll give it a shot. What's the worst that can happen?

I destroy my out of warranty $60 router by issuing a retarded write command to destroy everything?

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Gargoyle USB UPS daemon

Post by Lantis »

Even if you issued something to the equivalent of "delete everything" the router would still be recoverable because the base system is held in ROM. ;)

However, playing the third party firmware game is always inherently risky, and one should always have a spare $60 to replace their mistakes.
No warranty would cover third party firmware anyway.


Almost all mistakes are recoverable. I'd be more worried about a power surge through the ups taking out the router than messing around with code :)
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

wallythacker
Posts: 16
Joined: Wed Oct 28, 2015 12:14 pm

Re: Gargoyle USB UPS daemon

Post by wallythacker »

Of course. ROM.

That explains why my 2nd router which was flashed with OpenWrt, multiple flashes of factory and ddwrt images and probably an image or two for one of my NAS boxes (J/K) did a Lazarus and rose from the dead after 10-15 minutes .

It was pretty cool seeing my Gargoyle AP names, then a generic ddwrt AP, finally the stock dual band TP-link AP names. All within about 5 minutes after it rose from the dead.

Anyhow, I'm glad I have my 2nd router to screw around on. I won't impact my production network.

Cheers

Cachorro
Posts: 44
Joined: Sat Jun 15, 2013 7:38 am

Re: Gargoyle USB UPS daemon

Post by Cachorro »

Hi folks,
I'm also in the need of a solution as the one Wallythacker was looking for in 2015.
But at a simple end user level, using a Gargoyle plugin - same as I would for the USB printer.

My UPS is no APC, its a SoyoMec. But all the same with generic protocols. I am able to get it working fine using my QNap and WinNut, but would much rather have it directly onto my router.

Thanks.

Post Reply