Categorygithub.com/TheCacophonyProject/management-interface

# README

management-interface

This is a small web server which supports for management and configuration of Cacophononator devices from the The Cacophony Project.

Installing packr (will be done by make)

This project uses the packr tool to embed static resources (e.g. CSS, JS and image files) into the resulting Go binary.

To install packr from source, run:

go get -u github.com/gobuffalo/packr/packr

Make sure $GOPATH/bin is in your $PATH.

Alternatively download a stable prebuilt release of the packr tool and install it into a directory in your $PATH.

Building

Building will install packr for you. Make sure $GOPATH/bin is in your $PATH. To build the management server for ARM (to run on a Raspberry Pi):

make

To build the management server to run on your development machine:

make build

For either case the resulting executable is managementd.

Running on a Cacophonator

  • Build for ARM (run make)
  • Copy to the Pi: scp managementd pi@[host]
  • SSH to Pi: ssh pi@[host]
  • Stop the running management server: sudo systemctl stop cacophonator-management
  • Run the development version: sudo ./managementd

Releases

Releases are built using TravisCI. To create a release visit the repository on Github and then follow our general instructions for creating a release.

For more about the mechanics of how releases work, see .travis.yml and .goreleaser.yml.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AboutHandler shows the currently installed packages on the device.
AdvancedMenuHandler is a screen to more advanced settings.
APILocationHandler writes the location of the device to the deviceLocationFile.
APITimeHandler sets the hardware clock and system time via a post request.
CameraHandler will show a frame from the camera to help with positioning.
CameraSnapshot - Still image from Lepton camera.
CheckInterfaceHandler checks an interface to see if it is up or down.
DiskMemoryHandler shows disk space usage and memory usage.
IndexHandler is the root handler.
LocationHandler shows and updates the location of the device.
NetworkHandler - Show the status of each network interface.
ParseNetworkConfig retrieves a value(s) from the network config file.
Rename page to change device name and group.
SpeakerStatusHandler attempts to play a sound on connected speaker(s).
SpeakerTestHandler will show a frame from the camera to help with positioning.
TimeHandler shows and updates the time settings for the device.
ToggleOnlineState attempts to toggle the 'online' value in the network config file.
WifiNetworkHandler show the wireless networks listed in the wpa_supplicant configuration.
WriteNetworkConfig writes the config value(s) to the network config file.

# Structs

NetworkConfig is a struct to store our network configuration values in.