找回密码
 立即注册
楼主: alei643

[教程系列] Node Red 系列教程之一 初识Node Red

 火... [复制链接]

0

主题

13

回帖

142

积分

注册会员

积分
142
金钱
129
HASS币
0
发表于 2024-3-8 10:45:35 | 显示全部楼层
感谢分享  学习了
回复

使用道具 举报

0

主题

19

回帖

128

积分

注册会员

积分
128
金钱
109
HASS币
0
发表于 2024-3-8 12:18:31 | 显示全部楼层
谢谢分享
回复

使用道具 举报

1

主题

18

回帖

138

积分

注册会员

积分
138
金钱
119
HASS币
0
发表于 2024-3-8 15:24:26 | 显示全部楼层
谢谢分享
回复

使用道具 举报

0

主题

4

回帖

70

积分

注册会员

积分
70
金钱
66
HASS币
0
发表于 2024-3-8 15:48:11 | 显示全部楼层
来学习 node red
回复

使用道具 举报

2

主题

38

回帖

175

积分

注册会员

积分
175
金钱
135
HASS币
0
发表于 2024-3-9 17:06:20 | 显示全部楼层
谢谢分享
回复

使用道具 举报

0

主题

76

回帖

669

积分

高级会员

积分
669
金钱
593
HASS币
0
发表于 2024-3-9 20:06:12 | 显示全部楼层
#继电器

output:
  - platform: gpio
    pin:
      number: GPIO1
    id: out1

  - platform: gpio
    pin:
      number: GPIO2
    id: out2

  - platform: gpio
    pin:
      number: GPIO3
    id: out3

  - platform: gpio
    pin:
      number: GPIO20
    id: out4


#灯实体
light:
  - platform: binary
    name: ${device_name}-1
    output: out1
    id: light1

  - platform: binary
    name: ${device_name}-2
    output: out2
    id: light2

  - platform: binary
    name: ${device_name}-3
    output: out3
    id: light3

  - platform: binary
    name: ${device_name}-4
    output: out4
    id: light4

#物理按键
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO5
      mode: INPUT_PULLUP
      inverted: true
    name: bs1
    internal: true
    on_press:
      - light.toggle: light1

  - platform: gpio
    pin:
      number: GPIO7
      mode: INPUT_PULLUP
      inverted: true
    name: bs2
    internal: true
    on_press:
      - light.toggle: light2

  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: true
    name: bs3
    internal: true
    on_press:
      - light.toggle: light3

  - platform: gpio
    pin:
      number: GPIO10
      mode: INPUT_PULLUP
      inverted: true
    name: bs4
    internal: true
    on_press:
      - light.toggle: light4
回复

使用道具 举报

0

主题

1

回帖

46

积分

新手上路

积分
46
金钱
45
HASS币
0
发表于 2024-3-9 22:15:22 | 显示全部楼层
学习学习学习学习学习
回复

使用道具 举报

0

主题

16

回帖

90

积分

注册会员

积分
90
金钱
74
HASS币
0
发表于 2024-3-10 13:50:04 | 显示全部楼层
学习一下
回复

使用道具 举报

1

主题

36

回帖

626

积分

高级会员

积分
626
金钱
589
HASS币
0
发表于 2024-3-10 21:14:37 | 显示全部楼层
我想看看
回复

使用道具 举报

AriY 

0

主题

10

回帖

542

积分

高级会员

积分
542
金钱
532
HASS币
0
发表于 2024-3-10 21:28:12 | 显示全部楼层
学习一下zsbd
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-5-13 03:53 , Processed in 0.176760 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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