Files
drybox-core/docs/README.md

85 lines
2.6 KiB
Markdown

## General Usage
### Prerequisites
You must have avr-gcc and avrdude installed. To install both
tools on a Debian-based system, please run the following
command:
apt install avr-gcc avrdude
The names for these dependencies may differ for other package
managers and distributions. Please check the package sources
on your system for more information.
You will also need an in-circuit programmer for Atmel AVR
controllers like the [USBasp](https://www.fischl.de/usbasp).
If you want to send commands and receive debug output you
must make sure to have a serial interface available at
`/dev/ttyUSB0`.
### Build and Install
Run this next command in the project root directory to
build and install the project:
make all
If there are any errors during the flashing process you
should find more information in `bin/core.log`. See the
Makefile for all build settings and make sure they are
correct for your current environment.
To remove build-related auxiliary files you may use one
of these commands:
make clean
make distclean
You can listen on the serial debug interface by running
the command below. This will also initialize all optional
submodules on first invocation.
make listen
Alternatively you can spin up a web server on port 443
to interface with the device using the following command.
Make sure to read section 'Webinterface Example' for more
information on how to configure the server.
make webgui
### Setting a New Target
The script below allows you to send serial commands. You
may need to run `git submodule update --init` first if the
`opt/tools/` directory is empty (but this should usually be
done automatically when needed by another Makefile rule).
opt/tools/serial-send <command> <args ...>
Issue the SET command to update the target settings:
set <temperature> <dewpoint>
Settings are stored in EEPROM and are persistent until a new
SET command is issued. Keywords are not case-sensitive. Both
arguments may contain a decimal point followed by a sequence
of digits.
### Webinterface Example
There is an example Python web server utilizing websockets you
can check out in `opt/webgui/`. It should give you a basis for
writing a custom network bridge and integrating the device into
your home automation system.
You must generate a self-signed certificate before you run the
server. The configuration script will take care of it:
opt/webgui/configure
See the README file in the server directory for prerequisites
and more information. Please be aware that development for the
web server has paused until the core has reached version v1.0.