Repository navigation
Home
Ahmed Elsafty edited this page Aug 3, 2023
·
11 revisions
This is one way to setup the Raspberry Pi. You will need a Micro SD Card Reader.
- Install Raspberry Pi OS Lite via Raspberry pi imager.
- Enable SSH and set a username/password.
- Configure Wireless LAN.
- SSH into the pi:
ssh <username>@<ip-address>- Find raspberry pi's IP:
arp -na | grep "b8:27:eb\|dc:a6:32". - In case of MITM attack warning:
ssh-keygen -R <ip-address>.
- Find raspberry pi's IP:
- Install Docker (Raspbian version).
- Install and Run Homeassistant container.
- Follow the guide through exposing Zigbee components.
- Visit
http://<ip-address>:8123for initial setup. - Visit
http://<ip-address>:8123/config/integrations/dashboard.- Sonoff Zigbee 3.0 (antenna Integration) should be auto-detected and ready to be configured.
-
sudo docker compose restart -dif Integration is not visible.
- Visit
http://<ip-address>:8123/config/devices/dashboard.- Put Zigbee switch in pairing mode.
- From Zigbee coordinator, "Add device via this device".
- Visit
http://<ip-address>:8123/developer-tools/state.- Get the switch entity ID e.g.
switch.innr_sp_220_switch. - This ID is needed by adhan-homeassistant-pi.
- There will be multiple entities associated with our switch e.g. like switch.innr_sp_220_startup behavior. We are interested in entity ID with _switch suffix.
- Get the switch entity ID e.g.
- Visit
http://<ip-address>:8123/profile- In "Long-Lived Access Tokens", create a new token.
- This Token is needed by adhan-homeassistant-pi.
- Replace the sample Adhan mp3 file by uploading it to the raspberry pi via (for example):
-
scp adhan.mp3 <username>@<ip-address>:/home/<username>/adhan-homeassistant-pi/.
-
-
Clone the repo.
-
There are two ways to run adhan-homeassistant-pi:
-
Docker Compose:
- open docker-compose.yml and change these 4 arguments.
-
switch_id: from earlier e.g.switch.innr_sp_220_switch -
homeassistant_ip: Home assistant IP with port e.g.http://192.168.178.58:8123/ -
homeassistant_token: long lived access token from earlier.
-
sudo docker compose up -d
- open docker-compose.yml and change these 4 arguments.
-
Docker:
docker build --no-cache --tag adhan-homeassistant-pi-image:latest . docker run \ --detach \ --restart unless-stopped \ --device /dev/snd \ -e switch_id=<ADD_ME> \ -e homeassistant_ip=<ADD_ME> \ # e.g. http://192.168.178.58:8123 -e homeassistant_token=<ADD ME> \ adhan-homeassistant-pi-image:latest```
-