-
Notifications
You must be signed in to change notification settings - Fork 0
Repository setup
These instructions describe how to set up a central database server for cameras to upload their observations to.
We host one such server at https://pigazing.dcford.org.uk
, but you may set up
one of your own.
This can be a useful thing to do for two reasons:
-
If you have a Raspberry Pi controlling your observatory, and you want to use the web interface to browse your observations while the camera is observing, you will find it extremely sluggish due to the CPU load associated with observing. The solution is to export your observations to an external server (for example your desktop PC), and browse them there.
-
If you have multiple Pi Gazing cameras, you can browse all your observations in one common place if you set all the cameras to export to a common server.
Your server needs to have the Pi Gazing software installed on it, and have the Pi Gazing web interface set up. Instructions for how to do this can be found here.
The web interface needs to be visible across the network to the Raspberry Pi that is going to push observations
to the server. You need to pick a virtual host name for the web interface (e.g. my-pigazing-server.local
) and
configure the file /etc/apache2/sites-available/pigazing-clean.conf
to listen to this virtual host. The default configuration file uses the place-holder host name of
pigazing-clean.local
.
You will probably also need to edit the /etc/hosts
file on any machine that will access the server's web
interface (including your Pi Gazing observing nodes), to add a line telling them the IP address of your server, e.g.
127.0.0.1 my-pigazing-server.local
You will need to create a user account on the server's web interface for the observing nodes to log into. You can do
this using the script src/cmd_line_admin/update_user.py
.
To set up an observing node to export its observations to your server, you need to specify three pieces of information:
- The URL of the web interface running on the server, e.g. `https://my-pigazing-server.local/api/importv2
- The username of the account to use for uploads, e.g.
import_user
. - The password for this account.
You should set these three items in the appropriate place in your configuration/installation_settings.conf
file. You should then
run the script src/cmd_line_admin/default_exports.py
.
To initiate the export of observations, the script src/observation_control/export_data.py
needs to run. This
should happen automatically once a day. It is safe to interrupt this script at any time. Next time it is run, it
will pick up wherever it left off.
The script src/cmd_line_reports/list_export_status.py
will list how many items are in the queue to be exported. Note
that this will read zero until you run export_data.py
. The first step the script performs is to search for new
observations which have not yet been exported and add them to the queue.
Pi Gazing overview
Building your own Pi Gazing camera
Camera software setup
Structure of the Pi Gazing software
Future directions