Zry.IO

返回

硬件

卸下底座胶垫下的三颗螺丝即可拆开,按照 Tasmota 文档 [存档] 给 ESP 模块焊上需要的引线:

pinout

来源:https://github.com/gsimon75/Tasmota_MiDeskLamp_Notes

  1. 黑色:GND,连接至 PIN3、5、6、7、15、16、19、20 均可
  2. 白色:Vcc(+3.3 V),连接至 PIN8
  3. 灰色:UART RxD,连接至 PIN17
  4. 紫色:UART TxD,连接至 PIN18

wiring

另外短接 PIN4(GPIO0)和 PIN3(GND),再用镊子短接 PIN9(RST)和 PIN7(GND)后释放,让 ESP 重置后进入烧写模式。

软件

ESPHome 配置示例:

来源:https://github.com/syssi/esphome-mi-desk-lamp

重置 ESP 模块后稍等,Home Assistant 会通知已自动发现新 ESPHome 设备,直接选择接入即可。之后即可添加原生带亮度与色温调整的灯具卡片至 lovelace。

lovelace-card

关于扩展功能

之前根据 Tasmota 文档最后说的 [存档]

As the lamp has external power supply, and the LEDs are in the upper part of the lamp, the temperature of the base is the same as of the ambient, and by its nature the lamp is situated on your desk, so it’s a perfect place for temp+humidity measurements.

在 GPIO0 接了一个 DHT22 温湿度传感器,但实际使用一段时间后发现效果并不好,台灯一点亮就会让温度读数马上升高 5 ℃ 左右。

MJTD01YL 小米米家台灯
https://zry.io/zh/smart-home/mjtd01yl-xiaomi-mijia-desk-lamp
作者 zry98
发布于 2022年1月28日