Nightskycam software (beta)

This is the user documentation of nightskycam's software (beta version).


This documentation assumes:

  • the device is running on the same network as your laptop

  • the network provides internet access


Starting up the device

  • Plug the power. The device will start booting.

  • If the device has not been configured to connect to the wifi: connect an ethernet cable.

  • Visit the ntfy channel of the device: https://ntfy.sh/nightskycam_nightskycam1. Messages related to the startup of the device should be displayed, followed by regular reports (every 15 seconds)

  • In the report, note the IP and port of the device, for example:

[running] webdav
serving at port: 8008
IP(s): 10.42.1.22

Default behavior of the device


note Most of the behavior described here is configurable and might be modified by editing the content of the configuration file (see next sections)


  • The device publishes a report on ntfy every 15 seconds

  • The device does not take pictures between 7am and 7:30pm. During the break time, the cooler of the device is off. One may refer to the ntfy channel to check the status of the device, e.g.

[running] asi_zwo
mode: active, will stop at 07:00:00
  • The device reboots every day at noon. When it reboots, it checks for software upgrades

  • A ftp thread uploading pictures (and related metadata) to the institute runs continuously.

  • At the institute: a thread is running which moves the images from the ftp server to the network share smb://ei-shares.is.localnet/allsky/ (but this is not real time and occurs with considerable delay)

  • During the activity time, a picture is taken every minute:

    • the cooler is activated, with a target temperature of -10 degrees
    • exposure duration of 30 seconds
    • debayer then resizing is applied to the images
    • images are saved as tiff, with no compression
    • a metadata file is created, with all information related to the image
    • the final image file is named YYYY_MM_DD_HH_MM_SS.tiff, providing the date and time the picture was taken (the related metadata file has the same name, but with a 'toml' extension)

Known issue: sometimes the cooler does not start properly during the activity time. The reason still needs to be found out.


Mounting the filesystem on your laptop

  • on Mac, the file explorer: go / connect to server, and mount http://IP:port (replace the IP and port by the values given by the ntfy report).

  • On linux: other locations in the file manager and mount dav://IP:port (replace IP and port)

The mounted file system should be like (irrelevant files and folders not shown):

root
|
| nightskycam_config.toml
| wpa_supplicant.conf
| command.sh
|
|_data
|  |_latest
|      latest.tiff
|      latest.txt
|
|_logs
|    logs.txt

Accessing the latest image

After mounting the device's filesystem, the latest image taken can be accessed in /data/latest/

Setting up a new wifi

Edit the file wpa_supplicant.conf, e.g.:

network={
    ssid="thessid"
    psk="thepassword"
}

The system may need to be rebooted before the device gets able to connect to the wifi (see below for instructions on how to reboot).

Updating the device's configuration

After mounting the device's filesystem, the configuration can be updated by editing the file nightskycam_config.toml


The device continuously reads the configuration file. Modifications of the file will have a direct impact on the system, without reboot


For example, the following can be configured:

  • the duration and timing of the daily break time during which the device does not take picture

  • which postprocessing are applied to the images (e.g. debayering, resize)

  • in which format the final picture is saved (only 'tiff' has been tested so far, but other format may work out of the box, if supported by opencv2)

  • how often pictures are taken

  • all 'controllables' of the camera (exposure, gain, etc)

The configuration file is commented, and we hope modifying it should be trivial.


notes

  • the 'CoolerOn' configuration value is ignored by the device: the device will set the cooler 'off' during break time and 'on' during activity time.

  • Introducing typo(s) or error(s) (e.g. unsupported values) in the configuration file may result in dysfunctions. It is likely that error reports will start appearing on the ntfy channel. Fixing the typo(s) and error(s) in the configuration file are likely to resolve the issues. If not (or if the configuration file is no longer accessible), an advanced user (for now only Vincent, but an advanced manual will also be provided) will be able to fix the system remotely, even when not on the same network as the device (but assuming the device is connected to internet).


Rebooting or shutting down the device


note The device reboots by itself every day at noon


After mounting the device's filesystem, edit the file command.sh and add the content:

reboot now

The reboot will initiate, and the process can be followed on the ntfy channel. The reboot may take some time (a couple of minutes), as the system may need to first finish to upload some files and/or finish to take a picture

For shutting down the device, edit command.sh with the content:

shutdown now