[Nut-upsdev] battery.temperature vs ups.temperature

George Ross gdmr at inf.ed.ac.uk
Tue Mar 4 09:36:47 UTC 2008


The (2.2.1) upshid-ups driver reports battery.temperature rather than 
ups.temperature.  Here's a quick patch to have it show up in the status 
page...

--- clients/upsstats.c.DIST     2008-03-04 09:15:40.000000000 +0000
+++ clients/upsstats.c  2008-03-04 09:16:20.000000000 +0000
@@ -787,6 +787,11 @@
                return 1;
        }
 
+       if (!strcmp(cmd, "BATTTEMP")) {
+               do_temp("battery.temperature");
+               return 1;
+       }
+
        if (!strcmp(cmd, "AMBTEMP")) {
                do_temp("ambient.temperature");
                return 1;
--- conf/upsstats.html.sample.DIST      2008-03-04 09:23:38.000000000 +0000
+++ conf/upsstats.html.sample   2008-03-04 09:22:10.000000000 +0000
@@ -157,6 +157,10 @@
 @IFSUPP ups.temperature@
 @UPSTEMP@
 @DEGREES@
+ at ELSE@
+ at IFSUPP battery.temperature@
+ at BATTTEMP@
+ at DEGREES@
 @ENDIF@
 </td>
 

-- 
Dr George D M Ross, School of Informatics, University of Edinburgh
    Kings Buildings, Mayfield Road, Edinburgh, Scotland, EH9 3JZ
Mail: gdmr at inf.ed.ac.uk   Voice: +44 131 650 5147   Fax: +44 131 667 7209
 PGP: 1024D/AD758CC5  B91E D430 1E0D 5883 EF6A  426C B676 5C2B AD75 8CC5
          "The University of Edinburgh is a charitable body,
      registered in Scotland, with registration number SC005336."


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 236 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20080304/e26f1e5f/attachment.pgp 


More information about the Nut-upsdev mailing list