Feeding a remote server with data.
Question
Is there any way i can make a remote server run the xml2003.exe and make it get the data from the weather station i keep here at home?
I fear the only way is to run it myself and upload the data through ftp access everytime... this is inapplicable tho, i need to work!
I would appreciate any automated solution.
Environment
Open2300 version: |
1.10 |
Libraries: |
mysql, postgresql |
Server OS: |
Linux |
--
BiaPetr - 28 Sep 2006
Answer
The open2300 software talks at a very low level on the RS232 port and must run the machine which is connected to the weather station.
--
KennethLavrsen - 22 Oct 2006
Possible solution
You should be able to write scripts on your home system and the system you want to collect the data on to accomplish your goals. The script on your remote server should open an ssh connection to your home system and run a script there. The script on your home system would run the xml2300 program and allow it to write the output to a designated file. Use "mktemp(1)" if you want the output filename to be unique. When xml2300 completes the script cats the temporary file, sending the output back to the remote machine. The remote machine captures the output to a specified file. Lastly the script on your home system removes the temporary file to avoid eating your hard drive. See the documention on ssh for how to set up tunnels.
You may be able to avoid the whole mktemp/cat sequence by supplying the "-t" switch to the ssh command and using "/dev/tty" as the name for your xml file. I haven't conducted any experiments with use of this device file via an ssh tunnel, so I don't guarantee it will work.