Thanks mates, as suggested I have added runtimecal = 240,100,720,50 default.battery.voltage.low = 10.4 default.battery.voltage.high = 13.8 (the actual charging voltage) In ups.conf I have also added the startup procedure in rc.local file, everything is fine... I have only to make a deep test. Is there a way to add a NOTIFYMSG value for the battery test? Thank you lots Andrea 2017-06-16 14:50 GMT+02:00 Charles Lepple <clepple at gmail.com>:> On Jun 16, 2017, at 2:20 AM, Andrea de Lutti <adelutti at gmail.com> wrote: > > Using 'guestimation' (low: -0.866667, high: -1.083333)! > > Initial battery charge undetermined > > Driver failed to start (exit status=1) > > The "low" and "high" voltages should correspond to the battery voltage > when it is discharged (LB) and charged, respectively. For a 12V (nominal) > battery, they should not be less than zero :-) > > There is a check for whether the nominal battery voltage is 1, but it > should be looking for -1. (This has been fixed in nutdrv_qx, but was not > backported to blazer*) > > As Manuel suggested, you can use the "defaults.battery.voltage.low" and > "defaults.battery.voltage.high" options in ups.conf - there is a bit of a > chicken-and-egg problem here, but you can still put in approximate values > (say, 10.4 and 13.0) in order to run the calibration, and then adjust them > to the actual reported values. > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170616/54d32e75/attachment.html>
On Jun 16, 2017, at 9:19 AM, Andrea de Lutti <adelutti at gmail.com> wrote:> > Thanks mates, > as suggested I have added > > runtimecal = 240,100,720,50 > default.battery.voltage.low = 10.4 > default.battery.voltage.high = 13.8 (the actual charging voltage) > > In ups.conf > > I have also added the startup procedure in rc.local file, everything is fine... > I have only to make a deep test.Glad that worked.> Is there a way to add a NOTIFYMSG value for the battery test?Do you mean a notification that a test is in progress, or something for the results? There is the REPLBATT message in upsmon when the battery test fails, but I don't think the generic Qx protocol supports the RB status flag. You could possibly trigger on the OB status and look for the CAL flag in ups.status as well, but I haven't tried to automate that.
Good morning again, I have finished some tests and the driver works perfectly for shutting down the server and a client, both Ubuntu 16.04. I have to change the battery, I am unable to test with 100% load and now I have 5 minutes of battery power with a load of 18%. I am still unable to send email notifications, I have enabled all the warnings in upsmon.conf: NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC NOTIFYFLAG FSD SYSLOG+WALL+EXEC NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC NOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC and enabled my email script: NOTIFYCMD /root/mailnotify.sh This is my working script: #!/bin/sh echo "$UPSNAME in is $NOTIFYTYPE state" | mailx -v -r "adelutti at gmail.com" -s "$NOTIFYTYPE" -S smtp="smtp.gmail.com:587" -S smtp-use-starttls -S smtp-auth=login -S smtp-auth-user="adelutti at gmail.com" -S smtp-auth-password="mypassword" -S ssl-verify=ignore adelutti+server at gmail.com; Are there no warnings for battery test? Thank you, Andrea 2017-06-16 15:19 GMT+02:00 Andrea de Lutti <adelutti at gmail.com>:> Thanks mates, > as suggested I have added > > runtimecal = 240,100,720,50 > default.battery.voltage.low = 10.4 > default.battery.voltage.high = 13.8 (the actual charging voltage) > > In ups.conf > > I have also added the startup procedure in rc.local file, everything is > fine... > I have only to make a deep test. > > Is there a way to add a NOTIFYMSG value for the battery test? > > Thank you lots > > Andrea > > 2017-06-16 14:50 GMT+02:00 Charles Lepple <clepple at gmail.com>: > >> On Jun 16, 2017, at 2:20 AM, Andrea de Lutti <adelutti at gmail.com> wrote: >> > Using 'guestimation' (low: -0.866667, high: -1.083333)! >> > Initial battery charge undetermined >> > Driver failed to start (exit status=1) >> >> The "low" and "high" voltages should correspond to the battery voltage >> when it is discharged (LB) and charged, respectively. For a 12V (nominal) >> battery, they should not be less than zero :-) >> >> There is a check for whether the nominal battery voltage is 1, but it >> should be looking for -1. (This has been fixed in nutdrv_qx, but was not >> backported to blazer*) >> >> As Manuel suggested, you can use the "defaults.battery.voltage.low" and >> "defaults.battery.voltage.high" options in ups.conf - there is a bit of >> a chicken-and-egg problem here, but you can still put in approximate values >> (say, 10.4 and 13.0) in order to run the calibration, and then adjust them >> to the actual reported values. >> >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170626/77636a3f/attachment-0001.html>
On Jun 26, 2017, at 7:03 AM, Andrea de Lutti <adelutti at gmail.com> wrote:> > Are there no warnings for battery test?not sure if you saw my reply on 2016-06-17: Do you mean a notification that a test is in progress, or something for the results? There is the REPLBATT message in upsmon when the battery test fails, but I don't think the generic Qx protocol supports the RB status flag. You could possibly trigger on the OB status and look for the CAL flag in ups.status as well, but I haven't tried to automate that. ^^^ If you run "upsc $UPSNAME ups.status", do you see CAL in the status string during a battery test? If not, your UPS is not reporting this the way that the driver expects.