Note
This project is not a general solution. This is just an implementation for specific purposes (my purposes 🙂). Some things were implemented quite simply so as not to complicate support. I hope the code will be helpful to you.
- Raspberry Pi 4
- Arduino Nano V3.0 ATmega328P (is connected via USB to the Raspberry Pi)
- AM2302 DHT22
- HC-SR501
- Logitech C270 HD (is connected via USB to the Raspberry Pi)
- CC2531 (is connected via USB to the Raspberry Pi)
-
Create
prod.env
file in./envs
. Seeproject/config/default.py
. -
Copy the code to a Raspberry Pi (or somewhere else).
-
Build and run:
docker-compose build docker-compose up -d
-
If you want to use Arduino then you need to upload
arduino_core
. Libs:arduino-cli lib install RF24 "DHT sensor library" ArduinoJson
-
Set ZigBee Dongle (if you use CC2531)
- Connect CC2531
- Install WiringPi
(jmichault/flash_cc2531#18)
git clone https://github.com/WiringPi/WiringPi.git git checkout 5de0d8f5739ccc00ab761639a7e8d3d1696a480a cd WiringPi ./build
- https://kvvhost.ru/2019/05/29/zigbee2mqtt-cc2531-raspberry-pi/
- Install WiringPi
- Add devices.
- Connect CC2531