HOME ASSISTANT 总结
2022年3月10日大约 2 分钟约 652 字...
HOME ASSISTANT 总结
1.安装
docker方式:
- Win10:
命令:
docker run --init -d --name="home-assistant" -e "TZ=Asia/Shanghai" -v /d/home_assistant/config:/config --net=host homeassistant/home-assistant:latest
- Linux(云服务器):
docker run --init -d --name="home-assistant" -e "TZ=Asia/Shanghai" -v //www/wwwroot/device.4a1801.life/config:/config --net=host homeassistant/home-assistant:latest
- 群晖:
Home Assistan安装—之群晖Docker玩法
2.配置SSL
宝塔反代HomeAssistant并添加SSL笔记 - Yuan (9kr.cc)
注1:宝塔反代设置
#PROXY-START/
location ^~ /
{
proxy_pass http://127.0.0.1:8123;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_fileSIjN7esB 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_fileSIjN7esB 1;
expires 12h;
}
if ( $static_fileSIjN7esB = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END/
#PROXY-START/
location ^~ /
{
proxy_pass http://127.0.0.1:8123;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_fileSIjN7esB 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_fileSIjN7esB 1;
expires 12h;
}
if ( $static_fileSIjN7esB = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END/
注2:configuration.yaml修改如下 <mark>
(群晖在线文件配置需要编码格式为UTF-8才能备注里加中文)</mark>
http:
use_x_forwarded_for: true
trusted_proxies:
- 119.23.60.199 //公网IP地址
- 172.17.0.1
- 127.0.0.1
- ::1
3.安装集成
主要集成:HACS、hass-xiaomi-miot、Gree climate
注:也可以通过下载zip文件解压缩方式安装集成
- HACS:可理解为第三方“应用市场”,可安装HACS 极速版
- xiaomi-miot-auto:可接入小米设备
- Gree climate:可接入格力空调
- 巴法 bemfa:可通过小爱同学控制美的、格力等其他品牌空调
- Midea AC LAN:可接入美的设备(部分)
- Node-red:可通过该方式接入其他实体,如油价查询、海尔设备、企业微信消息推送、比亚迪数据接入、各种抓包数据接入
- 南方电网HA集成 :可接入南方电网数据查询电费
- [Garmin Connect HA集成(自己修改版本)](https://github.com/cyberjunky/home-assistant-garmin_connect)
- NodeRed安装配置
Node-red节点备份
注:也可以通过下载zip文件解压缩方式安装集成
Releases · al-one/hass-xiaomi-miot (github.com)
Releases · hacs/integration (github.com)
4.主题设置
[HassOS系列] HomeAssistant主题的安装使用 )
5.参考教程
Powered by Waline v3.4.3