Skip to content

sylvek/domotik

Repository files navigation

Domotik

tv

Domotik is a very simple home-automation software.

Originally, I've bought an Envi CC128, one Raspberry Pi 1 and I've used measureit to display my power consumption. It was fun but charts were cheap and difficults to upgrade.

Early in 2015, i discovered ESP8266 chip, Arduino UNO and IoT stuffs (like MQTT). I've decided to build my own devices…

I've took a comm' module from an Oregon Scientific Clock and plug it on a arduino board in order to receive data from an external temperature sensor thgr-511 (and that worked!)

clock module

Boosted by this success, I build several other temperature sensors.

sensor1 sensor2

In 2018 i received a Linky and decided to extract data with a Raspberry Pi Zero.

linky

I've also built a webpage to display data to my TV.

tv2

This dashboard was firstly displayed thanks to an original Raspberry Pi 1 and recently on a Kindle Fire TV.

Server side, i've written several small scripts in Python using Mosquitto and Mongodb. Basically, everything was running on a raspberry pi 0/1.

  • In 2015, i started the project on a raspberry pi,
  • In 2017, i switched to a x86 computer and Docker,
  • In 2020, i replaced my raspberry-pi "TV" by a Kindle TV Stick + Fully Kiosk,
  • In 2022, i gave up influxdb and built a dedicated datastore
  • In 2023, domotik works on a raspberry pi 0/1
  • In 2024, nothing more…

Build / Run it

On AMD64/ARM64

> mkdir domotik
> wget https://raw.githubusercontent.com/sylvek/domotik/master/docker-compose.yml
> docker compose up

> #open http://localhost:3000 for the TV show
> #open http://localhost:3333 to display Grafana

> #You can simulate data by using [`mosquitto_pub`](https://mosquitto.org/man/mosquitto_pub-1.html).

> mosquitto_pub -h localhost -t sensors/outside/temp -m 4
> mosquitto_pub -h localhost -t sensors/linky/watt -m 4000

On Raspberry Pi Zero/1 (armhf)

> mkdir /home/pi/domotik
> wget https://raw.githubusercontent.com/sylvek/domotik/master/docker-compose.armv6.yml
> docker compose -f docker-compose.armv6.yml up

Use it

Basically i use 3 temperature sensors and a "watt meter".

name topic unit usage
outside sensors/outside/temp xx.xx °c a value every 10 min
living room sensors/living/temp xx.xx °c a value every minute
room sensors/room/temp xx.xx °c a value every minute
power consumption sensors/linky/watt xxxxx a watt-hour value every second
power consumption sensors/linky/indice xxxxx watt consumed since the first day
power state sensors/linky/state 1 or 0 state between high and low tariff
service link
tv dashboard http://your_ip
pc dashboard http://your_ip:3000
MQTT broker tcp://your_ip:1883

I use Grafana (plugged on SQLite) to display more dashboards. (look extras/grafana-save folder)

today over 5y