N1 CoreELEC Docker安装HA+mqtt+node-red+dc1

CoreELEC 19

过程省略。。。

Docker

CoreELEC(kodi)插件搜索 docker,安装

HA

docker run -d --restart=always --name="homeassistant" -v /storage/docker/homeassistant/config:/config --net=host homeassistant/qemuarm-64-homeassistant:latest

mqtt

docker run -d --name="mqtt" --restart=always --net=host -p 1883:1883 -v /storage/docker/mqtt/config:/mosquitto/config -v /storage/docker/mqtt/data:/mosquitto/data eclipse-mosquitto:latest

此处坑最大

mosquitto.conf 文件需要手动先创建

persistence true
listener 18831
allow_anonymous true

确保mqtt正常运行,而不是频繁重启(具体可看docker日志)之后,运行以下创建用户

docker exec -it mqtt mosquitto_passwd -c /mosquitto/config/pwfile mqtt

再把mosquitto.conf 的内容更为如下:

 

listener 1883 0.0.0.0
persistence true
persistence_location /mosquitto/data/
log_dest stderr
allow_zero_length_clientid true
protocol mqtt #websockets
password_file /mosquitto/config/pwdfile
log_type all
allow_anonymous true

 

node-red

docker run -it -p 1880:1880 --name=nodered -e TZ=Asia/Shanghai --restart=always --user=root -v /storage/docker/nodered/data:/data --net=host nodered/node-red

node-red的settings.js的查找credentialsecret,把前面的 // 去掉,设置随意字符为秘钥

Your flow credentials file is encrypted using a system-generated key - General - Node-RED Forum (nodered.org)

dc1

配网自行查找教程,路由劫持

smartplugconnect.phicomm.com 到 安装node-red主机的IP

node-red导入,并替换为自己DC1的mac地址,mqtt服务器的地址和用户、密码填写为刚才搭建的mqtt服务器

单DC1.json_

 

感谢RuralHunter及各位大神网友:

RuralHunter-CoreELEC:https://github.com/RuralHunter/CoreELEC/

VCER-HA+mqtt:https://bbs.hassbian.com/thread-11960-1-1.html

IT Commander-DC1:https://sumju.net/?p=3134

版权声明:
作者:Jays
链接:https://ijays.com/2021/09/n1-coreelec-insall-homeassistant-mqtt-nodered-dc1.html
来源:颓废的美
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>