Walter HILL
2018-Jun-06 09:18 UTC
[Nut-upsuser] Apple iMac OS X 10.13.5 | Powershield Defender 1200 UPS
Hi All, I am trying to install and configure NUT [ 2.7.4 ] to shutdown my iMac [ 10.13.5 ] via my Powershield Defender 1200 UPS when the UPS reaches a specified lower battery condition. The Defender 1200 attaches to the iMac via USB. The Defender appears on the the HCL - The required driver is 'blazer_usb' The UPS is visible on the USB bus as: USB to Serial: Product ID: 0x5161 Vendor ID: 0x0665 Version: 0.02 Speed: Up to 1.5 Mb/sec Manufacturer: INNO TECH Location ID: 0x14400000 / 25 Current Available (mA): 500 Current Required (mA): 100 Extra Operating Current (mA): 0 I have placed an entry in ups.conf for the UPS. I have created modified nut.conf MODE=standalone I have also created upsmon.conf If I run 'upsdrvctl start' as root I get: h-3.2# ./upsdrvctl start Network UPS Tools - UPS driver controller 2.7.4 Network UPS Tools - Megatec/Q1 protocol USB driver 0.12 (2.7.4) Can't claim USB device [0665:5161]: Function not implemented Driver failed to start (exit status=1) I can see that the VendorID and ProductID appear correctly but the driver fails to start. I have tried searching for other people using the Defender 1200 with a Mac ( in recent times ) but I appear to have 'struck out'. Does anyone know of a relatively recent guide to getting this UPS running on a newer version of OS X? I am aware that Apple have been re-engineering their startup process so I expect that getting the driver to work may be the least of my problems. Thanks, Walter -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ,-_|\ Walter HILL / \ \_,-._/ email: hill(at)ieee(dot)org v -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: OpenPGP digital signature URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20180606/26fbc2ba/attachment.sig>
Charles Lepple
2018-Jun-06 13:41 UTC
[Nut-upsuser] Apple iMac OS X 10.13.5 | Powershield Defender 1200 UPS
On Jun 6, 2018, at 5:18 AM, Walter HILL <hill at ieee.org> wrote:> > Does anyone know of a relatively recent guide to getting this UPS > running on a newer version of OS X? I am aware that Apple have been > re-engineering their startup process so I expect that getting the driver > to work may be the least of my problems. >To be honest, I have not seen much demand for NUT on OS X over the years, so I haven't put a lot of effort into documenting the process end-to-end. I don't mind answering questions, though. IMHO, the quickest way around the macOS USB mess is probably to run the driver on an embedded Linux or FreeBSD system (e.g. Raspberry Pi, Beaglebone), and have the iMac connect to the embedded system as a slave. This has the disadvantage of adding another potential point of failure (or two, if you count the network) into the system, and there is a potential issue if the Mac is asleep when the power goes out, but if we had more frequent power failures in my area, that's what I'd do (using Wake-on-LAN to ensure that the Mac gets the shutdown signal). Whether or not you run the driver on the Mac or elsewhere, you are correct about the startup process (this page is out-of-date: https://github.com/networkupstools/nut/wiki/NUT-on-Mac-OS-X since it refers to StartupItems) If you put a launchd plist in /Library/LaunchDaemons/, it should work with 10.13. Here is some information on that: https://alioth-lists.debian.net/pipermail/nut-upsuser/2012-March/007449.html Another option for running the driver locally might be to find a Cypress USB-to-serial driver that recognizes your UPS. If that works, it would create a /dev node that makes the device look like a classic serial port to the drivers, so you could use the serial-based "blazer" driver, or "nutdrv_qx" (the latter also can communicate over USB, but on macOS, it will likely run into the same "Can't claim USB device" error). To have NUT directly access the UPS over USB, you would need a fake kernel extension ("codeless KEXT" in some documentation) to prevent the OS from claiming the device (which is what causes the "Can't claim USB device" error). This can be difficult to debug, since the OS does not easily give up information about the driver matching/claiming process. For reference, which version of libusb are you using, and did you install it with a package manager such as Fink, MacPorts or Brew?
london jak
2018-Jun-06 14:15 UTC
[Nut-upsuser] Apple iMac OS X 10.13.5 | Powershield Defender 1200 UPS
I got my USB ups reporting on macOS, but it was quite a while ago, I’ll have to dig into how I did it.. I do remember is wasn’t simple.. ( actually is was long drawn out pain in the …. ) Maybe search for posts from me, I’ll check what I did on the weekend and get back to you.. Or, buy an APC.. as they will just appear in Energy Saver..> On 6 Jun 2018, at 15:41, Charles Lepple <clepple at gmail.com> wrote: > > On Jun 6, 2018, at 5:18 AM, Walter HILL <hill at ieee.org> wrote: >> >> Does anyone know of a relatively recent guide to getting this UPS >> running on a newer version of OS X? I am aware that Apple have been >> re-engineering their startup process so I expect that getting the driver >> to work may be the least of my problems. >> > To be honest, I have not seen much demand for NUT on OS X over the years, so I haven't put a lot of effort into documenting the process end-to-end. I don't mind answering questions, though. > > IMHO, the quickest way around the macOS USB mess is probably to run the driver on an embedded Linux or FreeBSD system (e.g. Raspberry Pi, Beaglebone), and have the iMac connect to the embedded system as a slave. This has the disadvantage of adding another potential point of failure (or two, if you count the network) into the system, and there is a potential issue if the Mac is asleep when the power goes out, but if we had more frequent power failures in my area, that's what I'd do (using Wake-on-LAN to ensure that the Mac gets the shutdown signal). > > Whether or not you run the driver on the Mac or elsewhere, you are correct about the startup process (this page is out-of-date: https://github.com/networkupstools/nut/wiki/NUT-on-Mac-OS-X since it refers to StartupItems) If you put a launchd plist in /Library/LaunchDaemons/, it should work with 10.13. Here is some information on that: https://alioth-lists.debian.net/pipermail/nut-upsuser/2012-March/007449.html > > Another option for running the driver locally might be to find a Cypress USB-to-serial driver that recognizes your UPS. If that works, it would create a /dev node that makes the device look like a classic serial port to the drivers, so you could use the serial-based "blazer" driver, or "nutdrv_qx" (the latter also can communicate over USB, but on macOS, it will likely run into the same "Can't claim USB device" error). > > To have NUT directly access the UPS over USB, you would need a fake kernel extension ("codeless KEXT" in some documentation) to prevent the OS from claiming the device (which is what causes the "Can't claim USB device" error). This can be difficult to debug, since the OS does not easily give up information about the driver matching/claiming process. > > For reference, which version of libusb are you using, and did you install it with a package manager such as Fink, MacPorts or Brew? > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
Maybe Matching Threads
- Apple iMac OS X 10.13.5 | Powershield Defender 1200 UPS
- Apple iMac OS X 10.13.5 | Powershield Defender 1200 UPS
- PowerShield Defender 1200VA
- [HCL] PowerShield Defender 1200VA supported by blazer_usb (mustek subdriver)
- Power Shield Defender 1200 - The Story Continues