本帖最后由 yehong1995 于 2020-3-12 14:40 编辑
参考地址:https://github.com/tasmota/docs/blob/d660f6ab29fb511b0b5750b296b7bb85c5641a06/peripherals/MI-HM10.md
使用的是esp8266 + hm10(cc2541)
esp8266最好选择nodemcu可以帮助hm10烧写
固件hm10烧录具体可以参见这两个地址:https
: //circuitdigest.com/microcontroller-projects/how-to-flash-the-firmware-on-cloned-hm-10-ble-module-using-arduino-uno HTTPS:/ /bbs.hassbian.com/forum.php?mod=viewthread&tid=8745&highlight=zigbee
最后将烧好tasmota的nodemcu连接hm10设置好gpio参数就可以了
ha mqtt传感器,订阅相关主题
sensor:
- platform: mqtt
name: 书房温度
state_topic: "tele/tasmota_2B2C70/SENSOR"
unit_of_measurement: '°C'
device_class: "temperature"
value_template: "{{ value_json['LYWSD03-cf520f']['Temperature'] }}"
- platform: mqtt
name: 书房湿度
state_topic: "tele/tasmota_2B2C70/SENSOR"
device_class: "humidity"
unit_of_measurement: '%'
value_template: "{{ value_json['LYWSD03-cf520f']['Humidity'] }}"
- platform: mqtt
name: 书房Battery
state_topic: "tele/tasmota_2B2C70/SENSOR"
device_class: "battery"
unit_of_measurement: '%'
value_template: "{{ value_json['LYWSD03-cf520f']['Battery'] }}"
|