2019-08-25 18:59:12 +00:00
|
|
|
# flucky
|
|
|
|
|
2020-06-10 19:16:50 +00:00
|
|
|
[![Build Status](https://drone.cryptic.systems/api/badges/volker.raschek/flucky/status.svg)](https://drone.cryptic.systems/volker.raschek/flucky)
|
2019-09-04 11:57:41 +00:00
|
|
|
[![Docker Pulls](https://img.shields.io/docker/pulls/volkerraschek/flucky)](https://hub.docker.com/r/volkerraschek/flucky)
|
2019-04-18 15:10:03 +00:00
|
|
|
|
2019-08-25 14:31:52 +00:00
|
|
|
Flucky is a lightweight program written in go for reading data from sensors, for
|
|
|
|
example with a banana or raspberry pi. In addition, flucky provides a REST-API
|
2020-01-19 13:41:31 +00:00
|
|
|
to receive from other flucky installations measured values. All received
|
|
|
|
measured values, no matter if they come directly from flucky or from a server
|
|
|
|
instance of flucky with the provided REST-API, can be stored into a database.
|
|
|
|
|
|
|
|
## Supported and planned sensors
|
|
|
|
|
|
|
|
| Name | Measured values | Supported |
|
|
|
|
| ------- | --------------------------------------- | --------- |
|
|
|
|
| BME280 | humidity, pressure, temperature | Yes |
|
|
|
|
| DHT11 | temperature | Yes |
|
|
|
|
| DHT22 | temperature | Yes |
|
|
|
|
| DS18B20 | temperature | Yes |
|
|
|
|
| SDS011 | fine dust | Planning |
|
|
|
|
|
|
|
|
## Supported and planned backends
|
|
|
|
|
|
|
|
| Backend | Supported |
|
|
|
|
| --------------- | --------------- |
|
|
|
|
| flucky | WIP |
|
|
|
|
| Logfile | CSV, JSON, XML |
|
|
|
|
| MySQL, MariaDB | Planning |
|
|
|
|
| PostgreSQL | Yes |
|
|
|
|
| SQLite | Planning |
|
2019-08-25 14:31:52 +00:00
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
2020-01-19 13:41:31 +00:00
|
|
|
Flucky can be installed over multiple ways. For example over a specific linux
|
|
|
|
distributions package or as container. The following table lists all
|
|
|
|
repositories where flucky can be otained from, but flucky can already be
|
|
|
|
compiled from source code.
|
2019-08-25 14:31:52 +00:00
|
|
|
|
2020-01-19 13:41:31 +00:00
|
|
|
| Distribution | Repo's |
|
|
|
|
| --------------------------- | ------------------------------------------------------------------------------------------- |
|
|
|
|
| Arch Linux | [armv7](https://arch.cryptic.systems/armv7), [x86_64](https://arch.cryptic.systems/x86_64) |
|
|
|
|
| Debian, Ubuntu, Linux Mint | Currently not supported |
|
|
|
|
| RHEL, Fedora, Centos | Planning |
|
|
|
|
| Container Image | [hub.docker.com](https://hub.docker.com/repository/docker/volkerraschek/flucky) |
|
2019-06-16 21:52:58 +00:00
|
|
|
|
2019-08-25 14:31:52 +00:00
|
|
|
### Compiling the source code
|
|
|
|
|
|
|
|
An additional ways to install flucky is to compile the source code. There are
|
2020-01-19 13:41:31 +00:00
|
|
|
two different ways to compile flucky from scratch. The easier ways is to use the
|
|
|
|
pre-defined container image, which has included all dependencies to compile
|
|
|
|
flucky. Alternatively, if all dependencies are met, flucky can also be compiled
|
|
|
|
without the container image. Both variants are briefly described.
|
2019-08-25 14:31:52 +00:00
|
|
|
|
|
|
|
#### Compiling the source code via container image
|
|
|
|
|
|
|
|
To compile flucky via container image it's necessary, that a container runtime
|
2020-01-19 13:41:31 +00:00
|
|
|
is installed. In the `Makefile` is predefined docker, but it's can be also used
|
2019-09-04 12:01:21 +00:00
|
|
|
podman. Execute `make container-run/flucky` to start the compiling process.
|
2019-06-16 21:52:58 +00:00
|
|
|
|
|
|
|
```bash
|
2019-09-04 12:01:21 +00:00
|
|
|
$ make container-run/flucky
|
|
|
|
make container-run COMMAND=flucky
|
2019-08-25 14:31:52 +00:00
|
|
|
make[1]: Directory „/home/markus/workspace/flucky“ is entered
|
|
|
|
/usr/bin/docker run \
|
|
|
|
--rm \
|
|
|
|
--volume /home/markus/workspace/flucky:/workspace \
|
|
|
|
volkerraschek/build-image:latest \
|
|
|
|
make go-build \
|
|
|
|
VERSION=60ee044-git \
|
|
|
|
GOOS=linux \
|
|
|
|
GOARCH=amd64
|
|
|
|
go-bindata -pkg db -o ./pkg/db/bindataSQL.go ./pkg/db/sql/***
|
|
|
|
go-bindata -pkg goldenfiles -o ./test/goldenfiles/bindata.go ./test/goldenfiles/json/***
|
|
|
|
GOOS=linux \
|
|
|
|
GOARCH=amd64 \
|
|
|
|
go build -ldflags "-X main.version=60ee044-git"
|
|
|
|
go: finding github.com/spf13/pflag v1.0.3
|
|
|
|
go: finding github.com/satori/go.uuid v1.2.0
|
|
|
|
...
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Compiling the source code without container image
|
|
|
|
|
2019-09-04 12:01:21 +00:00
|
|
|
Make sure you have installed go >= v1.12. Execute `make flucky` to compile
|
2019-08-25 14:31:52 +00:00
|
|
|
flucky without a container-image. There should be a similar output as when
|
|
|
|
compiling flucky via the container image.
|