├── .gitignore ├── broadlinkac2mqtt ├── icon.png ├── logo.png ├── run.sh ├── build.yaml ├── config.yaml └── Dockerfile ├── broadlinkac2mqtt-dev ├── icon.png ├── logo.png ├── build.yaml ├── config.yaml └── Dockerfile ├── repository.json ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/.gitignore 2 | /.idea/hassio-add-ons.iml 3 | /.idea/modules.xml 4 | /.idea/vcs.xml 5 | -------------------------------------------------------------------------------- /broadlinkac2mqtt/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArtemVladimirov/hassio-add-ons/HEAD/broadlinkac2mqtt/icon.png -------------------------------------------------------------------------------- /broadlinkac2mqtt/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArtemVladimirov/hassio-add-ons/HEAD/broadlinkac2mqtt/logo.png -------------------------------------------------------------------------------- /broadlinkac2mqtt-dev/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArtemVladimirov/hassio-add-ons/HEAD/broadlinkac2mqtt-dev/icon.png -------------------------------------------------------------------------------- /broadlinkac2mqtt-dev/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ArtemVladimirov/hassio-add-ons/HEAD/broadlinkac2mqtt-dev/logo.png -------------------------------------------------------------------------------- /broadlinkac2mqtt/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | python3 -c 'import sys, yaml, json; print(yaml.dump(json.loads(open("/data/options.json").read())))' > /broadlinkac2mqtt/config/config.yml -------------------------------------------------------------------------------- /repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ArtemVladimirov Hass.io Add-ons", 3 | "url": "https://github.com/ArtemVladimirov/hassio-add-ons", 4 | "maintainer": "Artem Vladimirov " 5 | } -------------------------------------------------------------------------------- /broadlinkac2mqtt-dev/build.yaml: -------------------------------------------------------------------------------- 1 | build_from: 2 | aarch64: "ghcr.io/home-assistant/aarch64-base:3.19" 3 | amd64: "ghcr.io/home-assistant/amd64-base:3.19" 4 | armhf: "ghcr.io/home-assistant/armhf-base:3.19" 5 | armv7: "ghcr.io/home-assistant/armv7-base:3.19" 6 | i386: "ghcr.io/home-assistant/i386-base:3.19" -------------------------------------------------------------------------------- /broadlinkac2mqtt/build.yaml: -------------------------------------------------------------------------------- 1 | build_from: 2 | aarch64: "ghcr.io/home-assistant/aarch64-base-python:3.9-alpine3.16" 3 | amd64: "ghcr.io/home-assistant/amd64-base-python:3.9-alpine3.16" 4 | armhf: "ghcr.io/home-assistant/armhf-base-python:3.9-alpine3.16" 5 | armv7: "ghcr.io/home-assistant/armv7-base-python:3.9-alpine3.16" 6 | i386: "ghcr.io/home-assistant/i386-base-python:3.9-alpine3.16" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Home Assistant Addons 2 | 3 | [![Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.](https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg)](https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2FArtemVladimirov%2Fhassio-add-ons) 4 | 5 | ## Add-ons 6 | 7 | This repository contains the following add-ons: 8 | 9 | * [Broadlink to MQTT add-on](./broadlinkac2mqtt) 10 | 11 | ![Supports aarch64 Architecture][aarch64-shield] 12 | ![Supports amd64 Architecture][amd64-shield] 13 | ![Supports armhf Architecture][armhf-shield] 14 | ![Supports armv7 Architecture][armv7-shield] 15 | ![Supports i386 Architecture][i386-shield] 16 | 17 | [aarch64-shield]: https://img.shields.io/badge/aarch64-yes-green.svg 18 | [amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg 19 | [armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg 20 | [armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg 21 | [i386-shield]: https://img.shields.io/badge/i386-yes-green.svg 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Artem Vladimirov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /broadlinkac2mqtt/config.yaml: -------------------------------------------------------------------------------- 1 | name: broadlinkac2mqtt 2 | version: v1.5.5 3 | slug: broadlinkac2mqtt 4 | description: Control your broadlink-based air conditioner using Home Assistant 5 | url: https://github.com/ArtemVladimirov/hassio-add-ons/tree/master 6 | arch: 7 | - armhf 8 | - armv7 9 | - aarch64 10 | - amd64 11 | - i386 12 | startup: application 13 | boot: auto 14 | init: false 15 | panel_icon: mdi:air-conditioner 16 | options: 17 | service: 18 | update_interval: 10 19 | log_level: error 20 | mqtt: 21 | broker: "mqtt://192.168.1.10:1883" 22 | user: admin 23 | password: password 24 | client_id: aircon 25 | topic_prefix: aircon 26 | auto_discovery_topic: homeassistant 27 | auto_discovery_topic_retain: false 28 | certificate_authority: "ca.crt" 29 | skip_cert_cn_check: true 30 | certificate_client: "client.crt" 31 | key-client: "client.key" 32 | devices: 33 | - ip: 127.0.0.1 34 | mac: aabbccddeeff00 35 | name: MH Childroom AC 36 | port: 80 37 | temperature_unit: "C" 38 | schema: 39 | service: 40 | update_interval: "int?" 41 | log_level: "match(^(error|debug|fatal|disabled|info)$)?" 42 | mqtt: 43 | broker: str 44 | client_id: "str?" 45 | user: "str?" 46 | password: "str?" 47 | topic_prefix: "str?" 48 | auto_discovery_topic: "str?" 49 | auto_discovery_topic_retain: "bool?" 50 | certificate_authority: "str?" 51 | skip_cert_cn_check: "bool?" 52 | certificate_client: "str?" 53 | key-client: "str?" 54 | devices: 55 | - ip: str 56 | mac: str 57 | name: str 58 | port: port 59 | temperature_unit: "match(^(C|F)$)?" -------------------------------------------------------------------------------- /broadlinkac2mqtt-dev/config.yaml: -------------------------------------------------------------------------------- 1 | name: broadlinkac2mqtt-dev 2 | version: v1.5.5 3 | slug: broadlinkac2mqtt-dev 4 | description: Control your broadlink-based air conditioner using Home Assistant 5 | url: https://github.com/ArtemVladimirov/hassio-add-ons/tree/main/broadlinkac2mqtt-dev 6 | arch: 7 | - armhf 8 | - armv7 9 | - aarch64 10 | - amd64 11 | - i386 12 | startup: application 13 | boot: auto 14 | init: false 15 | panel_icon: mdi:air-conditioner 16 | options: 17 | service: 18 | update_interval: 10 19 | log_level: error 20 | mqtt: 21 | broker: "mqtt://192.168.1.10:1883" 22 | user: admin 23 | password: password 24 | client_id: aircon 25 | topic_prefix: aircon 26 | auto_discovery_topic: homeassistant 27 | auto_discovery_topic_retain: false 28 | certificate_authority: "ca.crt" 29 | skip_cert_cn_check: true 30 | certificate_client: "client.crt" 31 | key-client: "client.key" 32 | devices: 33 | - ip: 127.0.0.1 34 | mac: aabbccddeeff00 35 | name: MH Childroom AC 36 | port: 80 37 | temperature_unit: "C" 38 | schema: 39 | service: 40 | update_interval: "int?" 41 | log_level: "match(^(error|debug|fatal|disabled|info)$)?" 42 | mqtt: 43 | broker: str 44 | client_id: "str?" 45 | user: "str?" 46 | password: "str?" 47 | topic_prefix: "str?" 48 | auto_discovery_topic: "str?" 49 | auto_discovery_topic_retain: "bool?" 50 | certificate_authority: "str?" 51 | skip_cert_cn_check: "bool?" 52 | certificate_client: "str?" 53 | key-client: "str?" 54 | devices: 55 | - ip: str 56 | mac: str 57 | name: str 58 | port: port 59 | temperature_unit: "match(^(C|F)$)?" -------------------------------------------------------------------------------- /broadlinkac2mqtt-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | 3 | FROM ${BUILD_FROM} AS runtime 4 | 5 | ARG BUILD_ARCH 6 | ARG BUILD_VERSION 7 | 8 | # Install dependencies and build the binary to target platform 9 | RUN \ 10 | if [ "${BUILD_ARCH}" = "armhf" ]; then \ 11 | wget -O broadlinkac2mqtt.tar.gz https://github.com/ArtemVladimirov/broadlinkac2mqtt/releases/download/${BUILD_VERSION}/broadlinkac2mqtt-${BUILD_VERSION}-linux-arm.tar.gz; \ 12 | elif [ "${BUILD_ARCH}" = "armv7" ]; then \ 13 | wget -O broadlinkac2mqtt.tar.gz https://github.com/ArtemVladimirov/broadlinkac2mqtt/releases/download/${BUILD_VERSION}/broadlinkac2mqtt-${BUILD_VERSION}-linux-arm7.tar.gz; \ 14 | elif [ "${BUILD_ARCH}" = "aarch64" ]; then \ 15 | wget -O broadlinkac2mqtt.tar.gz https://github.com/ArtemVladimirov/broadlinkac2mqtt/releases/download/${BUILD_VERSION}/broadlinkac2mqtt-${BUILD_VERSION}-linux-arm64.tar.gz; \ 16 | elif [ "${BUILD_ARCH}" = "i386" ]; then \ 17 | wget -O broadlinkac2mqtt.tar.gz https://github.com/ArtemVladimirov/broadlinkac2mqtt/releases/download/${BUILD_VERSION}/broadlinkac2mqtt-${BUILD_VERSION}-linux-386.tar.gz; \ 18 | elif [ "${BUILD_ARCH}" = "amd64" ]; then \ 19 | wget -O broadlinkac2mqtt.tar.gz https://github.com/ArtemVladimirov/broadlinkac2mqtt/releases/download/${BUILD_VERSION}/broadlinkac2mqtt-${BUILD_VERSION}-linux-amd64.tar.gz; \ 20 | else \ 21 | echo 'NOT VALID BUILD'; exit 1; \ 22 | fi \ 23 | && tar -xzf broadlinkac2mqtt.tar.gz \ 24 | && rm broadlinkac2mqtt.tar.gz \ 25 | && rm README.md \ 26 | && chmod +x broadlinkac2mqtt 27 | 28 | CMD "./broadlinkac2mqtt" 29 | 30 | # Build arguments 31 | ARG BUILD_DATE 32 | ARG BUILD_REF 33 | 34 | # Labels 35 | LABEL \ 36 | io.hass.name="broadlinkac2mqtt" \ 37 | io.hass.description="Control your broadlink-based air conditioner using Home Assistant" \ 38 | io.hass.arch="${BUILD_ARCH}" \ 39 | io.hass.type="addon" \ 40 | io.hass.version=${BUILD_VERSION} \ 41 | maintainer="Artem Vladimirov " \ 42 | org.label-schema.description="Control your broadlink-based air conditioner using Home Assistant" \ 43 | org.label-schema.build-date=${BUILD_DATE} \ 44 | org.label-schema.name="broadlinkac2mqtt" \ 45 | org.label-schema.schema-version="1.0" \ 46 | org.label-schema.url="https://addons.community" \ 47 | org.label-schema.usage="https://github.com/hassio-addons/addon-example/tree/master/README.md" \ 48 | org.label-schema.vcs-ref=${BUILD_REF} \ 49 | org.label-schema.vcs-url="https://github.com/hassio-addons/addon-example" \ 50 | org.label-schema.vendor="Community Hass.io Addons" 51 | -------------------------------------------------------------------------------- /broadlinkac2mqtt/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM 2 | 3 | FROM golang:1.22.2-alpine as build 4 | 5 | # Build arguments 6 | ARG BUILD_ARCH 7 | 8 | WORKDIR /app 9 | 10 | # Загружаем архив и распаковываем его 11 | RUN wget https://github.com/ArtemVladimirov/broadlinkac2mqtt/archive/refs/tags/v1.5.5.zip && \ 12 | unzip v1.5.5.zip && \ 13 | mv /app/broadlinkac2mqtt-1.5.5 /app/broadlinkac2mqtt && \ 14 | rm v1.5.5.zip 15 | 16 | # Переходим в распакованную директорию 17 | WORKDIR /app/broadlinkac2mqtt 18 | 19 | # Install dependencies and build the binary to target platform 20 | RUN \ 21 | go get -d -v ./... \ 22 | && go install -v ./... \ 23 | && cd /app/broadlinkac2mqtt \ 24 | && \ 25 | if [ "${BUILD_ARCH}" = "armhf" ]; then \ 26 | GOOS=linux GOARCH=arm go build; \ 27 | elif [ "${BUILD_ARCH}" = "armv7" ]; then \ 28 | GOOS=linux GOARM=7 GOARCH=arm go build; \ 29 | elif [ "${BUILD_ARCH}" = "aarch64" ]; then \ 30 | GOOS=linux GOARCH=arm64 go build; \ 31 | elif [ "${BUILD_ARCH}" = "i386" ]; then \ 32 | GOOS=linux GOARCH=386 go build; \ 33 | elif [ "${BUILD_ARCH}" = "amd64" ]; then \ 34 | GOOS=linux GOARCH=amd64 go build; \ 35 | else \ 36 | echo 'NOT VALID BUILD'; exit 1; \ 37 | fi 38 | 39 | # STAGE 2: Include binary in target add-on container 40 | FROM ${BUILD_FROM} AS runtime 41 | 42 | WORKDIR /broadlinkac2mqtt 43 | 44 | # Copy binary from build container 45 | COPY --from=build /app/broadlinkac2mqtt/broadlinkac2mqtt . 46 | 47 | COPY run.sh . 48 | RUN chmod a+x ./run.sh 49 | 50 | RUN mkdir config 51 | 52 | RUN apk add --no-cache gcc g++ make \ 53 | && pip3 install --no-cache-dir -U \ 54 | pyyaml 55 | 56 | CMD "/broadlinkac2mqtt/run.sh" && "/broadlinkac2mqtt/broadlinkac2mqtt" 57 | 58 | # 59 | # LABEL target docker image 60 | # 61 | 62 | # Build arguments 63 | ARG BUILD_ARCH 64 | ARG BUILD_DATE 65 | ARG BUILD_REF 66 | ARG BUILD_VERSION 67 | 68 | # Labels 69 | LABEL \ 70 | io.hass.name="broadlinkac2mqtt" \ 71 | io.hass.description="Control your broadlink-based air conditioner using Home Assistant" \ 72 | io.hass.arch="${BUILD_ARCH}" \ 73 | io.hass.type="addon" \ 74 | io.hass.version=${BUILD_VERSION} \ 75 | maintainer="Artem Vladimirov " \ 76 | org.label-schema.description="Control your broadlink-based air conditioner using Home Assistant" \ 77 | org.label-schema.build-date=${BUILD_DATE} \ 78 | org.label-schema.name="broadlinkac2mqtt" \ 79 | org.label-schema.schema-version="1.0" \ 80 | org.label-schema.url="https://addons.community" \ 81 | org.label-schema.usage="https://github.com/hassio-addons/addon-example/tree/master/README.md" \ 82 | org.label-schema.vcs-ref=${BUILD_REF} \ 83 | org.label-schema.vcs-url="https://github.com/hassio-addons/addon-example" \ 84 | org.label-schema.vendor="Community Hass.io Addons" 85 | --------------------------------------------------------------------------------