Skip to main content

A package for data logging and management of HAMMA lightning sensors.

Project description

Brokkr

A Python package to receive science data and status information from a local HAMMA2 lightning sensor and a Sunsaver MPPT-15L charge controller, store it locally, and transmit it back to a central server (generally, but not necessarily one running the Sindri package). Further, it can maintain a reverse SSH tunnel to an accessible server for remote access, and receive and execute power, processing system and sensor control commands forwarded as custom binary TCP packets over said connection.

Installation and Setup

Built and tested under Python 3.7 (but should be compatible with Python >=3.6; lack thereof should be considered a bug) and recent (>= 2019) versions of the packages listed in the requirements.txt file. Works best on Linux, but is tested to be fully functional (aside from service features) on Windows (and should work equally macOS) under the Anaconda distribution.

Following standard installation via pip (venv highly recommended), the package will install the brokkr command, which can then be used to install the config files, firewall access, and (on Linux) serial port access, Brokkr systemd service, and SSH/AutoSSh service and configuration with brokkr install-all. If on Linux, simply reboot to automatically complete setup and start the brokkr service, or on all platforms you can manually execute it on the command line immediately with brokkr start. Use brokkr --help to get help, brokkr --version to get the current version and brokkr reset to reset all preferences and config files to their defaults. On Linux, the brokkr systemd service can be interacted with via the standard systemd commands, e.g. sudo systemd {start, stop, enable, disable} brokkr, systemd status brokkr, journalctl -u brokkr, etc, and the same for autossh-brokkr which controls remote SSH connectivity.

Configuration

Configuration files are located under the XDG-standard ~/.config/brokkr directory in the ini-like TOML format; they can be generated by running brokkr install-config (which will not overwrite them if they already exist), and reset to defaults with brokkr reset. Everything but the *_local.toml configs are designed to be updated automatically from the server, but the default settings in the main_network.toml and main_site.toml files should be edited to ensure optimum behavior in case the Internet is down or the server is not configured on first run. To temporarily override the centrally-managed settings with local ones, configure the appropriate settings in {config-name}_local.toml and set its override to true.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brokkr-0.2.0.tar.gz (18.8 kB view hashes)

Uploaded Source

Built Distribution

brokkr-0.2.0-py3-none-any.whl (22.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page