Connect KlikAanKlikUit 433mhz devices to Home Assistant.
- arduino
- 433mhx reciever and transmitter.
- pc/server/raspberry pi to run the python serial interface.
- python 3.8
- visual studio code with platformio.
the purpose of the arduino is to send kaku signals to devices and recieve from devices.
- Open
./arduino/
with platformio in visual studio code. - Connect arduino nano to pc.
- Go to the platformio tab and click on upload.
- install python requirements
pip3 install -r requirements.txt
. - change
HOST = "0.0.0.0"
to your mqtt brokers host. - use
python3 klikaanklikuit2mqtt.py
to run the mqtt client.
- Create service file `sudo nano /lib/systemd/system/kaku2mqtt.service
- add service information to the text file and replace "/path/to/klikaanklikuit2mqtt.py":
[Unit]
Description=klikaanklikuit2mqtt Service
After=multi-user.target
[email protected]
[Service]
Type=simple
ExecStart=/usr/bin/python3.8 /path/to/klikaanklikuit2mqtt.py
StandardInput=tty-force
[Install]
WantedBy=multi-user.target
- reload systemctl daemon
sudo systemctl daemon-reload
- enable service to autostart
sudo systemctl enable kaku2mqtt.service
- start service with
sudo systemctl start kaku2mqtt.service
sometimes it helps to run sudo pip3 install -r requirements.txt
to install python packages for the root user.