@nbkhwjm wrote:
Since ive built a new enclosure for the DC that sits outside, i've needed to monitor the temp of the board while its in the hot Alabama sun. Since there is no "native" way to do this remotely from skylark, I hacked together this solution...
NOTE: using this method is not "secure" its a hack, using NC to open ports can be "hazardous"... so don't be surprised if the neighbor kid uses the DC as a porn server....
1) Login to the DC via ssh with the "outernet" user
2) create a simple bash script that grabs the values your interested in and place it somewhere writable like /mnt/feed_temp.sh: (make sure its executable)
#!/bin/sh more /sys/devices/virtual/thermal/thermal_zone0/temp
3) start a simple NC listener on the DC
sudo nc -ll -p 4444 -e /mnt/feed_temp.sh &
NC Usage:
Usage: nc [-iN] [-wN] [-l] [-p PORT] [-f FILE|IPADDR PORT] [-e PROG] Open a pipe to IP:PORT or FILE -l Listen mode, for inbound connects (use -ll with -e for persistent server) -p PORT Local port -w SEC Connect timeout -i SEC Delay interval for lines sent -f FILE Use file (ala /dev/ttyS0) instead of network -e PROG Run PROG after connect
4) On another system on the same network, create a simple script to poll the DC
#!/bin/bash while true do temp=`nc 10.0.1.184 4444` echo $((($temp/1000)*9/5+32))F sleep 10 done
In the case above my DC ip is 10.0.1.184, and im using port 4444. Its also converting the C value to F for yankee usage... sleeps 10 seconds and hits it again. you can even log to a file with timestamps, or add other values to send out..
running on OSX...
MacBook-Pro:~ me$ ./get_temp.sh 98F 96F 96F 98F 98F
Chris
Posts: 2
Participants: 1