]> hydra-www.ietfng.org Git - acmetensortoys-snakecontrol/commitdiff
Bunch of updates, including new lcdproc client
authorNathaniel Wesley Filardo <nwfilardo@gmail.com>
Wed, 7 Jun 2017 16:34:19 +0000 (12:34 -0400)
committerNathaniel Wesley Filardo <nwfilardo@gmail.com>
Wed, 7 Jun 2017 16:34:19 +0000 (12:34 -0400)
16 files changed:
bin/.gitignore [new file with mode: 0644]
bin/lcdproc-monitor.expect [new file with mode: 0755]
bin/lcdproc-remind.expect [new file with mode: 0755]
bin/lcdproc.expect [deleted file]
bin/lcdproclib.tcl [new file with mode: 0644]
bin/monitor-graph-cgi.sh
bin/pkgIndex.tcl [new file with mode: 0644]
bin/rrdtool-creates.sh
data/.gitignore
misc/crontab [new file with mode: 0644]
misc/index.html [new file with mode: 0644]
remind [deleted file]
remind/.gitignore [new file with mode: 0644]
remind/light.rem [new file with mode: 0644]
runit/pi-sc-lcd-remind/run [new file with mode: 0755]
runit/pi-sc-lcd/run

diff --git a/bin/.gitignore b/bin/.gitignore
new file mode 100644 (file)
index 0000000..0d20b64
--- /dev/null
@@ -0,0 +1 @@
+*.pyc
diff --git a/bin/lcdproc-monitor.expect b/bin/lcdproc-monitor.expect
new file mode 100755 (executable)
index 0000000..d55a6d2
--- /dev/null
@@ -0,0 +1,88 @@
+#!/usr/bin/expect
+
+package require lcdproclib
+
+spawn tail --retry --follow=name /run/snakecontrol/monitor.log/current
+set logsid ${spawn_id}
+
+set sid [::lcdproclib::spawnlcd "localhost" "13666"]
+::lcdproclib::cmd ${sid} "client_set -name viv"
+
+::lcdproclib::cmd ${sid} "screen_add 1"
+::lcdproclib::cmd ${sid} "screen_set 1 -name Vivarium"
+::lcdproclib::cmd ${sid} "screen_set 1 -priority hidden"
+::lcdproclib::cmd ${sid} "screen_set 1 -cursor off"
+
+::lcdproclib::cmd ${sid} "widget_add 1 ti title"
+::lcdproclib::cmd ${sid} "widget_set 1 ti Vivarium"
+
+::lcdproclib::cmd ${sid} "widget_add 1 i_up icon"
+::lcdproclib::cmd ${sid} "widget_set 1 i_up 1 2 ARROW_UP"
+::lcdproclib::cmd ${sid} "widget_add 1 i_th string"
+::lcdproclib::cmd ${sid} "widget_set 1 i_th 2 2 T"
+::lcdproclib::cmd ${sid} "widget_add 1 v_ut string"
+::lcdproclib::cmd ${sid} "widget_add 1 i_uh string"
+::lcdproclib::cmd ${sid} "widget_set 1 i_uh 8 2 H"
+::lcdproclib::cmd ${sid} "widget_add 1 v_uh string"
+
+::lcdproclib::cmd ${sid} "widget_add 1 i_l icon"
+::lcdproclib::cmd ${sid} "widget_set 1 i_l 1 3 ARROW_LEFT"
+
+::lcdproclib::cmd ${sid} "widget_add 1 i_r icon"
+::lcdproclib::cmd ${sid} "widget_set 1 i_r 1 4 ARROW_RIGHT"
+
+::lcdproclib::cmd ${sid} "widget_add 1 i_lh icon"
+::lcdproclib::cmd ${sid} "widget_set 1 i_lh 2 3 ARROW_DOWN"
+::lcdproclib::cmd ${sid} "widget_add 1 v_lh string"
+
+::lcdproclib::cmd ${sid} "widget_add 1 i_rh icon"
+::lcdproclib::cmd ${sid} "widget_set 1 i_rh 2 4 ARROW_DOWN"
+::lcdproclib::cmd ${sid} "widget_add 1 v_rh string"
+
+::lcdproclib::cmd ${sid} "widget_add 1 i_lt icon"
+::lcdproclib::cmd ${sid} "widget_set 1 i_lt 9 3 ARROW_UP"
+::lcdproclib::cmd ${sid} "widget_add 1 v_lt string"
+
+::lcdproclib::cmd ${sid} "widget_add 1 i_rt icon"
+::lcdproclib::cmd ${sid} "widget_set 1 i_rt 9 4 ARROW_UP"
+::lcdproclib::cmd ${sid} "widget_add 1 v_rt string"
+
+::lcdproclib::cmd ${sid} "widget_add 1 v_ldmxl string"
+::lcdproclib::cmd ${sid} "widget_set 1 v_ldmxl 17 3 @"
+::lcdproclib::cmd ${sid} "widget_add 1 v_ldmx string"
+::lcdproclib::cmd ${sid} "widget_add 1 v_rdmxl string"
+::lcdproclib::cmd ${sid} "widget_set 1 v_rdmxl 17 4 @"
+::lcdproclib::cmd ${sid} "widget_add 1 v_rdmx string"
+
+::lcdproclib::cmd ${sid} "screen_set 1 -priority info"
+
+proc drawtemp { scr wid x y } {
+  global sid
+  global expect_out
+  set t [expr round(${expect_out(1,string)}*10.0)/10.0]
+  ::lcdproclib::cmd ${sid} "widget_set ${scr} ${wid} ${x} ${y} ${t}"
+}
+
+set datapfx "^\[^ \]* DATA: "
+set datare "(\[^ \r\n]*)"
+
+while { true } {
+  expect {
+    -i ${logsid} -re "${datapfx}hide-near.* temp=${datare}.*\n"  { drawtemp 1 "v_lh" 4  3 }
+    -i ${logsid} -re "${datapfx}hide-far.* temp=${datare}.*\n"   { drawtemp 1 "v_rh" 4  4 }
+    -i ${logsid} -re "${datapfx}tank-near.* temp=${datare}.*\n"  { drawtemp 1 "v_lt" 11 3 }
+    -i ${logsid} -re "${datapfx}tank-far.* temp=${datare}.*\n"   { drawtemp 1 "v_rt" 11 4 }
+    -i ${logsid} -re "${datapfx}tank-top.* temp=${datare}.*\n"   { drawtemp 1 "v_ut" 3  2 }
+    -i ${logsid} -re "${datapfx}tank-top.* humid=${datare}.*\n"  { drawtemp 1 "v_uh" 9  2 }
+    -i ${logsid} -re "${datapfx}dmx-near.* dmx=${datare}.*\n" {
+      ::lcdproclib::cmd ${sid} "widget_set 1 v_ldmx 18 3 ${expect_out(1,string)}"
+    }
+    -i ${logsid} -re "${datapfx}dmx-mid.* dmx=${datare}.*\n" {
+      ::lcdproclib::cmd ${sid} "widget_set 1 v_rdmx 18 4 ${expect_out(1,string)}"
+    }
+    -i ${logsid} -re "\n" {}
+    -i ${sid} -re "^listen .*\n" {}
+    -i ${sid} -re "^ignore .*\n" {}
+  }
+}
diff --git a/bin/lcdproc-remind.expect b/bin/lcdproc-remind.expect
new file mode 100755 (executable)
index 0000000..50a4eef
--- /dev/null
@@ -0,0 +1,55 @@
+#!/usr/bin/expect
+
+package require lcdproclib
+
+set lcdsid [::lcdproclib::spawnlcd "localhost" "13666"]
+::lcdproclib::cmd ${lcdsid} "client_set -name remind"
+
+::lcdproclib::cmd ${lcdsid} "screen_add 1"
+::lcdproclib::cmd ${lcdsid} "screen_set 1 -name Reminders"
+::lcdproclib::cmd ${lcdsid} "screen_set 1 -priority hidden"
+::lcdproclib::cmd ${lcdsid} "screen_set 1 -cursor off"
+
+::lcdproclib::cmd ${lcdsid} "widget_add 1 ti title"
+::lcdproclib::cmd ${lcdsid} "widget_set 1 ti Reminders"
+
+::lcdproclib::cmd ${lcdsid} "widget_add 1 v1 string"
+
+::lcdproclib::cmd ${lcdsid} "screen_set 1 -priority info"
+
+
+proc reload {lcdsid filename} {
+  try {
+    set fp [open ${filename} r]
+  } trap {POSIX ENOENT} {} {
+    puts "ENOENT"
+    sleep 1
+    return
+  }
+
+  ::lcdproclib::cmd ${lcdsid} "widget_set 1 ti {[gets $fp]}"
+  ::lcdproclib::cmd ${lcdsid} "widget_set 1 v1 1 2 {[gets $fp]}"
+
+  close ${fp}
+}
+
+proc spawninotify {filename} {
+  spawn inotifywait -m -e CLOSE_WRITE,DELETE_SELF ${filename} 
+  return ${spawn_id}
+}
+
+set filename "/run/snakecontrol/remind.out"
+
+set waitsid [spawninotify ${filename}]
+
+while { true } {
+  expect {
+    -i ${waitsid} -re "(CLOSE|DELETE)" {
+      close ${waitsid}
+      set waitsid [spawninotify ${filename}]
+    }
+    -i ${waitsid} "Watches established." { reload ${lcdsid} ${filename} }
+    -i ${lcdsid} -re "^listen .*\n" {}
+    -i ${lcdsid} -re "^ignore .*\n" {}
+  }
+}
diff --git a/bin/lcdproc.expect b/bin/lcdproc.expect
deleted file mode 100755 (executable)
index 28235e6..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/usr/bin/expect
-
-proc lcdcmd {sid cmd} {
-  send -i ${sid} "${cmd}\n"
-  while { true } {
-    expect {
-      -i ${sid} -re "^[lindex [split "${cmd}"] 0]\[^\n\]*\r\n" {
-         while { true } {
-           expect {
-             -i ${sid} -re "^success\[^\n\]*\n" { return }
-             -i ${sid} -re "^\r\n" { }
-             -i ${sid} -re "^listen .*\n" {}
-             -i ${sid} -re "^ignore .*\n" {}
-             timeout { error "LCD protocol failure while waiting for success?" } 
-           }
-         }
-       }
-      -i ${sid} -re "^listen .*\n" {}
-      -i ${sid} -re "^ignore .*\n" {}
-      timeout { error "LCD protocol failure while waiting for echo?" } 
-    }
-  }
-}
-
-proc spawnlcd {host port} {
-  spawn socat STDIO "TCP:${host}:${port}"
-  send -i ${spawn_id} "hello\n"
-  expect {
-    -i ${spawn_id} -re "^hello\r\nconnect .*\r\n" { return ${spawn_id} }
-    timeout { error "LCD protocol failure while sending hello?" } 
-  }
-}
-
-spawn tail --retry --follow=name /run/snakecontrol/monitor.log/current
-set logsid ${spawn_id}
-
-set sid [spawnlcd "localhost" "13666"]
-lcdcmd ${sid} "client_set -name test"
-
-lcdcmd ${sid} "screen_add 1"
-lcdcmd ${sid} "screen_set 1 -name Vivarium"
-lcdcmd ${sid} "screen_set 1 -priority hidden"
-lcdcmd ${sid} "screen_set 1 -cursor off"
-
-lcdcmd ${sid} "widget_add 1 ti title"
-lcdcmd ${sid} "widget_set 1 ti Vivarium"
-
-lcdcmd ${sid} "widget_add 1 i_up icon"
-lcdcmd ${sid} "widget_set 1 i_up 1 2 ARROW_UP"
-lcdcmd ${sid} "widget_add 1 i_th string"
-lcdcmd ${sid} "widget_set 1 i_th 2 2 T"
-lcdcmd ${sid} "widget_add 1 v_ut string"
-lcdcmd ${sid} "widget_add 1 i_uh string"
-lcdcmd ${sid} "widget_set 1 i_uh 8 2 H"
-lcdcmd ${sid} "widget_add 1 v_uh string"
-
-lcdcmd ${sid} "widget_add 1 i_l icon"
-lcdcmd ${sid} "widget_set 1 i_l 1 3 ARROW_LEFT"
-
-lcdcmd ${sid} "widget_add 1 i_r icon"
-lcdcmd ${sid} "widget_set 1 i_r 1 4 ARROW_RIGHT"
-
-lcdcmd ${sid} "widget_add 1 i_lh icon"
-lcdcmd ${sid} "widget_set 1 i_lh 2 3 ARROW_DOWN"
-lcdcmd ${sid} "widget_add 1 v_lh string"
-
-lcdcmd ${sid} "widget_add 1 i_rh icon"
-lcdcmd ${sid} "widget_set 1 i_rh 2 4 ARROW_DOWN"
-lcdcmd ${sid} "widget_add 1 v_rh string"
-
-lcdcmd ${sid} "widget_add 1 i_lt icon"
-lcdcmd ${sid} "widget_set 1 i_lt 9 3 ARROW_UP"
-lcdcmd ${sid} "widget_add 1 v_lt string"
-
-lcdcmd ${sid} "widget_add 1 i_rt icon"
-lcdcmd ${sid} "widget_set 1 i_rt 9 4 ARROW_UP"
-lcdcmd ${sid} "widget_add 1 v_rt string"
-
-lcdcmd ${sid} "widget_add 1 v_ldmxl string"
-lcdcmd ${sid} "widget_set 1 v_ldmxl 17 3 @"
-lcdcmd ${sid} "widget_add 1 v_ldmx string"
-lcdcmd ${sid} "widget_add 1 v_rdmxl string"
-lcdcmd ${sid} "widget_set 1 v_rdmxl 17 4 @"
-lcdcmd ${sid} "widget_add 1 v_rdmx string"
-
-lcdcmd ${sid} "screen_set 1 -priority info"
-
-proc drawtemp { scr wid x y } {
-  global sid
-  global expect_out
-  set t [expr round(${expect_out(1,string)}*10.0)/10.0]
-  lcdcmd ${sid} "widget_set ${scr} ${wid} ${x} ${y} ${t}"
-}
-
-set datapfx "^\[^ \]* DATA: "
-set datare "(\[^ \r\n]*)"
-
-while { true } {
-  expect {
-    -i ${logsid} -re "${datapfx}hide-near.* temp=${datare}.*\n"  { drawtemp 1 "v_lh" 4  3 }
-    -i ${logsid} -re "${datapfx}hide-far.* temp=${datare}.*\n"   { drawtemp 1 "v_rh" 4  4 }
-    -i ${logsid} -re "${datapfx}tank-near.* temp=${datare}.*\n"  { drawtemp 1 "v_lt" 11 3 }
-    -i ${logsid} -re "${datapfx}tank-far.* temp=${datare}.*\n"   { drawtemp 1 "v_rt" 11 4 }
-    -i ${logsid} -re "${datapfx}tank-top.* temp=${datare}.*\n"   { drawtemp 1 "v_ut" 3  2 }
-    -i ${logsid} -re "${datapfx}tank-top.* humid=${datare}.*\n"  { drawtemp 1 "v_uh" 9  2 }
-    -i ${logsid} -re "${datapfx}dmx-near.* dmx=${datare}.*\n" {
-      lcdcmd ${sid} "widget_set 1 v_ldmx 18 3 ${expect_out(1,string)}"
-    }
-    -i ${logsid} -re "${datapfx}dmx-mid.* dmx=${datare}.*\n" {
-      lcdcmd ${sid} "widget_set 1 v_rdmx 18 4 ${expect_out(1,string)}"
-    }
-    -i ${logsid} -re "\n" {}
-    -i ${sid} -re "^listen .*\n" {}
-    -i ${sid} -re "^ignore .*\n" {}
-  }
-}
diff --git a/bin/lcdproclib.tcl b/bin/lcdproclib.tcl
new file mode 100644 (file)
index 0000000..fca0ca5
--- /dev/null
@@ -0,0 +1,36 @@
+namespace eval ::lcdproclib {
+       variable version 0.0.1
+}
+
+proc ::lcdproclib::cmd {sid cmd} {
+  send -i ${sid} "${cmd}\n"
+  while { true } {
+    expect {
+      -i ${sid} -re "^[lindex [split "${cmd}"] 0]\[^\n\]*\r\n" {
+         while { true } {
+           expect {
+             -i ${sid} -re "^success\[^\n\]*\n" { return }
+             -i ${sid} -re "^\r\n" { }
+             -i ${sid} -re "^listen .*\n" {}
+             -i ${sid} -re "^ignore .*\n" {}
+             timeout { error "LCD protocol failure while waiting for success?" } 
+           }
+         }
+       }
+      -i ${sid} -re "^listen .*\n" {}
+      -i ${sid} -re "^ignore .*\n" {}
+      timeout { error "LCD protocol failure while waiting for echo?" } 
+    }
+  }
+}
+
+proc ::lcdproclib::spawnlcd {host port} {
+  spawn socat STDIO "TCP:${host}:${port}"
+  send -i ${spawn_id} "hello\n"
+  expect {
+    -i ${spawn_id} -re "^hello\r\nconnect .*\r\n" { return ${spawn_id} }
+    timeout { error "LCD protocol failure while sending hello?" } 
+  }
+}
+
+package provide lcdproclib $::lcdproclib::version
index fcb2fc6c597ce9b3f5dd1859f1791582eedc1302..af4997c64bfd3951a580b5312c9f31b7fafb399c 100755 (executable)
@@ -3,11 +3,17 @@
 DMX_SCALE=5
 DMX_SHIFT=20
 
+TEMP_SCALE_UPPER=32
+TEMP_SCALE_LOWER=19
+
 COMMON_ARGS=(
        --end now
         --width=960 --height=480
         --lazy
-        --step=60 -v "degrees C" --upper-limit 32 --lower-limit 19 --rigid
+)
+
+TEMP_ARGS=(
+        --step=60 -v "degrees C" --upper-limit ${TEMP_SCALE_UPPER} --lower-limit ${TEMP_SCALE_LOWER} --rigid
        --right-axis-label "DMX"
        --right-axis ${DMX_SCALE}:-${DMX_SHIFT}
         DEF:tempH=/home/pi/sc/data/heater-temp.rrd:temp:AVERAGE
@@ -17,22 +23,37 @@ COMMON_ARGS=(
         DEF:tempTN=/home/pi/sc/data/tank-near-temp.rrd:temp:AVERAGE
         DEF:tempTF=/home/pi/sc/data/tank-far-temp.rrd:temp:AVERAGE
        CDEF:scaled_dmxHN=dmxHN,${DMX_SHIFT},+,${DMX_SCALE},/
-       LINE:scaled_dmxHN\#000000:"dmx near"
+       LINE:scaled_dmxHN\#000000:"dmx left"
         LINE2:tempH\#FF0000:"heater"
-        LINE2:tempHN\#808000:"hide near"
-        LINE2:tempHF\#FF8000:"hide far"
-        LINE2:tempTN\#00FF00:"tank near"
-        LINE2:tempTF\#00FFFF:"tank far"
+        LINE2:tempHN\#808000:"hide left"
+        LINE2:tempHF\#FF8000:"hide right"
+        LINE2:tempTN\#00FF00:"tank left"
+        LINE2:tempTF\#00FFFF:"tank right"
         HRULE:30#800000
-        HRULE:25#8000FF
-        HRULE:21#0000FF
+)
+
+HUMID_SCALE=$(( 100.0/(TEMP_SCALE_UPPER-TEMP_SCALE_LOWER) ))
+HUMID_SHIFT=$(( TEMP_SCALE_LOWER * HUMID_SCALE ))
+
+TOP_ARGS=(
+        --step=60 -v "degrees C" --upper-limit ${TEMP_SCALE_UPPER} --lower-limit ${TEMP_SCALE_LOWER} --rigid
+       --right-axis-label "Humidity"
+       --right-axis ${HUMID_SCALE}:-${HUMID_SHIFT}
+        DEF:temp=/home/pi/sc/data/tank-top-temp.rrd:temp:AVERAGE
+        DEF:humid=/home/pi/sc/data/tank-top-humid.rrd:humid:AVERAGE
+       CDEF:scaled_humid=humid,${HUMID_SHIFT},+,${HUMID_SCALE},/
+       LINE2:scaled_humid\#0000FF:"humidity"
+        LINE2:temp\#FF0000:"temp"
 )
 
 case "$QUERY_STRING" in
-       4h)  OUTFILE="4h.png";  PARAMS=(--start now-4h  --title "Melman Vivarium Sensor Data 4h" ) ;;
-       24h) OUTFILE="24h.png"; PARAMS=(--start now-24h --title "Melman Vivarium Sensor Data 24h") ;;
-       7d)  OUTFILE="7d.png";  PARAMS=(--start now-7d  --title "Melman Vivarium Sensor Data 7d" ) ;;
-       30d) OUTFILE="30d.png"; PARAMS=(--start now-30d --title "Melman Vivarium Sensor Data 30d") ;;
+       t-4h)    OUTFILE="4h.png";      PARAMS=(--start now-4h  --title "Melman Vivarium Sensor Data 4h"      ${TEMP_ARGS[@]}) ;;
+       t-24h)   OUTFILE="24h.png";     PARAMS=(--start now-24h --title "Melman Vivarium Sensor Data 24h"     ${TEMP_ARGS[@]}) ;;
+       t-7d)    OUTFILE="7d.png";      PARAMS=(--start now-7d  --title "Melman Vivarium Sensor Data 7d"      ${TEMP_ARGS[@]}) ;;
+       t-30d)   OUTFILE="30d.png";     PARAMS=(--start now-30d --title "Melman Vivarium Sensor Data 30d"     ${TEMP_ARGS[@]}) ;;
+       top-4h)  OUTFILE="top-4h.png";  PARAMS=(--start now-4h  --title "Melman Vivarium Top Sensor Data 4h"  ${TOP_ARGS[@]})  ;;
+       top-24h) OUTFILE="top-24h.png"; PARAMS=(--start now-24h --title "Melman Vivarium Top Sensor Data 24h" ${TOP_ARGS[@]})  ;;
+       top-7d)  OUTFILE="top-7d.png";  PARAMS=(--start now-7d  --title "Melman Vivarium Top Sensor Data 7d"  ${TOP_ARGS[@]})  ;;
        *)
                cat <<HERE
 Content-Type: text/html
diff --git a/bin/pkgIndex.tcl b/bin/pkgIndex.tcl
new file mode 100644 (file)
index 0000000..395b875
--- /dev/null
@@ -0,0 +1 @@
+package ifneeded lcdproclib 0.0.1 [list source [file join $dir lcdproclib.tcl]]
index eb383301ff96ef6363ab66802bfb24b81fde4f8d..59cef9e6193dfad2db996bdeb380d00ef429781e 100755 (executable)
@@ -45,17 +45,17 @@ rrdtool create /home/pi/sc/data/tank-top-humid.rrd \
    --no-overwrite \
    --step 60 \
    DS:humid:GAUGE:900:-5:105 \
-   RRA:AVERAGE:0.5:6:525600 \
-   RRA:AVERAGE:0.25:360:87600 \
-   RRA:MIN:0.025:360:87600 \
-   RRA:MAX:0.025:360:87600
+   RRA:AVERAGE:0.5:1:525600 \
+   RRA:AVERAGE:0.25:60:87600 \
+   RRA:MIN:0.025:60:87600 \
+   RRA:MAX:0.025:60:87600
 
 
 rrdtool create /home/pi/sc/data/tank-top-press.rrd \
    --no-overwrite \
    --step 60 \
    DS:press:GAUGE:900:-1000:120000 \
-   RRA:AVERAGE:0.5:6:525600 \
-   RRA:AVERAGE:0.25:360:87600 \
-   RRA:MIN:0.025:360:87600 \
-   RRA:MAX:0.025:360:87600
+   RRA:AVERAGE:0.5:1:525600 \
+   RRA:AVERAGE:0.25:60:87600 \
+   RRA:MIN:0.025:60:87600 \
+   RRA:MAX:0.025:60:87600
index 09173cc7af6c2404b08d88a969bd34b135c831ce..25174443adc606822969c11fd2d943849408c788 100644 (file)
@@ -1 +1,3 @@
 *.rrd
+.*.swp
+care.log
diff --git a/misc/crontab b/misc/crontab
new file mode 100644 (file)
index 0000000..e734185
--- /dev/null
@@ -0,0 +1 @@
+* */4 * * * remind -r /home/pi/sc/data/care.rem | grep -v '^$' > /run/snakecontrol/remind.out
diff --git a/misc/index.html b/misc/index.html
new file mode 100644 (file)
index 0000000..7dd3dfe
--- /dev/null
@@ -0,0 +1,21 @@
+<HTML>
+ <HEAD>
+  <TITLE>Melman Vivarium Graphs</TITLE>
+  <META http-equiv="refresh" content="300"> 
+ </HEAD><BODY>
+  <TABLE>
+   <TR>
+    <TD><IMG src="cgi-bin/graph.cgi?t-4h"    width="1057" height="553"/></TD>
+    <TD><IMG src="cgi-bin/graph.cgi?t-24h"   width="1057" height="553"/></TD>
+    <TD><IMG src="cgi-bin/graph.cgi?t-7d"    width="1057" height="553"/></TD>
+    <TD><IMG src="cgi-bin/graph.cgi?t-30d"   width="1057" height="553"/></TD>
+   </TR>
+   <TR>
+    <TD><IMG src="cgi-bin/graph.cgi?top-4h"  width="1057" height="553"/></TD>
+    <TD><IMG src="cgi-bin/graph.cgi?top-24h" width="1057" height="553"/></TD>
+    <TD><IMG src="cgi-bin/graph.cgi?top-7d"  width="1057" height="553"/></TD>
+   </TR>
+  </TABLE>
+  <IFRAME src="cgi-bin/log.cgi" width="2116"/>
+ </BODY>
+</HTML>
diff --git a/remind b/remind
deleted file mode 100644 (file)
index c4337b8..0000000
--- a/remind
+++ /dev/null
@@ -1,12 +0,0 @@
-SET $LongDeg 76
-SET $LongMin 36
-SET $LongSec 33
-SET $LatDeg 39
-SET $LatMin 17
-SET $LatSec 33
-
-REM AT [sunrise()] MSG Lights on...
-REM AT [sunrise()] RUN /home/pi/sc/bin/rpb.expect 1 on > /dev/null
-
-REM AT [sunset()]  MSG Lights off...
-REM AT [sunset()]  RUN /home/pi/sc/bin/rpb.expect 1 off > /dev/null
diff --git a/remind/.gitignore b/remind/.gitignore
new file mode 100644 (file)
index 0000000..c45c90f
--- /dev/null
@@ -0,0 +1,2 @@
+.*.swp
+care.rem
diff --git a/remind/light.rem b/remind/light.rem
new file mode 100644 (file)
index 0000000..87f31bd
--- /dev/null
@@ -0,0 +1,21 @@
+SET $LongDeg 76
+SET $LongMin 36
+SET $LongSec 33
+SET $LatDeg 39
+SET $LatMin 17
+SET $LatSec 33
+
+REM AT [sunrise()] MSG Lights on...
+REM AT [sunrise()] RUN /home/pi/sc/bin/rpb.expect 1 on > /dev/null
+
+REM AT [sunset()]  MSG Lights off...
+REM AT [sunset()]  RUN /home/pi/sc/bin/rpb.expect 1 off > /dev/null
+
+REM AT [sunrise() - 45] MSG Aerator on
+REM AT [sunrise() - 45] RUN /home/pi/sc/bin/rpb.expect 4 on > /dev/null
+REM AT [sunrise() + 45] MSG Aerator off
+REM AT [sunrise() + 45] RUN /home/pi/sc/bin/rpb.expect 4 off > /dev/null
+REM AT [sunset()  - 45] MSG Aerator on
+REM AT [sunset()  - 45] RUN /home/pi/sc/bin/rpb.expect 4 on > /dev/null
+REM AT [sunset()  + 45] MSG Aerator off
+REM AT [sunset()  + 45] RUN /home/pi/sc/bin/rpb.expect 4 off > /dev/null
diff --git a/runit/pi-sc-lcd-remind/run b/runit/pi-sc-lcd-remind/run
new file mode 100755 (executable)
index 0000000..14a0bf5
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+export TCLLIBPATH="$TCLLIBPATH /home/pi/sc/bin"
+exec chpst -u pi:pi expect /home/pi/sc/bin/lcdproc-remind.expect >/dev/null
index 53844d8e681094510daeddd28e43f502472d8ed7..249418947874b8c7c2385466af2ebcf61c0856aa 100755 (executable)
@@ -1,2 +1,3 @@
 #!/bin/sh
-exec chpst -u pi:pi expect /home/pi/sc/bin/lcdproc.expect >/dev/null
+export TCLLIBPATH="$TCLLIBPATH /home/pi/sc/bin"
+exec chpst -u pi:pi expect /home/pi/sc/bin/lcdproc-monitor.expect >/dev/null