[Nut-upsdev] AEG - PROTECT HOME support using NUT with serial protocol

Joachim Schiele js at lastlog.de
Thu Mar 29 18:52:49 UTC 2012


On 03/29/2012 04:24 PM, Arnaud Quette wrote:
>
> 2012/3/29 Joachim Schiele <js at lastlog.de <mailto:js at lastlog.de>>
>
>     hi,
>
>     i own a aeg protect home (think it is a 600 VA) which has a serial
>     and an usb port.
>
>     using this hack in ups.conf:
>      [bestupsname]
>           driver = bestups
>           port = /dev/ttyUSB0
>           ID = FOR,750,230,230,11.0,13.5
>           desc = "home-server"
>
>     i start the driver with:
>      ./bestups -a bestupsname -D -q
>
>
> the bestups driver is indeed part of the large "Q1 protocol" family:
> https://alioth.debian.org/pm/task.php?func=detailtask&project_task_id=493&group_id=30602&group_project_id=318 
> <https://alioth.debian.org/pm/task.php?func=detailtask&project_task_id=493&group_id=30602&group_project_id=318>
>
>     and after adding some debugging it seems to work (not yet in
>     production). i first started by looking at the protocol and it is
>     very very similar to
>     www.networkupstols.org/ups-protocols/megatec.html
>     <http://www.networkupstols.org/ups-protocols/megatec.html> at
>     least protocol wise.
>
>
> so the way to go is blazer_ser or blazer_usb
>
>     but i have a few problems
>
>     ==== problem 1 ====
>     using FOR is wrong as it then reports as a different device than
>     it actually is. should i add a new device string, say APH?
>
>     ==== problem 2 ====
>     i would like to use the usb protocol but i don't know where to start.
>
>     lsusb
>     Bus 003 Device 003: ID 0665:5161 Cypress Semiconductor USB to Serial
>
>
> confirming blazer_usb support

both blazer_ser and blazer_usb seem to work although i had some problems 
as i forgot to run, the command below, with the -u root parameter. and 
because i forgot that i searched the wrong thing for quite a while (udev 
rules):

./blazer_usb -a blazer_usb -DDD -q
   0.001342     Trying to match device
    0.001348     Device matches
    0.001356     failed to claim USB device: could not claim interface 
0: Operation not permitted
    0.001363     failed to detach kernel driver from USB device: could 
not detach kernel driver from interface 0: Operation not permitted
    0.001370     failed to claim USB device: could not claim interface 
0: Operation not permitted
    0.001377     failed to detach kernel driver from USB device: could 
not detach kernel driver from interface 0: Operation not permitted
    0.001383     failed to claim USB device: could not claim interface 
0: Operation not permitted
    0.001389     failed to detach kernel driver from USB device: could 
not detach kernel driver from interface 0: Operation not permitted
    0.001396     failed to claim USB device: could not claim interface 
0: Operation not permitted
    0.001402     failed to detach kernel driver from USB device: could 
not detach kernel driver from interface 0: Operation not permitted
    0.001408     Can't claim USB device [0665:5161]: could not detach 
kernel driver from interface 0: Operation not permitted

but then with -u root it worked:

./blazer_usb -a blazer_usb -u root -DDD -q
    ...
    0.067478     Trying to match device
    0.067484     Device matches
    0.073450     Trying megatec protocol...
    0.077431     send: Q1
    0.432493     read: (237.2 237.2 233.6 004 49.9 13.5 25.0 00001001
    0.432574     Status read in 1 tries
    0.432581     Supported UPS detected with megatec protocol
    0.436440     send: F
    0.624780     read: #230.0 002 12.00 50.0
    0.624819     Ratings read in 1 tries
    0.628442     send: I

thanks very much! i wonder if the UPS works with 'just' that!

>
> cheers,
> Arnaud
> -- 
> Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
> Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
> Debian Developer - http://www.debian.org
> Free Software Developer - http://arnaud.quette.free.fr/
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20120329/0eb2e750/attachment-0001.html>


More information about the Nut-upsdev mailing list