-
Notifications
You must be signed in to change notification settings - Fork 12
The Config File
The configuration file is a simple textual file that begins with a header line denoting its purpose:
[attinydaemon]
Following this are the option. If an option is missing at startup, the daemon determines the value that is currently set in the ATTiny Daemon and copies it to the config file. An example config file can be found in the daemon subdirectory.
If you change a value of an existing option in the configuration file, then the daemon writes to new value to the ATTiny Daemon after a restart of the daemon. You can either reboot the system or execute the following command (assuming you used the service file for the installation of the daemon):
sudo systemctl restart attiny_daemon.service
This simply stops and restarts the daemon.
By default the configuration file is assumed to be in the same directory as the daemon itself. By using the command line option
--cfgfile <file>
another file with an arbitrary path can be provided as a config file.
| Option Name | Default | Comment |
|---|---|---|
| i2c address | 0x37 | This is the I2C address of the ATTiny, shouldn't have to be changed normally |
| button function | shutdown | The possible options are shutdown, reboot and nothing |
| timeout | 60 | |
| sleeptime | 20 | |
| primed | true | |
| loglevel | DEBUG | |
| force shutdown | True | |
| shutdown voltage | 3200 | This is the voltage at which the ATTiny Daemon executes a hard shutdown |
| warn voltage | 3400 | This is the voltage at which the ATTiny Daemon warns the RPi to shut down |
| restart voltage | 3900 | At this voltage the ATTiny tries to restart the RPi if it is not running |
| battery voltage coefficient | 1000 | |
| battery voltage constant | 0 | |
| external voltage constant | 0 | |
| external voltage coefficient | 1818 | |
| temperature constant | -270 | |
| temperature coefficient | 1000 |