Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nmasse-itix/tic-tsdb

Saves data from the TIC (Enedis Tele Information Client) received from MQTT to a TimescaleDB
https://github.com/nmasse-itix/tic-tsdb

enedis mqtt mqtt-client timescaledb

Last synced: about 2 months ago
JSON representation

Saves data from the TIC (Enedis Tele Information Client) received from MQTT to a TimescaleDB

Awesome Lists containing this project

README

        

# Saves TIC events to TimescaleDB

## Testing

```sh
podman-compose up -d
go run cli/main.go process
declare -a fields=(IINST IINST1 IINST2 IINST3 PAPP BASE HCHP HCHC)
while sleep 1; do
value=$((1 + RANDOM % 100))
field=${fields[1 + $((RANDOM % ${#fields[@]}))]}
echo "{\"ts\":$EPOCHSECONDS,\"val\":\"$(printf %03d $value)\"}" | pub -broker mqtt://localhost:1883 -topic esp-tic/status/tic/$field -username dev -password secret -qos 1
done
```