]> mj.ucw.cz Git - arexx.git/commitdiff
Home: Switched sensors
authorMartin Mares <mj@ucw.cz>
Sat, 26 Jan 2013 18:00:05 +0000 (19:00 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 26 Jan 2013 18:00:05 +0000 (19:00 +0100)
arexxd.c
web/temp-12h.cgi

index a84d9ffb17a8326f602150787829a06162b59ea8..52cb17c71401e5cff4332e328790b54737a102a0 100644 (file)
--- a/arexxd.c
+++ b/arexxd.c
@@ -33,7 +33,7 @@
  */
 #define MAX_PAST_TIME 30*86400
 #define MAX_FUTURE_TIME 300
-#undef IGNORE_UNKNOWN_SENSORS
+#define IGNORE_UNKNOWN_SENSORS
 
 typedef unsigned char byte;
 static libusb_context *usb_ctxt;
@@ -190,6 +190,9 @@ static double correct_point(int id, double val, const char **name)
                case 10707:
                        *name = "balcony";
                        return val - 0.71;
+               case 11699:
+                       *name = "outside";
+                       return val;
                case 19246:
                        *name = "catarium";
                        return val + 0.49;
@@ -197,7 +200,7 @@ static double correct_point(int id, double val, const char **name)
                        *name = "catarium-rh";
                        return val;
                case 12133:
-                       *name = "outside";
+                       *name = "aquarium";
                        return val + 0.44;
                default:
 #ifdef IGNORE_UNKNOWN_SENSORS
index 3e82db68ffdd0235556943009533d5d23715140d..4ea9dc256a903efaae1f033df659ccb17abdce39 100755 (executable)
@@ -16,6 +16,7 @@ exec rrdtool graph - \
        DEF:u=$D/sensor-ursarium.rrd:temp:AVERAGE \
        DEF:b=$D/sensor-balcony.rrd:temp:AVERAGE \
        DEF:o=$D/sensor-outside.rrd:temp:AVERAGE \
+       DEF:t=$D/sensor-aquarium.rrd:temp:AVERAGE \
        'AREA:c#cc7777' \
        'AREA:u#7777cc' \
        'AREA:b#cc77cc' \
@@ -23,5 +24,6 @@ exec rrdtool graph - \
        'LINE2:c#cc0000:Catarium\n' \
        'LINE2:u#0000cc:Ursarium\n' \
        'LINE2:b#cc00cc:Balcony\n' \
-       'LINE2:o#00cc00:Outside' \
+       'LINE2:o#00cc00:Outside\n' \
+       'LINE2:t#00cccc:Aquarium' \
        'HRULE:0#0000ff'