Friday, June 1, 2012

Problems as of 6/1/12

Another productive month has passed. We are at the point that all the systems are working together. The big push is in monitoring scheduled observations, RTS2 webgui, and finishing security.

The automatic focusing was sort of a dud in that it didn't work to fit our needs. We have decided to roll our own in hopes of having a best fitting focus at any given time.

Things are finally moving forward and the light is at the end of the tunnel.  This also means our issues list is a lot smaller.

OHH YEAH!


Software
  • Add user friendly GUI to control primitive features of the system - Website in progress
  • Nagios setup to point to new devices- BORAT online, other devices still need work - Later when stuff is working
  • FWHM minima calculations - TESTING, thanks Wildo
  • Focus Driver doesn't update status while focusing, always displays idle. 
  • Change dome status to more unique name for easy find in FITS header.- DONE
Hardware
  • Motion sensor wiring done, just need to connect each sensor via breadboard/connectors - In Progress
  • Fan controller and Focuser in single box with single power supply - Done & Installed
  • Boltwood sensor reporting clear skies as cloudy
  • Extra PCIe serial card driver needs to be installed - DONE
  • Fan need to be added to focuser/fan controller box - Ordered
 Security
  • Motion detectors need to be wired in and fully tested
  • Need some minor integration with IR+ZM+Lights work in combination
  • Bluecherry Capture Card module causing kernel panics, need to grab new version and compile

Controling Devices With JSON

RTS2 has an XMLRPC which also supports JSON. This make it very easy to poll and control devices external of the driver. Here is a simple example of controlling the Tban fan controller based on temperature difference between inside the dome and the outside ambient temperature.




from rts2json import jsonProxy, createJsonServer 
import socket
import xmlrpclib
import json
import httplib

#connect to server
createJsonServer('localhost:8889','','')

#get temps from devices
externalTemp = jsonProxy().getValue('S0','TEMP_AMB')
internalTemp = jsonProxy().getValue('S2','DS1')

#calc the difference
diffTemp = internalTemp - externalTemp

#set the fan speed based on rules
if diffTemp < 0:
    jsonProxy().setValue('S2','MFanCon',0)

elif diffTemp > 7:
    jsonProxy().setValue('S2','MFanCon',3)

elif diffTemp > 4:
    jsonProxy().setValue('S2','MFanCon',2)

elif diffTemp > 0:
    jsonProxy().setValue('S2','MFanCon',1)

The rts2json is in the RTS2 repo. Simply connect via a JSON proxy and get and set values of devices. The script is set to a 15 minute cron and adjust fans speeds accordingly.