Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaltsoon/kilke
📊 IOT platform for reading and visualising sensor data
https://github.com/kaltsoon/kilke
docker iot javascript
Last synced: 6 days ago
JSON representation
📊 IOT platform for reading and visualising sensor data
- Host: GitHub
- URL: https://github.com/kaltsoon/kilke
- Owner: Kaltsoon
- Created: 2018-10-17T15:32:30.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-11T01:47:41.000Z (almost 2 years ago)
- Last Synced: 2023-04-06T05:12:19.888Z (over 1 year ago)
- Topics: docker, iot, javascript
- Language: JavaScript
- Homepage:
- Size: 2.99 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 57
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kilke
## Setup
1. Install [Docker](https://www.docker.com/)
2. Run `docker-compose up`
3. Once `db` and `api` services are running, run the migrations by running `docker-compose exec api yarn migrate:latest`
4. _(Optional)_ Create a system by calling the API with the following request:```bash
curl -d '{"name": "System"}' -H "Content-Type: application/json" -X POST http://localhost:5000/api/v1/systems
```After the setup is done, the client should be available at .
### Package configuration
You can override each package's configuration in the `.env` file within package's directory (e.g. `packages/api/.env`). Note that some of these changes (such as ports) require altering the `Dockerfile`s and `docker-compose.yml` file as well.
## System configuration
System configuration format:
```javascript
{
sensors: {
[string]: { // key for the sensor
title: string,
subtitle: string,
decimals: number, // how many decimals are used to display measurements
reactorTitle: string, // title showed in the reactor view
unit: {
unit: string, // unit short name, such as "RPM"
title: string, // unit long name, such as "Temperature"
},
calibration: {
x1: number,
x2: number,
y1: number,
y2: number,
},
},
},
pumps: {
[string]: { // key for the pump
title: string,
subtitle: string,
},
},
binarySensors: {
[string]: {
title: string,
subtitle: string,
reactorTitle: string,
},
},
visualization: {
tabs: Array<{
title: string,
sensors: Array, // array of sensor keys
}>,
},
reactor: {
pumps: Array, // pump keys
sensors: Array, // sensor keys
binarySensors: Array, // binary sensor keys
}
}
```## Inspecting logs
Run `docker-compose logs ` where `` is the target service. E.g. `docker-compose logs system-reader`
## Database connection
Once containers are running after running `docker-compose up`, you can access the database container by running `docker-compose exec db /bin/bash`. Once connected to the database container you can access the database from terminal by running the command:
```
psql -U postgres -d kilke
```