Find router binding_host_id mismatch
ROUTER_ID=f2d3e40f-cea5-4a2b-bac7-eba0700f449c # DB openstack port list --device-owner network:router_gateway --router ${ROUTER_ID} -c id -f value | xargs openstack port show -c binding_host_id -f value # active openstack network agent list --router ${ROUTER_ID} --long -f json | jq -r '.[] | select(."HA State" == "active").Host'
ROUTER_IDS=$(openstack router list -c ID -f value) for ROUTER_ID in ${ROUTER_IDS}; do ROUTER_PORT_ID=$(openstack port list --device-owner network:router_gateway --router ${ROUTER_ID} -c id -f value) ROUTER_NODE_DB="" if [ ! -z ${ROUTER_PORT_ID} ]; then ROUTER_NODE_DB=$(openstack port show ${ROUTER_PORT_ID} -c binding_host_id -f value) fi ROUTER_NODE_ACTIVE=$(openstack network agent list --router ${ROUTER_ID} --long -f json | jq -r '.[] | select(."HA State" == "active").Host')
Debug VPN script
#!/bin/bash export DEBUG=@option.debug@ export VPN_CONNECTION_ID=$(echo @option.vpn_connection_id@ | sed -e 's/^[[:space:]]*//') [ "${DEBUG}" == "yes" ] && set -x source /etc/kolla/admin-openrc.sh source /usr/local/pyenv/versions/osc/bin/activate # check parameter if [[ ! ${VPN_CONNECTION_ID//-/} =~ ^[[:xdigit:]]{32}$ ]]; then #if [ -z "${VPN_CONNECTION_ID}" ]; then echo -e "\e[34mPlease specify the VPN ipsec site connection ID" openstack vpn ipsec site connection list --long exit fi VPN_CONNECTION_JSON=$(openstack vpn ipsec site connection show ${VPN_CONNECTION_ID} -f json)
Ventoy ISO boot
Install
https://github.com/ventoy/Ventoy/releases/
DEV=/dev/sdX wget https://github.com/ventoy/Ventoy/releases/download/v1.0.97/ventoy-1.0.97-linux.tar.gz -O /tmp/ventoy-linux.tar.gz tar xzf /tmp/ventoy-linux.tar.gz -C /tmp/ sudo /tmp/ventoy-*/Ventoy2Disk.sh -l -i ${DEV}
Copy ISOs
cp *.iso /media/*/Ventoy/
Home Assistant MQTT
Install MQTT broker (server) on Anroid
https://apkpure.com/mqtt-broker-app/server.com.mqtt/download
Create MQTT sensor
https://www.home-assistant.io/integrations/sensor.mqtt/
# ~/.homeassistant/configuration.yam # /mnt/data/supervisor/homeassistant/configuration.yaml (on Raspery PI) ... mqtt: !include inverter.yaml # inverter.yaml sensor: - name: "Inverter AC Power" unique_id: "inverter_ac" state_topic: "inverter/HM/ch0/P_AC" unit_of_measurement: "W" device_class: "energy" state_class: "measurement" - name: "Inverter DC Power" unique_id: "inverter_dc" state_topic: "inverter/HM/ch0/P_DC" unit_of_measurement: "W" device_class: "energy" state_class: "measurement" - name: "Inverter DC Power CH1" unique_id: "inverter_dc_ch1" state_topic: "inverter/HM/ch1/P_DC" unit_of_measurement: "W" device_class: "energy" state_class: "measurement" - name: "Inverter DC Power CH2" unique_id: "inverter_dc_ch2" state_topic: "inverter/HM/ch2/P_DC" unit_of_measurement: "W" device_class: "energy" state_class: "measurement" - name: "Inverter Yield Day" unique_id: "inverter_yield_day" state_topic: "inverter/HM/ch0/YieldDay" unit_of_measurement: "Wh" - name: "Inverter Yield Total" unique_id: "inverter_yield_total" state_topic: "inverter/HM/ch0/YieldTotal" unit_of_measurement: "kWh" device_class: "energy" state_class: "measurement" - name: "Inverter Temperature" unique_id: "inverter_temperature" state_topic: "inverter/HM/ch0/Temp" unit_of_measurement: "°C" icon: "mdi:thermometer"
Install mosquitto (MQTT broker) on Raspery PI OS as docker container
ahoy / Open DTU
Download ahoy firmware
https://github.com/lumapu/ahoy/releases
https://fw.ahoydtu.de/fw/release/
# dev #URL=https://nightly.link/lumapu/ahoy/workflows/compile_development/development03/ahoydtu_dev.zip # stable URL=https://github.com/lumapu/ahoy/releases/download/ahoy_v0.8.140/ahoy_v0.8.140.zip wget ${URL} -q -O /tmp/ahoydtu.zip # extract unzip /tmp/ahoydtu.zip -d /tmp
Download esptoo
https://github.com/espressif/esptool/releases
#pip install esptool #git clone git@github.com:marcelstoer/nodemcu-pyflasher.git #git clone https://github.com/espressif/esptool.git /tmp/esptool wget https://github.com/espressif/esptool/releases/download/v4.7.0/esptool-v4.7.0-linux-amd64.zip -q -O /tmp/esptool.zip unzip /tmp/esptool.zip -d /tmp chmod +x /tmp/esptool-linux-amd64/esptool
Flash Ahoy DTU
Export server volume as image
SERVER_IDS=" dd799bc6-ded0-4f20-8f24-3e5af5250fd3 46562d71-ba00-47b7-872a-cd759abd014c 5e517453-c87f-4426-b705-96ffc9afe4ce " function save_image() { IMAGE_ID="${1}" IMAGE_NAME="${2}" echo "IMAGE_ID: ${IMAGE_ID}" openstack image set --private ${IMAGE_ID} echo "Save image as ${IMAGE_NAME}.qcow2 ..." openstack image save ${IMAGE_ID} --file ${IMAGE_NAME}.qcow2 openstack image show ${IMAGE_ID} -c size -f value ls -l ${IMAGE_NAME}.qcow2 md5sum ${IMAGE_NAME}.qcow2 > ${IMAGE_NAME}.qcow2.md5sum openstack image show ${IMAGE_ID} -f json > ${IMAGE_NAME}.json echo "Delete image ${IMAGE_NAME}" openstack image delete ${IMAGE_ID} } for SERVER_ID in ${SERVER_IDS}; do echo "SERVER_ID: ${SERVER_ID}" SERVER_JSON=$(openstack server show ${SERVER_ID} -f json) SERVER_NAME=$(echo ${SERVER_JSON} | jq -r .name | tr " " "_")
Node-RED
Termux (run Node-RED on Android)
https://nodered.org/docs/getting-started/android
https://github.com/termux/termux-app
# Install termux
https://github.com/termux/termux-app/releases/download/v0.118.0/termux-app_v0.118.0+github-debug_armeabi-v7a.apk
pkg upgrade pkg install openssh whoami passwd ssh u0_a114@192.168.178.222 -p 8022 ~ $ echo "ssh-rsa xxxxx" >> ~/.ssh/authorized_keys apt update apt dist-upgrade apt install -y vim apt install -y coreutils #apt install -y nodejs #apt install -y termux-api npm install -g node-red node-red & npm i node-red-node-ui-table node-red-dashboard
Home Assistant
Install Home Assistant as Docker container
https://www.home-assistant.io/installation/linux#platform-installation
docker run -d \ --name homeassistant \ --privileged \ --restart=unless-stopped \ -e TZ=Europe/Berlin \ -v homeassistant:/config \ --network=host \ ghcr.io/home-assistant/home-assistant:stable # volume path # /var/lib/docker/volumes/homeassistant
Configure
http://127.0.0.1:8123
Install HACS
sudo docker exec -it homeassistant bash wget -O - https://get.hacs.xyz | bash -
Addons / Plugins
LocaTuya: https://github.com/rospogrigio/localtuya/
custom_zha_quirks
https://smarthomescene.com/reviews/tuya-zigbee-single-clamp-energy-meter-review/
Zigbee / SmartHome
Devices
https://zigbee.blakadder.com/search.html
ZHA (Zigbee Home Automation)
https://www.home-assistant.io/integrations/zha/#known-working-zigbee-radio-modules
https://www.home-assistant.io/integrations/zha/
Aubess Power Monitor Switch 16A Switch Module BK7231N (BL0942)
https://www.elektroda.com/rtvforum/topic3912748.html
https://templates.blakadder.com/aubess_power_monitor_switch.html
https://www.elektroda.com/rtvforum/topic3951016.html
https://openbekeniot.github.io/webapp/devicesList.html
https://www.elektroda.com/rtvforum/topic3895572.html#20033093
https://www.elektroda.com/rtvforum/topic3912748.html
https://www.elektroda.com/rtvforum/topic3887748.html#20266899
https://github.com/openshwprojects/OpenBK7231T_App
https://github.com/tuya-cloudcutter/tuya-cloudcutter
https://www.youtube.com/@elektrodatv
https://www.elektroda.com/rtvforum/topic3887748-90.html
https://newreleases.io/project/github/openshwprojects/OpenBK7231T_App/release/1.14.119
https://github.com/openshwprojects/BK7231GUIFlashTool
Tuya
Login: https://iot.tuya.com/
API Explorer: https://eu.iot.tuya.com/cloud/explorer
Service / License: https://www.tuya.com/vas/commodity/IOT_CORE_V2
www.tuya.com/vas/user/service
ZHA quirks
https://smarthomescene.com/reviews/tuya-zigbee-single-clamp-energy-meter-review/?unapproved=4798&moderation-hash=ece87e207d73a3452151608ea851834d#comment-4798
https://github.com/zigpy/zha-device-handlers/issues/1973#issuecomment-1668617636