search for: dstate_setinfo

Displaying 20 results from an estimated 50 matches for "dstate_setinfo".

2009 Feb 04
2
[nut-commits] svn commit r1765 - in trunk: . drivers man
....] > 187 } Consider returning the error message through something like > 124 case ERR_NO_ERROR: > 125 return "OK"; instead of doing this indirectly through an index in an array of error strings. This makes sure these don't get out of sync. > 547 dstate_setinfo("ups.StatusUPS", "%08lX", > ups.StatusUPS) ; > 548 dstate_setinfo("ups.ShortStatus", "%04X", > ups.ShortStatus) ; Don't 'invent' new variables without discussing this on the development mailinglist. Since these are...
2005 Oct 10
1
Re: About blazer, powermust and mustek
...NSUCCESS) { - fatalx("Mustek PowerMust UPS, or compatible, not detected."); + fatalx("Megatec protocol UPS not detected."); } - upslogx(LOG_INFO, "Mustek PowerMust UPS, or compatible, detected."); + upslogx(LOG_INFO, "Megatec protocol UPS detected."); dstate_setinfo("driver.version.internal", "%s", DRV_VERSION); - dstate_setinfo("ups.mfr", "Mustek"); - dstate_setinfo("ups.model", "PowerMust"); + dstate_setinfo("ups.mfr", "unknown"); + dstate_setinfo("ups.model", "unk...
2007 Dec 29
1
[nut-commits] svn commit r1204 - in trunk: . drivers
Carlos Rodrigues wrote: > Author: carlosefr-guest > Date: Sat Dec 29 20:17:01 2007 > New Revision: 1204 > > Log: > - drivers/megatec.c: detect OB status while OFF. You've changed a bit more than this line suggests. [...] > @@ -565,10 +575,16 @@ > dstate_setinfo("input.voltage.fault", "%.1f", query.fvolt); > dstate_setinfo("output.voltage", "%.1f", query.ovolt); > dstate_setinfo("ups.load", "%.1f", query.load); > - dstate_setinfo("input.frequency", "%.1f", query.fr...
2006 Apr 26
1
RE nut 2.0 fentonups and Xanto S3000R
...ect a Fenton or Megatec protocol UPS"); - temp[11] = 0; - temp[27] = 0; + snprintf(temp, sizeof(temp), "%s", raw); - /* manufacturer */ - rtrim(&temp[1], ' '); - dstate_setinfo("ups.mfr", &temp[1], 0, 0); + temp[11] = 0; + temp[27] = 0; - /* L660A = PowerPal (L) @ 660 VA, American (A) version (115V) */ + /* manufacturer */ +...
2006 Nov 26
1
Patch for optiups to support Zinto D from ONLINE USV-Systeme AG
...+/* Handle variable setting */ +static int setvar(const char *varname, const char *val) +{ + int status; + if (sscanf(val, "%d", &status) != 1) { + return STAT_SET_UNKNOWN; + } + + if (strcasecmp(varname, "outlet.1.switch") == 0) { + status = status==1 ? 1 : 0; + dstate_setinfo( "outlet.1.switch", "%d", status); + optiquery(status ? "Oi11" : "Oi10"); + dstate_dataok(); + return STAT_SET_HANDLED; + } + + return STAT_SET_UNKNOWN; +} + void upsdrv_initinfo(void) { int r; + if ( testvar(OPTI_ZINTO) ) + { + /* If UPS is off, sw...
2008 Jul 10
2
[PATCH] tripplite driver updates
...sizeof w_value) < 1) + sleep(1); + while (send_cmd(":L\r", l_value, sizeof l_value) < 1) + sleep(1); + while (send_cmd(":V\r", v_value, sizeof v_value) < 1) + sleep(1); + while (send_cmd(":X\r", x_value, sizeof x_value) < 1) + sleep(1); dstate_setinfo("ups.mfr", "%s", "Tripp Lite"); @@ -365,57 +352,111 @@ void upsdrv_shutdown(void) void upsdrv_updateinfo(void) { char buf[256]; - int bp; - float bv; + int bp, volt, temp, load, vmax, vmin, stest, len; + int bcond, lstate, tstate, mode; + float bv, freq; + + len...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...if defined(__sgi) && ! defined(__GNUC__) #define inline __inline #endif static int instcmd (const char *cmdname, const char *extra); static int upsdrv_setvar (const char *varname, const char *val); /* rated VA load if known */ static int maxload = 0; void upsdrv_initinfo(void) { dstate_setinfo("ups.mfr", "Best Power"); dstate_setinfo("ups.model", "Fortress"); dstate_setinfo("battery.voltage.nominal", "24"); /*dstate_setinfo ("alarm.overload", "0");*/ /* Flag */ /*dstate_setinfo ("alarm.temp", &...
2006 Feb 09
6
gcc4 compiler warnings
Hi all! The following files emits warnings when compiled with gcc 4.0: al175.c bcmxcp_ser.c belkinunv.c cyberpower.c everups.c powercom.c solis.c All warnings seem to be of this variety: everups.c:38: warning: pointer targets in passing argument 2 of 'ser_get_char' differ in signedness I suggest that those who fiddles with those drivers fixes the warnings and verifies that it works
2006 Oct 11
2
Adding TrippLite SMART550 / Protocol 2001 Support
...return TRIPP_LITE_OMNIVS2; case 0x3003: upslogx(3, "Using SMARTPRO protocol (%x)", proto); return TRIPP_LITE_SMARTPRO; @@ -861,7 +865,7 @@ return; } - if(tl_model != TRIPP_LITE_OMNIVS) { + if(tl_model != TRIPP_LITE_OMNIVS && tl_model != TRIPP_LITE_OMNIVS2) { dstate_setinfo("ups.debug.S","%s", hexascdump(s_value+1, 7)); } @@ -893,6 +897,44 @@ } } + + if(tl_model == TRIPP_LITE_OMNIVS2) { + switch(s_value[2]) { + case '0': + dstate_setinfo("battery.test.status", "Battery OK"); + break; + case '1...
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 -
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
2008 Aug 21
2
cpsups and OP1250.
Hey All: I have a CyberPower OP1250 and I'm trying to mod the cpsups driver to work with it. I added the following lines to cpsups.c /* Added: Andrew Tubbiolo EXPERIMENTAL Aug 15, 2008 */ if(!strcmp(abbr, "#1250VA ")) { dstate_setinfo("ups.mfr", "%s", "CyberPower"); dstate_setinfo("ups.model", "CPS_OP1250 %s",rating); // FIXME! dstate_setinfo("ups.runtime", "%s", "40"); //From datastream. dstate_setinfo("ups.power.n...
2014 May 19
2
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
...16:20:58.251634449 -0400 +++ tripplite_usb.c 2014-05-19 16:53:54.806609602 -0400 @@ -1098,8 +1098,8 @@ - /* This may not be right... */ - if(tl_model == TRIPP_LITE_SMARTPRO) { - battery_charge = (unsigned)(s_value[5]); - dstate_setinfo("battery.charge", "%u", battery_charge); - } } @@ -1167,9 +1167,22 @@ hex2d(d_value+1, 2) * input_voltage_scaled / 120); bv = hex2d(d_value+3, 2) * battery_voltage_nominal / 120.0 ; - + // b...
2012 Mar 08
18
some fixes, improvements, and new features (EPO and DYING) for NUT
Here are a series of my recent changes to NUT. The first few in the set are primarily little fixes and improvements. In among those are a few for .gitignore files which of course you can ignore for SVN, and there's one for a commit to a generated file which of course should not be tracked in any VCS. Then there are a couple or three to do with generating the header files used by
2005 Dec 19
0
new(er) SEC driver.
...alue); return; } for (e=sec_edi(varnum); sec_enumdata[e].type == varnum; e++) { if (sec_enumdata[e].index == i) break; } if (sec_enumdata[e].type == varnum) { /* out of bounds otherwise */ snprintf(buf, SEC_SIZE, "\"%s\" (ENUM)", sec_enumdata[e].value); dstate_setinfo(sec_varlist[varnum].infotag, "%s", sec_enumdata[e].value); } else snprintf(buf, SEC_SIZE, "\"%d\" (Invalid ENUM)", i); } else if (sec_varlist[varnum].flags & SEC_FLAG_STRING) { snprintf(buf, SEC_SIZE, "\"%s\" (STRING)", s); dstate_s...
2007 Jul 31
1
Proposed apcsmart driver patch
...odel information */ - if (!strcmp(buf, "6QD")) { + if(!strcmp(buf, "8QD") || /* (SmartUPS 1250, vintage 07/94.) */ + !strcmp(buf, "6QD") || /* (APC600.) */ + !strcmp(buf, "6TI")) { /* (APC600.) */ upsdebugx(1, "Found Smart-UPS"); dstate_setinfo("ups.model", "Smart-UPS"); } - else if (!strcmp(buf, "6TI")) { - upsdebugx(1, "Found Smart-UPS"); - dstate_setinfo("ups.model", "Smart-UPS"); - } - else return 0; + else + return 0; } upsdebugx(2, "Firmware: [%s]&...
2014 May 20
0
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
...tripplite_usb.c 2014-05-19 16:53:54.806609602 -0400 > @@ -1098,8 +1098,8 @@ > > - /* This may not be right... */ > - if(tl_model == TRIPP_LITE_SMARTPRO) { > - battery_charge = (unsigned)(s_value[5]); > - dstate_setinfo("battery.charge", "%u", battery_charge); > - } > } > > @@ -1167,9 +1167,22 @@ > hex2d(d_value+1, 2) * input_voltage_scaled / 120); > > bv = hex2d(d_value+3, 2) * battery_voltage_nominal /...
2007 Jan 02
5
Cpsups driver with a CyberPower OP1000E
...al gets set to 1000 in model_set(). Later when doing a dstate_getinfo() on it, it just woes. So I applied the following fix and it works now beautifully: --- cpsups.c.orig 2007-01-02 00:42:06.000000000 +0100 +++ cpsups.c 2007-01-02 00:46:22.000000000 +0100 @@ -78,7 +78,7 @@ dstate_setinfo("ups.mfr", "%s", "MicroDowell"); dstate_setinfo("ups.model", "B.Box BP 1000 %s", rating); dstate_setinfo("ups.runtime", "%s", "50"); - dstate_setinfo("ups.voltage"...
2007 Feb 25
4
Some questions on driver implementation and variable names
...nning a battery test, apart from running until empty, I can set a time. Anything like ups.test.duration? In case my setvar routine knows the name, but the value is illegal, I suppose I have to return STAT_SET_UINKNOWN despite the name being known, right? If I accept a setvar(), do I have to dstate_setinfo() the variable or does some generic routine do so for me? Does "calibrate" mean to run on battery until exhausted or seomething else? The text for the "OB" status says "inverter is powering the load". Despite that, I assume that with an online UPS, I'm not...
2007 May 13
0
No subject
...nutusb_close(upsdev, "USB"); } void upsdrv_reconnect(void) { upslogx(LOG_WARNING, "RECONNECT USB DEVICE\n"); nutusb_close(upsdev, "USB"); upsdev = NULL; sleep(3); upsdrv_initups(); } void upsdrv_initinfo(void) { dstate_setinfo("driver.version.internal", "%s", DRV_VERSION); dstate_setinfo("ups.mfr", "Sweex"); dstate_setinfo("ups.model","Unknown"); } void upsdrv_updateinfo(void) { unsigned char reply[REPLY_PACKETSIZE]; int ret, on...