85 lines
2.5 KiB
Markdown
85 lines
2.5 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 core.log in the bin/
|
|
directory. See the Makefile for different settings for
|
|
your specific build environment.
|
|
|
|
To remove all build related auxiliary files you may run
|
|
these commands:
|
|
|
|
make clean
|
|
make distclean
|
|
|
|
You can listen on the serial debug interface using the
|
|
command below (if you have initialized the optional
|
|
submodules as described in the 'Setting a New Target'
|
|
section):
|
|
|
|
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.
|
|
|
|
make listen-web
|
|
|
|
### Setting a New Target
|
|
|
|
The script below allows you to send serial commands (you
|
|
may need to run `git submodule update --init` if the tools/
|
|
directory is empty):
|
|
|
|
./opt/tools/serial-send.py <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 webgui/ 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.
|