Bienenstockwaage, Webapplikation
Go to file
Joerg Lehmann 534ff18a59 changed description document 2025-09-20 11:35:48 +02:00
mini-beieli-sass Update Bulma Version to 1.0.4 2025-08-09 19:13:44 +02:00
snippets added pictures 2025-09-19 20:43:19 +02:00
static changed description document 2025-09-20 11:35:48 +02:00
systemd migrate to new server 2021-04-10 21:04:02 +02:00
templates make chart more user-friendly on small devices 2021-08-20 21:21:36 +02:00
.gitignore Update Bulma Version to 1.0.4 2025-08-09 19:13:44 +02:00
Dockerfile timezone in docker image 2022-12-28 17:11:56 +01:00
README.md make some snippet content configurable 2025-08-07 13:27:34 +02:00
abocost.go refactor payment process 2021-04-12 19:18:57 +02:00
authentication.go enhance password reset 2020-04-13 10:04:56 +02:00
check_nodes.go make expiration text more precise 2022-08-01 11:05:08 +02:00
go.mod Stripe: new version of Library and creating customer 2023-02-03 17:20:12 +01:00
go.sum Stripe: new version of Library and creating customer 2023-02-03 17:20:12 +01:00
helper.go refactor email send functions, integrate check_nodes in mini-beieli-web 2022-07-20 17:49:07 +02:00
log.go go fmt; email message after payment 2020-04-09 14:41:41 +02:00
mail.go use html mail for abocost because of table 2022-09-16 11:00:41 +02:00
main.go New Abo cost for calendar year, not month (in the perspective of the customer) 2025-08-09 17:12:37 +02:00
metrics.go fix bug in time calculation 2022-08-01 10:55:49 +02:00
minify-fa.sh modifications 2019-12-26 16:36:31 +01:00
persistence.go Stripe: new version of Library and creating customer 2023-02-03 17:20:12 +01:00
scales.go allow min/max alerting for weight 2021-08-21 17:06:42 +02:00
stripe.go Stripe: new version of Library and creating customer 2023-02-03 17:20:12 +01:00

README.md

mini-beieli-web - Bienenstock Ueberwachung

Webapplikation, geschrieben in Golang.

Administration

Redis Commands

$ redis-cli

Show all keys:
127.0.0.1:6379> keys *

Create new user (devs prefixed with @ are read-only devs):
127.0.0.1:6379> HMSET user:joerg.lehmann@nbit.ch my_devs "0002CC01000003E4,@0002CC01000003E5"

Show all values of a key
127.0.0.1:6379> HGETALL user:joerg.lehmann@nbit.ch
 1) "last_login"
 2) "2020-04-11 13:41:57"
 3) "confirm_id"
 4) ""
 5) "password"
 6) "$2a$10$XdDSG2E9SpVuxLE59JWwsO9aJtbrwArSflBGwGVvjWDEQecXEUo06"
 7) "my_devs"
 8) "0002CC01000003E4,@0002CC01000003F5,0002CC01000003F1,0002CC01000003F7,0002CC01000003F3,0002CC01000003E1,0002CC01000003D4,0002CC01000003EC,0002CC01000003E2"
 9) "new_password"
10) "$2a$10$XdDSG2E9SpVuxLE59JWwsO9aJtbrwArSflBGwGVvjWDEQecXEUo06"

Set password (htpasswd in httpd-tools rpm):
$ htpasswd -nbBC 5 USER PASSWORD


27.0.0.1:6379> HMSET user:joerg.lehmann@nbit.ch password '$2a$10$TmNA6PDKWBnMw/XcJ0DDi.zpWzZB0RYyrKc8Bh3x6LHAyCxbByhkC'

Change active_until date:
127.0.0.1:6379> HMSET dev:0002CC01000003E2 active_until "01.05.2021"

show range of last values:
127.0.0.1:6379> LRANGE lastvalues:0002CC01000003E4 0 -1

InfluxDB Commands

To delete Datapoints (example):

$ TOKEN="XXXXXX influxdb access token with rw access rights XXXXXX"
$ influx delete --token "${TOKEN}" --org minibeieliorg --bucket minibeielibucket --start 2021-06-01T10:53:00Z --stop 2021-06-01T10:53:00Z --predicate '_measurement="measurement" AND deveui="0000D3A659832805"'

Create and Push Docker Image

Example:
$ podman login --username drpuur git.nbit.ch
$ podman build --tag git.nbit.ch/drpuur/mini-beieli-web:2025080701 -f ./Dockerfile
$ podman push git.nbit.ch/drpuur/wo-bisch-web:2025080701

Autor: Joerg Lehmann, nbit Informatik GmbH