search for: status_init

Displaying 16 results from an estimated 16 matches for "status_init".

2023 May 22
2
Synthesize low batt (LB) fron SNMP UPS which does not support this?
Hmm. Is there maybe something there already that will do this? Maybe kind of back-handed. In drivers/dstate.c, I see: In status_init(), if ?driver.flag.ignorelb? is set in the driver state, the ?ignorelb? flag is set. In status_set(), if ignorelb is set, and the status being set (presumably from the UPS) is LB, it?s ignored. In other words, LB reported by the UPS is ignored. In status_commit(), if ignorelb is set, there?s code t...
2023 May 24
1
Synthesize low batt (LB) fron SNMP UPS which does not support this?
Hi again, On 5/22/23 18:31, Willcox David via Nut-upsuser wrote: > Hmm. Is there maybe something there already that will do this? Maybe > kind of back-handed. > > In drivers/dstate.c, I see: > > 1. In status_init(), if ?driver.flag.ignorelb? is set in the driver > state, the ?ignorelb? flag is set. > 2. In status_set(), if ignorelb is set, and the status being set > (presumably from the UPS) is LB, it?s ignored. In other words, LB > reported by the UPS is ignored. > 3. In status...
2006 Nov 26
1
Patch for optiups to support Zinto D from ONLINE USV-Systeme AG
...quot;AG" ); + + /* Online-UPS send only "2" when off, without "\r\n" */ + if ( r < 1 && testvar(OPTI_ZINTO) ) + { + ser_send( upsfd, "AG\r\n" ); + r = ser_get_char(upsfd, &_buf[0], 1, 0); + if ( r == 1 && _buf[0] == '2' ) + { + status_init(); + status_set("OFF"); + status_commit(); + return; + } + } + if ( r < 1 ) { upslogx(LOG_ERR, "can't retrieve ups status" ); @@ -289,7 +404,10 @@ return; /* read some easy settings */ - optifill( _pollv, sizeof(_pollv)/sizeof(_pollv[0]) ); + if ( tes...
2007 May 13
0
No subject
...ndicates whether the UPS is on line (1) * or on battery (0) */ online = (reply[3]&4)>>2; /* * 2nd bit of 4th byte indicates battery status; normal (1) * or low (0) */ battery_normal = (reply[3]&2)>>1; status_init(); if (online) { status_set("OL"); } else { status_set("OB"); } if (!battery_normal) { status_set("LB"); } status_commit(); dstate_dataok(); } /* * The shutdown fea...
2007 May 13
0
No subject
...th byte indicates whether the UPS is on line (1) * or on battery (0) */ online = (reply[3]&4)>>2; /* * 2nd bit of 4th byte indicates battery status; normal (1) * or low (0) */ battery_normal = (reply[3]&2)>>1; status_init(); if (online) { status_set("OL"); } else { status_set("OB"); } if (!battery_normal) { status_set("LB"); } status_commit(); dstate_dataok(); } /* * The shutdown feature is a b...
2007 May 13
0
No subject
...th byte indicates whether the UPS is on line (1) * or on battery (0) */ online = (reply[3]&4)>>2; /* * 2nd bit of 4th byte indicates battery status; normal (1) * or low (0) */ battery_normal = (reply[3]&2)>>1; status_init(); if (online) { status_set("OL"); } else { status_set("OB"); } if (!battery_normal) { status_set("LB"); } status_commit(); dstate_dataok(); } /* * The shutdown feature is a b...
2023 May 24
1
Synthesize low batt (LB) fron SNMP UPS which does not support this?
...Carsten Aulbert <carsten.aulbert at aei.mpg.de> wrote: > > Hi again, > > On 5/22/23 18:31, Willcox David via Nut-upsuser wrote: >> Hmm. Is there maybe something there already that will do this? Maybe kind of back-handed. >> In drivers/dstate.c, I see: >> 1. In status_init(), if ?driver.flag.ignorelb? is set in the driver >> state, the ?ignorelb? flag is set. >> 2. In status_set(), if ignorelb is set, and the status being set >> (presumably from the UPS) is LB, it?s ignored. In other words, LB >> reported by the UPS is ignored. >>...
2011 Oct 03
0
patch: Fix [-Wunused-but-set-variable]
...1-05-31 13:36:49.000000000 +0300 +++ b/drivers/etapro.c 2011-08-17 00:23:22.000000000 +0300 @@ -213,7 +213,6 @@ upsdrv_initinfo(void) void upsdrv_updateinfo(void) { - char status[256]; int x, flags; double utility, outvolt, battvolt, loadpct; @@ -292,7 +291,6 @@ upsdrv_updateinfo(void) status_init(); - status[0] = '\0'; if (!(flags & 0x02)) status_set("OFF"); else if (flags & 0x01) Index: b/drivers/gamatronic.c =================================================================== --- a/drivers/gamatronic.c 2011-05-31 13:36:49.000000000 +0300 +++ b/drivers/gam...
2023 May 22
1
Synthesize low batt (LB) fron SNMP UPS which does not support this?
Carsten Aulbert <carsten.aulbert at aei.mpg.de> writes: > Hi all, > > On 5/19/23 15:11, Greg Troxel wrote: >> LB is baked in to nut behavior. So if a UPS doesn't report LB, then >> it makes sense to synthesize it. Synthetic LB is the cleanest fix at >> the earlier processing point. > > I fully agree and thus this ought to be done in/near uspd
2011 Feb 07
4
[PATCH/RFC v2 0/3] Updates to ACP smart driver
This is 2nd version of the earlier patch featuring a few new features and fixes to the apcsmart driver, following the remarks in: http://www.mail-archive.com/nut-upsdev at lists.alioth.debian.org/msg02294.html Major changes from v1: - handle battery.charge and battery.runtime checks at main.c level - handle "immutable but writable" conflict gracefully at driver level -
2006 May 12
1
Fwd: RE New xanto driver for NUT
Dear Andreas, some googling revealed, you created a driver for the xanto series of online-usv.de. In what state it is currently? I've to manage a S2000 and would like to use nut for it, is it usable by now? Do you need another tester? TIA, Pete
2007 Nov 20
2
Mustek Powermust 600VA
Hi, I'm having a hard time configuring a Mustek Powermust 600VA ups to work via USB with nut. I read somewhere that nut works OK via the rs232 cable, but unfortunately I don't have a COM port in my computer. The kernel detects the ups as an Xbox pad :) and loads the xpad module. I tried running /lib/nut/megatec with different /dev/ttySx but it displays megatec protocol UPS was not
2008 Jul 10
2
[PATCH] tripplite driver updates
...buf + 18, 3) / 10.0); + dstate_setinfo("input.voltage", "%0d", volt); + dstate_setinfo("ups.temperature", "%3d", temp); + dstate_setinfo("ups.load", "%3d", load); + dstate_setinfo("input.frequency", "%02.2f", freq); status_init(); /* Battery Voltage Condition */ - switch (buf[0]) { + switch (bcond) { case '0': /* Low Battery */ status_set("LB"); break; case '1': /* Normal */ break; default: /* Unknown */ - upslogx(LOG_ERR, "Unknown battery state: %c", buf[0]);...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...); is_online = p[17] == '0'; low_batt = fromhex(p[21]) & 8 || fromhex(p[20]) & 1; is_off = p[11] == '0'; trimming = p[33] == '1'; boosting = 0; /* FIXME, don't know which bit gets set (brownouts are very rare here and I can't simulate one) */ status_init(); if (low_batt) status_set("LB "); else if (trimming) status_set("TRIM"); else if (boosting) status_set("BOOST"); else status_set(is_online ? (is_off ? "OFF " : "OL ") : "OB "); /* setinfo(INFO_STATUS, "%s%s",...
2008 Dec 24
1
Driver removal notification: al175
Hi Kirill, just to notify you that your al175 driver is being removed from the NUT tree, as of 2.4.0-pre1. if you wish to see it entering the tree again, please contact the Development mailing list to talk about it. Merry Christmas and happy New Year. Arnaud -- Linux / Unix Expert R&D - Eaton - http://www.eaton.com/mgeops Network UPS Tools (NUT) Project Leader -
2005 Dec 19
0
new(er) SEC driver.
...== 0) /* replace */ s = "RB"; } if (sec_support(SEC_ALARM_SYSOFF)) { v = sec_value(SEC_ALARM_SYSOFF); if (strcmp("1", v) == 0) /* Alarm Active */ s = "OFF"; } if (s) { upsdebugx(SEC_LOG_INFO, "Synthesizing status (%s)", s); status_init(); status_set(s); status_commit(); } upsdebugx(SEC_LOG_INFO, "Synthesizing averages..."); /* Average stats */ fsum = 0.0; n = 0; if (sec_support(SEC_INPUT_FREQUENCY_1) && ((v=dstate_getinfo(sec_varlist[SEC_INPUT_FREQUENCY_1].infotag)) != 0)) { fsum...