Re: [Nut-upsuser] upssched setup

2015-04-27 Thread Neil A. Hillard

Hi,

The exec is returning 126 - "Command invoked cannot execute. A 
permission or command not executable problem.".


Are you sure that the script is executable by the user running NUT?  Do 
you have SELinux enabled?


Regards,


Neil.

On 27/04/15 20:55, James Hammond wrote:

Hi Roger,

I get:

Apr 27 20:50:05 unifi upsmon[1022]: UPS ups on battery
Apr 27 20:50:05 unifi upssched[2688]: Timer daemon started
Apr 27 20:50:06 unifi upssched[2688]: New timer: onbatt (20 seconds)
Apr 27 20:50:26 unifi upssched[2688]: Event: onbatt
Apr 27 20:50:26 unifi upssched[2688]: exec_cmd(/sbin/upssched-cmd.sh
onbatt) returned 126
Apr 27 20:50:41 unifi upssched[2688]: Timer queue empty, exiting


/etc/nut/upssched.conf

CMDSCRIPT /sbin/upssched-cmd.sh
PIPEFN /etc/nut/upssched/upssched.pipe
LOCKFN /etc/nut/upssched/upssched.lock
AT ONBATT * START-TIMER onbatt 20
AT ONLINE * CANCEL-TIMER onbatt

/sbin/upssched-cmd.sh

#!/bin/sh
# Debugging: Log all calls to this script
logger -t upssched-cmd.sh Calling upssched-cmd.sh $1
  case $1 in
onbatt)
  /sbin/upsmon -c fsd;;
*)
  echo "shutdown implemented";;
  esac

Any help gratefully received as this has got me beat. Most files
have been chmod to 777 with no difference.

Cheers,

James

 > Date: Mon, 27 Apr 2015 16:04:34 +0200
 > From: ro...@rogerprice.org
 > To: nut-upsuser@lists.alioth.debian.org
 > Subject: Re: [Nut-upsuser] upssched setup
 >
 > On Mon, 27 Apr 2015, James Hammond wrote:
 >
 > > Roger, I did and it didnt work.
 >
 > Aha!, what does your upssched.conf look like? If you add the lines:
 >
 > # Debugging: Log all calls to this script
 > logger -t upssched-cmd.sh Calling upssched-cmd.sh $1
 >
 > to your /sbin/upssched-cmd.sh , what is reported if anything when it
 > doesn't work? Cheers, Roger
 >
 > ___
 > Nut-upsuser mailing list
 > Nut-upsuser@lists.alioth.debian.org
 > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser




___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Differences between USB and serial on an MGE Pulsar Evolution 3000

2011-10-06 Thread Neil A. Hillard

Hi Arnaud,

Many thanks for your quick reply.


Unfortunately there appears to be a lot of parameters missing from the
serial driver (using mge-shut) when compared to the USB driver (usbhid-ups)
and more importantly, output.voltage.nominal is reported at 72 Volts instead
of the correct 230 Volts.





I won't go in depth, but this is a known point:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411864


Many thanks for the pointer.  Don't know how I managed to miss that 
during my searching but that details my experiences, too.




This is also why I've developed the 'newmge-shut' driver, which shares
a lot of code with the usbhid-ups one.
FYI, SHUT stands for Serial HID UPS Transfer, which is basically HID
(as in USB, so the same data) but over a serial link.

the newmge-shut take over has been postponed for some time, but it's
only due to a lack of time and formal testing, more than issues with
this driver. And mge-shut is not really maintained anymore...

could you please test again with newmge-shut, and report back?


I actually noticed newmge-shut just after I sent my original message so 
I've got the upsc output handy (listed below).  I've highlighted the 
values that differ from the USB output (with an asterisk) and I've 
spotted that there are a few parameters missing:


input.frequency.extended
input.frequency.nominal
input.voltage.extended
ups.beeper.status
ups.test.result

If there's anything I can do to help get these added or perform some 
more testing then please let me know.


Many thanks once again,


Neil.


newmge-shut output
--
battery.charge: 100
*battery.charge.low: 100
*battery.charge.restart: 100
battery.energysave: no
*battery.protection: no
battery.runtime: 5400
battery.type: PbAc
device.mfr: MGE UPS SYSTEMS
device.model: Pulsar Evolution 3000
device.serial: AF3E39202
device.type: ups
driver.name: newmge-shut
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/ups0
driver.version: 2.6.2
driver.version.data: MGE HID 1.27
driver.version.internal: 0.35
input.frequency: 50.0
*input.frequency.nominal: 230
input.transfer.boost.low: 184
input.transfer.high: 294
input.transfer.low: 160
input.transfer.trim.high: 265
input.voltage: 237.0
input.voltage.nominal: 230
*outlet.1.autoswitch.charge.low: 1
outlet.1.delay.shutdown: 65535
outlet.1.delay.start: 3
outlet.1.desc: PowerShare Outlet 1
outlet.1.id: 1
outlet.1.status: on
outlet.1.switchable: yes
*outlet.2.autoswitch.charge.low: 3
outlet.2.delay.shutdown: 65535
outlet.2.delay.start: 6
outlet.2.desc: PowerShare Outlet 2
outlet.2.id: 2
outlet.2.status: on
outlet.2.switchable: yes
outlet.desc: Main Outlet
outlet.id: 0
outlet.switchable: no
output.current: 1.00
output.current.nominal: 13.04
output.frequency: 50.0
*output.frequency.nominal: 24
output.voltage: 236.0
output.voltage.nominal: 230
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 10
ups.mfr: MGE UPS SYSTEMS
ups.model: Pulsar Evolution 3000
ups.power: 210
ups.power.nominal: 3000
ups.productid: 
ups.realpower.nominal: 2000
ups.serial: AF3E39202
*ups.start.auto: no
*ups.start.battery: no
*ups.start.reboot: no
ups.status: OL CHRG
ups.test.interval: 604800
ups.timer.shutdown: -1
ups.timer.start: -10
ups.type: offline / line interactive
ups.vendorid: 0463

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


[Nut-upsuser] Differences between USB and serial on an MGE Pulsar Evolution 3000

2011-10-06 Thread Neil A. Hillard

Hi,

I've been using NUT for many years to look after the UPS on my home 
servers.  Originally I was using a Compaq R3000 but that was replaced 
with an MGE Pulsar Evolution 3000 about a couple of years ago because 
the Compaq one was just too noisy!


I'm just setting up a replacement server and would like to connect it 
using a serial cable as I've found that the USB connection occasionally 
drops out on the current server.


Unfortunately there appears to be a lot of parameters missing from the 
serial driver (using mge-shut) when compared to the USB driver 
(usbhid-ups) and more importantly, output.voltage.nominal is reported at 
72 Volts instead of the correct 230 Volts.


I've looked into the source code (I know a little C) but unfortunately 
I'm unable to follow it completely to look at correcting the problem and 
perhaps adding in the missing parameters (if they're available over the 
serial connection.


I've included below a debug output from mge-shut that shows the current 
output voltage being fetched correctly but the nominal voltage coming 
back incorrectly.  I've also included the upsc output for both serial 
and USB connections.


If anyone could give me any advice as to why the nominal voltage is 
decoded incorrectly (or even describe how it's decoded so I can 
investigate it myself) then that would be appreciated.  Advice on how to 
add the extra parameters in would also be appreciated.


Many thanks in advance,


Neil.

Extract from mge-shut -DDD
--
  12.207366 entering hid_get_value(UPS.PowerConverter.Output.Voltage)
  12.207371 entering lookup_path(UPS.PowerConverter.Output.Voltage)
  12.207375 parsing UPS
  12.207384 Looking up UPS
  12.207387 hid_lookup_usage: found 840004
  12.207389 parsing PowerConverter
  12.207392 Looking up PowerConverter
  12.207395 hid_lookup_usage: found 840016
  12.207397 parsing Output
  12.207408 Looking up Output
  12.207411 hid_lookup_usage: found 84001c
  12.207414 parsing Voltage
  12.207416 Looking up Voltage
  12.207419 hid_lookup_usage: found 840030
  12.207422 Path depth = 4

  12.207425 0: Usage(00840004)

  12.207427 1: Usage(00840016)

  12.207430 2: Usage(0084001c)

  12.207433 3: Usage(00840030)

  12.207438 entering shut_get_report(id: 12, len: 1800)
  12.207441 entering shut_packet_send (8)
  12.207444 shut_checksum = a9
  12.207449 sent: (11 bytes) => 81 88 a1 01 12 03 00 00 00 18 a9
  12.263301 received: 06
  12.263310 shut_wait_ack(): ACK received
  12.263315 received ACK
  12.263319 entering shut_packet_recv (6144)
  12.268293 received: 84
  12.272302 received: 88
  12.272312 Receive: (2 bytes) => 84 88
  12.276301 received: 12
  12.280300 received: d2
  12.284295 received: 00
  12.288300 received: 64
  12.292290 received: 00
  12.297295 received: 32
  12.301300 received: eb
  12.305295 received: 00
  12.305306 Receive: (8 bytes) => 12 d2 00 64 00 32 eb 00
  12.309300 received: 7d
  12.309309 shut_checksum: 7d => OK
  12.309316 sent: (1 bytes) => 06
  12.309330 shut_get_report: (8 bytes) => 12 d2 00 64 00 32 eb 00
  12.309339 Object's report: (10 bytes) => 12 d2 00 64 00 32 eb 00 
a1 00

  12.309343 Value = 235
  12.309351 send_to_all: SETINFO output.voltage "235"
  12.309357 entering hid_get_value(UPS.PowerSummary.ConfigVoltage)
  12.309362 entering lookup_path(UPS.PowerSummary.ConfigVoltage)
  12.309366 parsing UPS
  12.309370 Looking up UPS
  12.309375 hid_lookup_usage: found 840004
  12.309384 parsing PowerSummary
  12.309387 Looking up PowerSummary
  12.309390 hid_lookup_usage: found 840024
  12.309392 parsing ConfigVoltage
  12.309395 Looking up ConfigVoltage
  12.309398 hid_lookup_usage: found 840040
  12.309400 Path depth = 3

  12.309411 0: Usage(00840004)

  12.309415 1: Usage(00840024)

  12.309417 2: Usage(00840040)

  12.309423 entering shut_get_report(id: 08, len: 1800)
  12.309426 entering shut_packet_send (8)
  12.309429 shut_checksum = b3
  12.309435 sent: (11 bytes) => 81 88 a1 01 08 03 00 00 00 18 b3
  12.368306 received: 06
  12.368317 shut_wait_ack(): ACK received
  12.368322 received ACK
  12.368326 entering shut_packet_recv (6144)
  12.373292 received: 84
  12.377302 received: 22
  12.377312 Receive: (2 bytes) => 84 22
  12.381302 received: 08
  12.385295 received: 48
  12.385305 Receive: (2 bytes) => 08 48
  12.389302 received: 40
  12.389310 shut_checksum: 40 => OK
  12.389318 sent: (1 bytes) => 06
  12.389331 shut_get_report: (2 bytes) => 08 48
  12.389340 Object's report: (10 bytes) => 08 48 00 64 00 32 eb 00 
a1 00

  12.389344 Value = 72
  12.389352 send_to_all: SETINFO output.voltage.nominal "72"
  12.389358 entering hid_get_value(UPS.PowerSummary.O