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

 找回密码
 立即注册
楼主: 潇洒哥er

[教程系列] Hassio 插件 Node-red 接入HA的设置

[复制链接]

23

主题

643

帖子

4394

积分

元老级技术达人

积分
4394
金钱
3736
HASS币
30

教程狂人

QQ
发表于 2018-5-18 13:07:34 | 显示全部楼层
huex 发表于 2018-5-18 13:00
我说啥了? 武断什么? 看明白我说什么了么?一开始就说了,Node-red不是为了ha存在的,node-red也是由写 ...

我说武断,你还生气了哈。。node red有一些第三方的节点插件,HA可能没有,HA的第三方插件,在Node red里找不到,这就是优势互补。我可没有批评任何人的使用习惯问题,我也并没有摒弃HA去推崇nodered。工具而已,尽善其用。
回复

使用道具 举报

14

主题

267

帖子

1639

积分

论坛技术达人

积分
1639
金钱
1352
HASS币
40

教程狂人

发表于 2018-5-18 13:12:15 | 显示全部楼层
alei643 发表于 2018-5-18 13:07
我说武断,你还生气了哈。。node red有一些第三方的节点插件,HA可能没有,HA的第三方插件,在Node r ...

你没看明白说的是什么啊, Node-red我也在玩,我都不说什么,只是说一下自动化的话,ha采用的不无道理,开发者又不是傻子,node-red用户玩不玩ha都没关系,一样能用,插件真不要讨论了,先出来的东西优势是必然的
回复

使用道具 举报

12

主题

545

帖子

2035

积分

金牌会员

Rank: 6Rank: 6

积分
2035
金钱
1490
HASS币
0
 楼主| 发表于 2018-5-18 14:08:38 | 显示全部楼层
huex 发表于 2018-5-18 11:37
提供一个给你们看看吧,涉及到一个门磁,一个人体, 一个灯组(由两个小灯组 组成) ,一个主灯,外加光线 ...

牛,大开眼界。
有个自动化的请教一下:
比如我不想在condition那里做条件,而是在执行service那里,用service_template与data_template
假设某state符合我就执行特定的service,否则 就什么都不执行

service_template与data_template那里应该怎么写?
我想了好久一直没办法实现

不想用condition就是因为没必要,那样的话会增加很多不用的代码

一看就知道 huex 是写程序的大佬。
回复

使用道具 举报

14

主题

267

帖子

1639

积分

论坛技术达人

积分
1639
金钱
1352
HASS币
40

教程狂人

发表于 2018-5-18 15:56:09 | 显示全部楼层
潇洒哥er 发表于 2018-5-18 14:08
牛,大开眼界。
有个自动化的请教一下:
比如我不想在condition那里做条件,而是在执行service那里,用se ...

具体看你的trigger是做的什么判断,可以在trigger里做完多重组合判断的绝对不丢到service后面值,不然出来触发后无效action,我基本不用condition,除非实在是trigger templadte都无法排除掉的可能,才做conditon template,
丢实例出来给你分析吧,

回复

使用道具 举报

13

主题

333

帖子

1418

积分

金牌会员

Rank: 6Rank: 6

积分
1418
金钱
1085
HASS币
0
发表于 2018-6-19 17:37:58 | 显示全部楼层
填了这个还是连接不上。不知道哪里出错了
回复

使用道具 举报

8

主题

361

帖子

3757

积分

论坛元老

Rank: 8Rank: 8

积分
3757
金钱
3396
HASS币
10
发表于 2018-6-20 00:19:23 | 显示全部楼层
问什么我的Hassio中安装插件起不来啊,
报错如下,大神帮忙看下
---------------------------------------------------------


                Oops! Something went wrong.





We are so sorry, but something went terribly wrong when


starting or running this add-on.





Be sure to check the log above, line by line, for hints.


-----------------------------------------------------------


[cont-finish.d] 99-message.sh: exited 0.


[cont-finish.d] done.


[s6-finish] syncing disks.


[s6-finish] sending all processes the TERM signal.


[s6-init] making user provided files available at /var/run/s6/etc...exited 0.


[s6-init] ensuring user provided files have correct perms...exited 0.


[fix-attrs.d] applying ownership & permissions fixes...


[fix-attrs.d] done.


[cont-init.d] executing container initialization scripts...


[cont-init.d] 00-banner.sh: executing...




-----------------------------------------------------------


Hass.io Add-on: Node-RED v0.2.0




Flow-based programming for the Internet of Things




From: Community Hass.io Add-ons


By: Franck Nijhof <[email protected]>


-----------------------------------------------------------


[cont-init.d] 00-banner.sh: exited 0.


[cont-init.d] 01-log-level.sh: executing...


Log level is set to INFO


[cont-init.d] 01-log-level.sh: exited 0.


[cont-init.d] 02-updates.sh: executing...




INFO: You are running the latest version of this add-on


[cont-init.d] 02-updates.sh: exited 0.


[cont-init.d] 10-requirements.sh: executing...


FATAL: Setting a credential_secret is REQUIRED!


[cont-init.d] 10-requirements.sh: exited 1.


[cont-finish.d] executing container finish scripts...


[cont-finish.d] 99-message.sh: executing...


-----------------------------------------------------------


                Oops! Something went wrong.





We are so sorry, but something went terribly wrong when


starting or running this add-on.





Be sure to check the log above, line by line, for hints.


-----------------------------------------------------------


[cont-finish.d] 99-message.sh: exited 0.


[cont-finish.d] done.


[s6-finish] syncing disks.


[s6-finish] sending all processes the TERM signal.


      
      
   
回复

使用道具 举报

12

主题

545

帖子

2035

积分

金牌会员

Rank: 6Rank: 6

积分
2035
金钱
1490
HASS币
0
 楼主| 发表于 2018-6-20 10:18:24 | 显示全部楼层
你安装 的官方插件的node-red吧, credential_secret  没设置,随便给它设置一堆字符。保存后重启node-red。试试。
回复

使用道具 举报

8

主题

361

帖子

3757

积分

论坛元老

Rank: 8Rank: 8

积分
3757
金钱
3396
HASS币
10
发表于 2018-6-20 21:02:32 | 显示全部楼层
潇洒哥er 发表于 2018-6-20 10:18
你安装 的官方插件的node-red吧, credential_secret  没设置,随便给它设置一堆字符。保存后重启node-red ...

感谢 可以运行了
回复

使用道具 举报

13

主题

333

帖子

1418

积分

金牌会员

Rank: 6Rank: 6

积分
1418
金钱
1085
HASS币
0
发表于 2018-8-29 19:49:37 | 显示全部楼层
0.76.2 hassio
用addon方式安装了node-red,无论怎么填写都显示404,和16楼一样的错误,填了credential_secret,还是进不去
回复

使用道具 举报

13

主题

333

帖子

1418

积分

金牌会员

Rank: 6Rank: 6

积分
1418
金钱
1085
HASS币
0
发表于 2018-8-29 19:52:39 | 显示全部楼层
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 

-----------------------------------------------------------
 Hass.io Add-on: Node-RED v0.6.1

 Flow-based programming for the Internet of Things

 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email][email protected][/email]>
-----------------------------------------------------------
 armhf / Raspbian GNU/Linux 9 (stretch) / HA 0.76.2 / SU 127 / stable
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 

INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
FATAL: You cannot add users without a username!
[cont-init.d] 10-requirements.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

{
  "log_level": "info",
  "credential_secret": "dkdjekkdjfkKJJKJDDDJjcdjdjd",
  "users": [
    {
      "username": "",
      "password": "",
      "permissions": "*"
    }
  ],
  "http_node": {
    "username": "",
    "password": ""
  },
  "http_static": {
    "username": "",
    "password": ""
  },
  "port": 1880,
  "ssl": true,
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_ssl": true,
  "system_packages": [],
  "npm_packages": [],
  "init_commands": []
}
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-14 01:43 , Processed in 0.075910 second(s), 32 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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