| 1 | 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. |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | Keep your eyes on ...: |
| 6 | |
| 7 | * ... QLA results. Call Daniela in case of a flare. |
| 8 | * ... weather (especially Wind and Humidity). park in case of strong wind. Sleep in case of rain. |
| 9 | * ... it might sometimes just throw an exception. Simply Restarting it, often helps. |
| 10 | |
| 11 | |
| 12 | ---- |
| 13 | |
| 14 | I played a bit with Skype4py by Arkadiusz Wahlig, and found it was incredibly easy to call my phone using this module. |
| 15 | So now, I want to try and get a script calling me, when one of these things happens: |
| 16 | |
| 17 | |
| 18 | * QLA shows rates near the flare alert limits (http://www.fact-project.org/logbook/showthread.php?tid=2223) |
| 19 | * wind becomes strong |
| 20 | * When humidity gets high (and maybe the number of stars is low) |
| 21 | * Main.js is not "Running" anymore. |
| 22 | * (FSC has shutdown the camera, for high current consumption.) --> would lead Main.js to stop sooner or later. |
| 23 | |
| 24 | 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: |
| 25 | https://www.fact-project.org/AllSkyCloudDetection/ |
| 26 | |
| 27 | Also MAGIC has some cloud detection going on here: |
| 28 | http://www.magic.iac.es/site/weather/clouds.html |
| 29 | Maybe one can sue that. |
| 30 | |
| 31 | ---- |
| 32 | |
| 33 | In the future, I am pretty sure, one can automate the procedure even more, like: |
| 34 | |
| 35 | * Don't call me, call Daniela directly, no need to disturb the shifter, when all there is to do, is calling Daniela. |
| 36 | * try to restart Main.js once (and only once) if is works ... don't bother the shifter. |
| 37 | * in case of wind. Park ... when parking works ... don't bother the shifter. |
| 38 | * in case of rain. Sleep ... when sleeping works ... don't bother the shifter. |
| 39 | |
| 40 | 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. |
| 41 | |
| 42 | ---- |
| 43 | |
| 44 | 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. |
| 45 | In the drop-down-box I chose 'dynamic'. |
| 46 | 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. |
| 47 | |
| 48 | Ah okay, |
| 49 | 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. |
| 50 | |
| 51 | ---- |
| 52 | |
| 53 | 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. |
| 54 | |
| 55 | 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. |
| 56 | |
| 57 | ---- |
| 58 | |
| 59 | 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. |
| 60 | This is the easiest, so I'll start with it. |
| 61 | This checks if DIM_CONTROL is still in 'Running' |
| 62 | {{{ |
| 63 | import fact.dim |
| 64 | dns = fact.dim.Dns() |
| 65 | servers = dns.servers() |
| 66 | dimctrl = servers['DIM_CONTROL'] |
| 67 | if "Running" not in dimctrl.state[0]: |
| 68 | skype.PlaceCall('+41774528842') |
| 69 | }}} |
| 70 | |
| 71 | ---- |
| 72 | |
| 73 | |