- This mini motherboard shares the same form size with Raspberry-pi 3B but with a faster cpu and much more memory.
- The official website provide either ubuntu image and raspbian image
- raspbian seems less bulky and works pretty well with all hw components as well as Home Assistant Core
- Highly recommended to use a faster micro sd-card or use eMMC Module (IO is pretty slow)
- update hostnames in these files and reboot
/etc/hostname/etc/hosts- Or
hostnamectl set-hostname new-hostnameand confirm withhostnamectl
git clone https://github.com/morrownr/8821cu-20210118
cd 8821cu-20210118
./ARM64_RPI.sh
sudo ./install-driver.sh
# reboot accordingly
- install bluetooth packages
apt-get install -y bluez bluez-tools bluemansystemctl status bluetooth.service
- Why the user can see any bluetooth devices?
- the user might not have access to bluetooth (need to be in the
bluetoothgroup)gpasswd -a homeassistant bluetoothgpasswd -a pi bluetooth
- You should be able use
bluetoothctlto list and scanlsusbshould show you the usb bt receiver and you should see bt firmware loading indmesg
- the user might not have access to bluetooth (need to be in the
- Reference: https://wiki.archlinux.org/title/wpa_supplicant
- Scan for SSIDs
iwlist wlan0 scans - Create a file named
/etc/wpa_supplicant/wpa_supplicant.confwith following contentcountry=US update_config=1 ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev network={ ssid="Fishy NNetwork" psk=".........." proto=RSN key_mgmt=WPA-PSK } network={ ssid="FishyLake" psk=".........." proto=RSN key_mgmt=WPA-PSK } wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf- To restart wlan0:
ifdown wlan0 && ifup wlan0 - Check status:
interface wlan0
- The firmware for this bluetooth dongle very likely is missing on raspbian
- run
lsusband you would see the ASUS BT500 device (but not working) - run
dmesgand you will see firemware missing for that bluetooth dongle
- ASUS does not have firmware for linux but we are luckily enough to get it from mpow
- Direct download (might change): https://cdn.shopify.com/s/files/1/0249/2891/1420/files/20201202_BH456A_driverforLinux-1_0929.7z?v=1664445632
- or https://www.xmpow.com/pages/download and look for BH456A Bluetooth USB Adapter
- Unzip the download file and look for
rtl876b_*and copy them to/lib/firmware/rtl_bt- you would need to rename them if system is looking for
rtl876buinstead (bandbuare the same)
cd /lib/firmware/rtl_bt sudo ln -s rtl8761b_config.bin rtl8761bu_config.bin sudo ln -s rtl8761b_fw.bin rtl8761bu_fw.bin - you would need to rename them if system is looking for
- Follow the official doc
- Additional packages
apt-get install -y ffmpegfor Ring Integration
cat /etc/systemd/system/home-assistant\@homeassistant.service
[Unit]
Description=Home Assistant
After=network-online.target
[Service]
Type=simple
User=%i
WorkingDirectory=/home/%i/.homeassistant
ExecStart=/srv/homeassistant/bin/hass -c "/home/%i/.homeassistant"
RestartForceExitStatus=100
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
apt-get install -y mosquitto mosquitto-clientsystemctl status mosquitto
- Make the server only accessible locally with password
- add
/etc/mosquitto/conf.d/default.confper_listener_settings true listener 1883 localhost allow_anonymous true listener 8883 0.0.0.0 allow_anonymous false password_file /etc/mosquitto/passwd - add
/etc/mosquitto/passwdfishylake:<secret>- run
mosquitto_passwd -U passwd && chgrp mosquitto /etc/mosquitto/passwd && chmod 640 /etc/mosquitto/passwd - run
systemctl restart mosquittoto reload the config
- run
- Test mqtt
- http://www.steves-internet-guide.com/mosquitto_pub-sub-clients/
- receive all topics
mosquitto_sub -h localhost -v -t \# - send a message
mosquitto_pub -h localhost -t testing/123 -m {\"status\":\"OFF\"}
-
apt-get install libtool libusb-1.0-0-dev librtlsdr-dev rtl-sdr build-essential autoconf cmake pkg-config - https://www.switchdoc.com/2020/11/tutorial-raspberrypi-433mhz-weatherrack2-2/
cd ~ git clone https://github.com/merbanan/rtl_433.git cd rtl_433 mkdir build cd build cmake .. make sudo make install - connect rtl_433 to mqtt broker
- You would need to have the devices first added to the Midea Air App via a cloud account (not with Apple ID or facebook)
- User: [email protected]
- Password: <Hint: first date of internet and plain old password>
- You can always share them later to different Midea Accounts/Users
- As with Core, you need to install it manually
# As the `homeassistant` user sudo -u homeassistant -H -s cd ~ # Obtain the custom integration for Midea git clone https://github.com/nbogojevic/homeassistant-midea-air-appliances-lan mkdir -p ~/.homeassistant/custom_components # Copy the custom integration to Home Assistant Config folder cp -R homeassistant-midea-air-appliances-lan/custom_components/midea_dehumidifier_lan ~/.homeassistant/custom_components - Restart
Home Assistantto pick up new integration
-
curl -L https://install.pivpn.io | bash - Why OpenVPN over WireGuard? Router integration is still lacking for WireGuard, so we should stick with OpenVPN for now.
- iptables rules can be found in
/etc/iptables/rules.v4- make sure the postrouting rules are using the correct inet otherwise clients can't access the internet (or local network)
-
apt-get install ddclient - Obtain the credentail for specific dynamic dns record (at the very bottom on domains.google.com)
# /etc/ddclient.conf protocol=googledomains \ use=web, web=https://domains.google.com/checkip \ login=... \ password=... \ fishylake.compulty.com
# Obtain the corresponding credential of the DDNS record.
curl "https://${LOGIN}:${PASSWORD}@domains.google.com/nic/update?hostname=fishylake.compulty.com&myip=$(curl ipconfig.io)"
-
sudo apt install certbot sudo certbot certonly --manual --preferred-challenges dns -d fishylake.compulty.com # follow the instruction to update the TXT record to complete the verification
https://github.com/homebridge/homebridge/wiki/Install-Homebridge-on-Debian-or-Ubuntu-Linux
curl -sSfL https://repo.homebridge.io/KEY.gpg | sudo gpg --dearmor | sudo tee /usr/share/keyrings/homebridge.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/homebridge.gpg] https://repo.homebridge.io stable main" | sudo tee /etc/apt/sources.list.d/homebridge.list > /dev/null
sudo apt-get update
sudo apt-get install homebridge
systemctl status homebridge
Login to the web interface by going to http://:8581.
To bring Alexa enabled devices into homebridge, we need homebridge-alexa-smarthome
- In homebrdige Web UI, look for
homebridge-alexa-smarthomeand install it. - Configure the plugin as following
- Proxy Client Host: <HOST_IP>
- Proxy port: 9876
- It then restarts and open http://<HOST_IP>:9876 and complete the login (amazon account + otp)
- Now all devices (alexa registered) will show up (e.g. smart thermostats)
- If
apt-get updateerrors out aboutThe following signatures were invalid: EXPKEYSIG 2E5FB7FC58C58FFB deb.libre.computer <[email protected]> - Follow this instruct to update the base image
wget https://deb.libre.computer/repo/pool/main/libr/libretech-keyring/libretech-keyring_2024.05.19_all.deb sudo dpkg -i libretech-keyring_2024.05.19_all.deb sudo apt update
- create dbrp mapping for influxql
influx v1 dbrp create --db homeassistant --rp autogen --org fishylake --bucket-id 5dc17125e0b5ba2b --default- now we have database mapping called
homeassistantto the newly created bucket