Git Product home page Git Product logo

koubachi-goserver's Introduction

koubachi-goserver

this is a self hosted server for koubachi plant sensors. it saves the readings into a local sqlite database and displays them in a series of charts.

index sample

inspired by https://github.com/koalatux/koubachi-pyserver

koubachi server address

change koubachi endpoint and wi-fi access (see https://github.com/koubachi-sensor/api-docs#change-the-sensors-server-address)

set enpoint using curl

curl -X GET -G http://172.29.0.1/sos_config -d host=192.168.1.120 -d port=8005

run

create a config file (see config/config.yml.example)

just build and run as a container using

docker build -t koubachi-goserver .
docker run -v $(pwd)/config:/app/config:ro -v $(pwd)/readings:/app/readings -p 8005:8005 koubachi-goserver

to build with gin in debug mode use

docker build --build-arg gin_mode=debug -t koubachi-goserver .

display charts

just call address in your browser (i.E. http://localhost:8005/)

sqlite tables

create table readings
(
    id             INTEGER
        constraint readings_pk
            primary key autoincrement,
    device         INTEGER not null
        references devices,
    rawvalue       REAL,
    convertedvalue REAL,
    timestamp      INTEGER not null,
    sensor         INTEGER not null
        references sensors
);

create table devices
(
    id         INTEGER
        constraint devices_pk
            primary key autoincrement,
    macaddress TEXT,
    name       TEXT
);

create unique index devices_macaddress_uindex
    on devices (macaddress);

create table sensors
(
    id   INTEGER
        constraint sensors_pk
            primary key autoincrement,
    name TEXT not null
);

create unique index sensors_name_uindex
    on sensors (name);

koubachi-goserver's People

Contributors

munzli avatar

Stargazers

Michel Werren avatar  avatar August Weinbren avatar Adrian Friedli avatar Serge avatar Gerald Reisinger avatar

Watchers

James Cloos avatar  avatar  avatar m03315 avatar

Forkers

silvermind polpas

koubachi-goserver's Issues

Sensor Data

Hy, I'm trying to build up a local system to use an old kobochi sensor.

I have built app all docker container, I also set the server to the ip address that you used but I can't receive any kind of data?

I have done this steps:

  1. COnected to de sensor and set the 192.168.1.120:8005 to sos_config

  2. Tried a connection to my local network were the wifi get a ok response and others not.

  3. Run the docker on wifi connection of my network.

  4. Reconected to the sensor and also to the network with no data

Is there a procedure or something to do in order to get the data, like putting some code in sql file or something like that?

Data chart not being previewed

Iโ€™m having issues with database creation.

I runned sqlite3 koubachi.dB and pasted the content of sql data as mentioned in your page. But although I know data is being received from the koubachi it is not showed in chart. Am I missing something in your tutorial?

When docker is build it create repo

When docker is built it create 2 repos one of 14 Mb and one of 550 Mb is this ok?

When I list doker images I get 1 unknown docker image of 550 Mb with name none. shouldnt the docker build create one image only?

database is not beeing updated with values

I followed your tutorial everything fine koubachi config.yml at correct destination with format as example.

database when start docker is created without errors.

I've been 3 days with project running and have no values in charts. the information from the yaml is not showed for examle the name of the koubachi in the charts as a data information.

I'm sending you the yml of my koubachi so you can see if any issues in the structur
config.txt
e

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.