
Bảng điều khiển Sonoff NSPanel màn hình cảm ứng âm tường
Giới thiệu thiết bị Sonoff NSPanel đã flash sẵn firmware Tasmota và màn hình HMI ( US, EU ) giúp dễ dàng hiển thị, điều khiển các thực thể ( entities ) của Hass trong nhiều màn hình.
Bạn thực hiện thêm các bước bên dưới, liên hệ mình nếu không rõ nhé.
Bước 1: Vào Addon store, cài đặt addon AppDaemon cho Hass. Nếu Hass của bạn không có Addon thì liên hệ mình hướng dẫn cài AppDaemon Env nhé.
Sau khi cài đặt, bạn cấu hình các bước sau cho AppDaemon:
+ Thêm package babel vào AppDaemon Options:
init_commands: []
python_packages:
- babel
system_packages: []
+ Cập nhật thông tin Hass, Mqtt vào file appdaemon.yaml:
Trong thư mục homeassistant, addon Appdaemon có tạo 1 thư mục appdeamon:
homeassistant/appdaemon #
appdaemon.yaml apps compiled dashboards namespaces www
Bạn mở file appdaemon.yaml, cập nhật thông tin HASS, MQTT vào mục plugins:
plugins:
HASS:
type: hass
ha_url: 'http://hass_ip:8123'
token: 'hass_token'
MQTT:
type: mqtt
namespace: mqtt
client_id: 'appdaemon'
client_host: broker_ip
client_port: 1883
client_user: 'user'
client_password: 'mqtt_pass'
client_topics: NONE
+ HASS:
– ha_url
– token : vào Hass profile, tạo access token.
+ MQTT :
– broker_ip
– user, mqtt_pass
Sau đó, Start addon AppDaemon, kiểm tra xem có lỗi trong mục Log không nhé.
Bước 2: Cấu hình thông tin MQTT broker vào công tắc NSPanel. Sau đó bạn lưu lại mqtt topic của NSPanel nhé.
Bước 3:
+ Download và chép nspanel-lovelace-ui và apps.yaml vào mục apps của homeassistant/appdaemon:
appdaemon.yaml apps compiled dashboards namespaces www
Mở file apps.yaml để cập nhật Mqtt topic và thêm các thực thể của Hass vào.
panelRecvTopic, panelSendTopic : cập nhật mqtt topic của nspanel vào nspanel_topic.
model : có các giá trị:
+ us-p : nspanel US bản đứng.
+ us-l: nspanel US bản nằm ngang.
+ eu: nspanel EU.
Cards bao gồm:
– Xem thêm cards tại đây.
+ cardGrid hỗ trợ các loại entity : cover, switch, input_boolean, button, scenes, and light
cards:
- type: cardGrid
title: ten_trang_screen
key: main_scr # screen xuất hiện khi chạm vào màn hình.
entities:
- entity: switch.ss26_6b40a9
- entity: switch.a3_nsw2_9b011c_1
- entity: switch.sonoff_10013d3b29_1
- entity: switch.a3_nsw2_9b011c_2
- entity: switch.brl_100_162_switch
- entity: switch.1343_aqara_nut_1
+ cardEntities : dành cho light, cover; có thể mở ra trang chi tiết cho đèn (Độ sáng, nhiệt độ và màu sắc của ánh sáng) và cho cover (vị trí của rèm, cửa cuốn …)
cards:
#########
- type: cardEntities
title: Đèn Rèm
entities:
- entity: light.ak001_zj2147_249494e9f8c3
- entity: cover.sample
+ cardMedia: dùng điều khiển thực thể media_player của Hass như Spotify, Google Home …
card:
- type: cardMedia
# spotify
entity: media_player.spotify_phatn
- type: cardMedia
# google home mini
entity: media_player.living_room_speaker
+ cardEntities : dùng hiển thị thông tin của các thực thể cover, switch, input_boolean, binary_sensor, sensor, button, number, scenes, script, input_button and light, input_text (read-only), lock, fan and automation.
card:
- type: cardEntities
title: Cảm biến
entities:
- entity: sensor.6a1d_mi_temp
name: Nhiệt độ
- entity: sensor.6a1d_mi_humi
name: Độ ẩm
- entity: sensor.pms7003_pm2_5_b12dbf
name: Độ bụi
- entity: binary_sensor.c15e_mi_door
name: Cửa trước
- entity: input_boolean.a1_door_open_alarm
name: An Ninh
Sử dụng nút bấm để di chuyển các trang của màn hình:
Bạn có thể cấu hình sử dụng 2 nút bấm cơ của công tắc để di chuyển qua lại các trang của màn hình.
SetOption73 1 Rule2 on Button1#state do Publish tele/%topic%/RESULT {"CustomRecv":"event,buttonPress2,hwbtn,bPrev"} endon on Button2#state do Publish tele/%topic%/RESULT {"CustomRecv":"event,buttonPress2,hwbtn,bNext"} endon Rule2 1
BÀI VIẾT MỚI
DANH MỤC
- hass (29)
- hass_component (16)
- hass_install (4)
- NodeRed (5)
- noha (7)
- Other (11)
- sonoff (14)
- Tuya (2)