Đây là ổ cắm mình được giới thiệu khi nó chỉ có giá 69K(ko rõ do đặt sai giá hay sao đó ^_^) giờ thì giá em nó khoảng 150K cũng khá ổn cho một ổ cắm wifi có chức năng đo điện năng tiêu thụ (relay em nó có thông số lên tới 16A nhé) Link mua: https://link.hs2t.com/S9HQyNn8ENHNZhzd9



FLASH QUA TASMOTA
Các bạn làm theo video để flash tasmota bằng cách OTA mà ko cần tháo vỏ ra nhé:
MỘT SỐ CÀI ĐẶT BAN ĐẦU
Sau khi flash xong các bạn truy cập vào web của tasmota, vào trong console gõ các lệnh sau để cài đặt ban đầu:
- SetOption36 0 (lệnh này tắt chức năng tắt mở nguồn liên tục để reset)
- Timezone +7 (lệnh này chỉnh đúng timezone Việt Nam để đo điện theo ngày chính xác)
TÍCH HỢP VÀO HOME ASSISTANT
Các bạn thêm vào file configuration.yaml phần switch, thay lại tên và mqtt topic cho đúng với thiết bị của các bạn nhé:
- platform: mqtt
name: "ổ cắm tủ lạnh"
command_topic: "cmnd/tasmota_0A7317/POWER"
json_attributes_topic: "tele/tasmota_0A7317/SENSOR"
json_attributes_template: "{{ value_json.ENERGY | tojson }}"
state_topic: "stat/tasmota_0A7317/POWER"
availability_topic: "tele/tasmota_0A7317/LWT"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
payload_on: "ON"
payload_off: "OFF"

Mẫu hiển thị ra ngoài, các bạn có thể tham khảo code sau:
type: entities
title: Tủ lạnh
entities:
- type: attribute
entity: switch.o_cam_tu_lanh
attribute: Voltage
name: Voltage
suffix: V
- type: attribute
entity: switch.o_cam_tu_lanh
attribute: Current
name: Current
suffix: A
- type: attribute
entity: switch.o_cam_tu_lanh
attribute: Power
name: Công suất
suffix: W
- type: attribute
entity: switch.o_cam_tu_lanh
attribute: Today
name: Hôm nay
suffix: KWh
- type: attribute
entity: switch.o_cam_tu_lanh
attribute: Yesterday
name: Hôm qua
suffix: KWh
- type: attribute
entity: switch.o_cam_tu_lanh
attribute: Total
name: Tổng
suffix: KWh
header:
type: graph
entity: sensor.fridge_power
hours_to_show: 72
Đăng nhận xét