本帖最后由 mrjc0331 于 2019-4-30 21:57 编辑
使用树莓派一键安装hassio。在ADD-ON STORE安装Mosqitto broker和NODE-RED。
在nodered中要连接mqtt的话,在mqtt的配置中一定要添加账号密码
mqtt:
{
"logins": [
{
"username": "随意设置",
"password": "随意设置"
}
],
"anonymous": false,
"quiet_logs": true,
"customize": {
"active": false,
"folder": "mosquitto"
},
"certfile": "fullchain.pem",
"keyfile": "privkey.pem"
}
node-red
{
"credential_secret": "随意设置",
"dark_mode": false,
"http_node": {
"username": "随意设置",
"password": "随意设置"
},
"http_static": {
"username": "随意设置",
"password": "随意设置"
},
"ssl": true,
"certfile": "fullchain.pem",
"keyfile": "privkey.pem",
"require_ssl": true,
"system_packages": [],
"npm_packages": [],
"init_commands": []
}
mqtt节点上的地址是树莓派的地址,端口1883
|