Refrigeration teaching experiment remote lab
Current Testing Instructions:
Python3
External modules used:
pyModbusTCP
numpy
I believe this was all that was nessissary to install to run the software on RPi Ubuntu
- Ensure that
testCommandServer.pyHOST variable is set to loopback address127.0.0.1OR address of server host. - Ensure that
testReportingServer.pyHOST variable is set to loopback address127.0.0.1OR address of server host. - Ensure that
commandClient.pyHOST variable is set to same address as server - Ensure that
reportingClient.pyHOST variable is set to same address as server - If testing without hardware, ensure that
simulate_hardware = Trueset inacUnitGlobals.py - Run
testCommandServer.pyandtestReportingServer.pyon host server - Run
main.pyon client server (raspberrypi/SBC in final implementation) It should connect to server with no issues
- Enter commands as prompted in
testCommandServer.pyCLI. Track changes in state and function using CLI formain.py. view logfile during operation for debug messages, based on logging level set ininit_logginginacUnitGlobals - Ensure that JSON messages reported by
testReportingServer.pydisplay "correct" values (if simulated hardware these values somewhat random and static at the moment
- NOTE: 1st command sent from
testCommandServer.pycauses websocket to loose connection & reset. All commands after this should be handled normally.
{"cmd":"set","{item}":"{state}"}
{"cmd":"set","V1":"open"}
{"cmd":"set","V2":"open"}
{"cmd":"set","V3":"open"}
{"cmd":"set","V4":"open"}
{"cmd":"set","V5":"open"}
{"cmd":"set","V6":"open"}
{"cmd":"set","V7":"open"}
{"cmd":"set","V5":"open","V6":"open"}
{"cmd":"set","V5":"close","V6":"close"}
{"cmd":"set","V1":"close"}
{"cmd":"set","V2":"close"}
{"cmd":"set","V3":"close"}
{"cmd":"set","V4":"close"}
{"cmd":"set","V5":"close"}
{"cmd":"set","V6":"close"}
{"cmd":"set","V7":"close"}
{"cmd":"set","W1":"on"}
{"cmd":"set","W1":"off"}
{"cmd":"set","W2":"on"}
{"cmd":"set","W2":"off"}
{"cmd":"set","fans":"on"}
{"cmd":"set","fans":"off"}
{"cmd":"set","comp":"start"}
{"cmd":"set","comp":"stop"}
All the following words evaluate to True:
"open","opened","on","true","high","start"
All the following words evaluate to False:
"close","shut","closed","off","false","low","stop"
download CSV of all datapoints
{"cmd":"get","item":"csv"}
safe shutdown
{"cmd":"set","mode":"shutdown"}
run experiment with expansion valve Vx
{"cmd":"set","mode":"V2"}
- Each function within a method should provide its own exception handling, and raise if exception is error
- Priority functions with known error conditions
- Priority on functions with known exceptions that are not errors
- If function is unlikely to cause exception then this is probably overkill.
