Version 2 (modified by 9 years ago) ( diff ) | ,
---|
I am currently on shift, and as always when I am on shift, I try to improve the automation/robotation of the shift. So that I have time to do other things.
The following tasks, I have identified for myself as the main tasks of a shifter at the moment, apart from starting and stopping observation in the evening and in the morning.
Keep your eyes on ...:
- ... QLA results. Call Daniela in case of a flare.
- ... weather (especially Wind and Humidity). park in case of strong wind. Sleep in case of rain.
- ... it might sometimes just throw an exception. Simply Restarting it, often helps.
I played a bit with Skype4py by Arkadiusz Wahlig, and found it was incredibly easy to call my phone using this module. So now, I want to try and get a script calling me, when one of these things happens:
- QLA shows rates near the flare alert limits (http://www.fact-project.org/logbook/showthread.php?tid=2223)
- wind becomes strong
- When humidity gets high (and maybe the number of stars is low)
- Main.js is not "Running" anymore.
- (FSC has shutdown the camera, for high current consumption.) --> would lead Main.js to stop sooner or later.
The number of stars, I might be able to get from here, though this work is not yet believed to deliver stable results, but its a start: https://www.fact-project.org/AllSkyCloudDetection/
Also MAGIC has some cloud detection going on here: http://www.magic.iac.es/site/weather/clouds.html Maybe one can sue that.
In the future, I am pretty sure, one can automate the procedure even more, like:
- Don't call me, call Daniela directly, no need to disturb the shifter, when all there is to do, is calling Daniela.
- try to restart Main.js once (and only once) if is works ... don't bother the shifter.
- in case of wind. Park ... when parking works ... don't bother the shifter.
- in case of rain. Sleep ... when sleeping works ... don't bother the shifter.
This way, the number of calls could be reduced to a minimum. But for now, all I want is to have a kind of reminder, which is simply telling me, that I forgot to keep and eye on the wind, in case I did so.
As a first step I needed to install Skype 4.3 on any of the machine on La Palma. I chose 'gui', because I think, any load I put on the CPU of this machine has the least impact on the DAQ and the QLA. I was not able to install 4.3 before I had 4.2 removed. 4.2 was removed using synaptic. 4.3 was not properly installed yet, it just was installed from a tarball, becauese the deb-files provided here: http://www.skype.com/en/download-skype/skype-for-linux/ did not work. In the drop-down-box I chose 'dynamic'. The tarball did not contain sources, which I had to compile, but just a precompiled thing, I could directly call. Not sure how to install it though.
Ah okay, so I installed it, as they recomment in their README file. I sym-linked the skype-4.3.0.37 folder to /usr/share/skype and sym-linked the skype-binary file to /usr/bin/skype. Thats all.
Apart from that I wanted to use the fact skype account "www.fact-project.org", but it had no credit, and I didn't want to top it up with my personal credit card. I purchased a so called pay-safe-card for that, but despite the fact, that my personal account was able to be topped up with a pay-safe-card, the fact skype account was not. So in the end I decided to use my personal account for this test.
So on gui (in a VNC session on port 5902 by user dneise) there is a skype running. In order to use the Skype4Py module, I apparently need an X-server. So I started a screen session in this VNC session.
The first step, I want to try is, check if DIM_CONTROL is still in state running. If not, the script should call me on my phone. This is the easiest, so I'll start with it. This checks if DIM_CONTROL is still in 'Running'
import fact.dim dns = fact.dim.Dns() servers = dns.servers() dimctrl = servers['DIM_CONTROL'] if "Running" not in dimctrl.state[0]: skype.PlaceCall('+41774528842')
About the QLA. I found, the results of the QLA are in our run-DB in the table called 'AnalysisResultsRunLP'. Currently I am trying to read the excessrate from the DB.
It seems to be calculated in gate:/home/factwww/dch/newqla/get_data.php