Apache License 2.0

项目介绍

monster1025/aqara-mqtt 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 Apache License 2.0 许可证,目前获得 89 个 Star、22 次 Fork。

仓库全名
monster1025/aqara-mqtt
开源许可证
Apache License 2.0
Star 数
89
Fork 数
22
未关闭 Issue
1

README 摘要

Aqara-MQTT Aqara (Xiaomi) Gateway to MQTT bridge. I use it for home assistant integration and it works well now. You need to activate developer mode (described here: http://bbs.xiaomi.cn/t-13198850) Bridge accept following MQTT set: will turn on plug/heater and translate devices state from gateway: Architecture Docker image support following architectures (you must choose your architecture in docker-compose): armhf…

完整内容见 GitHub 原始 README 或本页 。

常见问题

aqara-mqtt 用什么语言开发?

主要使用 Python 编写,采用 Apache License 2.0 许可证,目前有 89 个 Star。

aqara-mqtt 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 aqara-mqtt 的源码?

可以直接克隆仓库:git clone https://github.com/monster1025/aqara-mqtt.git,默认分支为 master;安装与运行步骤见仓库 README。

aqara-mqtt 最近还在维护吗?

仓库最近一次更新为 2021年3月14日,当前有 1 个未关闭 Issue;Star 数为 89,可作为社区活跃度的参考。

关于

Aqara (Xiaomi) Gateway to MQTT bridge (I use it for home assistant integration)

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
148
价值分
61
活跃状态
活跃

README

Aqara-MQTT

Build Status

Aqara (Xiaomi) Gateway to MQTT bridge. I use it for home assistant integration and it works well now.

You need to activate developer mode (described here: http://bbs.xiaomi.cn/t-13198850)

Bridge accept following MQTT set:

"home/plug/heater/status/set" -> on 

will turn on plug/heater and translate devices state from gateway:

"home/plug/heater/status" on

Architecture

Docker image support following architectures (you must choose your architecture in docker-compose):

  • armhf (raspberry pi 3, arm32v7)
  • i386 (x86 pc)
  • x64 (x64 pc)

Config

Edit file config/config-sample.yaml and rename it to config/config.yaml

Docker-Compose

Sample docker-compose.yaml file for user:

aqara:
  image: monster1025/aqara-mqtt:1-armhf
  container_name: aqara
  volumes:
    - "./config:/app/config"
  net: host
  restart: always

General discussions:

Home assistant examples:

  • Gateway rgb light as home assistant bulb template
- platform: mqtt_template
  name: "Main Gateway"
  state_topic: "home/gateway/main/rgb"
  command_topic: "home/gateway/main/rgb/set"
  command_on_template: "{%- if red is defined and green is defined and blue is defined -%}{{ red }},{{ green }},{{ blue }}{%- else -%}255,179,0{%- endif -%},{%- if brightness is defined -%}{{ (float(brightness) / 255 * 100) | round(0) }}{%- else -%}100{%- endif -%}"
  command_off_template: "0,0,0,0"
  state_template: "{%- if value.split(',')[3]| float > 0 -%}on{%- else -%}off{%- endif -%}"  # must return `on` or `off`
  brightness_template: "{{ (float(value.split(',')[3])/100*255) | round(0) }}"
  red_template: "{{ value.split(',')[0] | int }}"
  green_template: "{{ value.split(',')[1] | int }}"
  blue_template: "{{ value.split(',')[2] | int }}"
  • Switch automation example:
trigger:
    platform: mqtt
    topic: home/switch/hall/status
    payload: 'click'
action:
  service: script.hall_force_light_on

评论

暂无评论