『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 1751|回复: 0

[教程系列] SynologyDocker安裝Node-Red遇到的坑

[复制链接]

27

主题

387

帖子

3105

积分

元老级技术达人

积分
3105
金钱
2698
HASS币
40

教程狂人

发表于 2021-11-26 00:20:16 | 显示全部楼层 |阅读模式
本帖最后由 windgo 于 2021-11-26 21:24 编辑

最近把Zigbee2Mqtt docker裝起來玩
加了一堆裝置後,想說也來裝一下Node-Red
沒想到遇到Node-Red裝好,打開Web時,死活連不上HA伺服器
查了一堆英文網站測試方法都沒成功
後來已經放棄了,突然又成功,為了給後面的人提醒,這邊紀錄一下

這邊有寫操作步驟,請務必照步驟完成
https://github.com/zachowj/hass- ... DME.md#installation
  • Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  • If you do not have a custom_components directory (folder) there, you need to create it.
  • In the custom_components directory (folder) create a new folder called nodered.
  • Download all the files from the custom_components/nodered/ directory (folder) in this repository.
  • Place the files you downloaded in the new directory (folder) you created.
  • Restart Home Assistant
  • Refresh your browser window (bug in HA where it doesn't update the integration list after a reboot)
  • In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Node-RED Companion"

注意事項:
  • HA安裝完Node-RED Companion Integration套件後,只是可以支援Node-Red溝通,安裝完後請把docker重啟而不是只有Restart HA,這是最大的坑....
  • Node-Red docker我用nodered/node-red:2.1.3-14是沒問題的,我用其他docker與其他版本都會跳錯誤referenceerror: cannot access 'nodeversion' before initialization
  • 如果docker status一直重新啟動,將對應的資料夾權限改為777即可
  • Docker的建立指令我用docker run -d --name="nodered" --net=host --restart=always -e TZ="Asia/Taipei" -v /xxxxxx/nodered:/data:rw nodered/node-red:2.1.3-14
  • 開啟Node-Red網頁時(通常是http://IP:1880),節點管理裡面要安裝node-red-contrib-home-assistant-websocket,裝好之後重整網頁,看會不會跳錯誤,如果有錯就要換docker版本了
  • 重整網頁沒跳錯誤後,再從Node-Red左下角的Home-assistant節點選一個拉出來編輯後,設定HA server,Access Token可以在HA網頁左下角藍色按鈕點下去,找到永久有效權杖後創建一個新的即可填入
  • 如果Node-Red跟HA溝通順利,就可以從Home-assistant的節點取得狀態,而不會是空的
6.png
7.png



1.png
2.png
3.png
4.png
5.png

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-27 10:13 , Processed in 0.051249 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表