-
Notifications
You must be signed in to change notification settings - Fork 1
/
waveshare-relay.json
149 lines (149 loc) · 6.28 KB
/
waveshare-relay.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
{
"set": {
"modbus-binding.so": {
"metadata": {
"uid": "modbus",
"version": "1.0",
"api": "modbus",
"info": "Generic Waveshare 8ch relay test config"
},
"reference": "https://www.waveshare.com/wiki/Modbus_RTU_Relay",
"modbus": {
"uid": "Waveshare-Relay",
"info": "8 channels relay module",
"uri": "tty://dev/ttyUSB1:9600",
"prefix": "WS8RL",
"slaveid": 1,
"timeout": 250,
"autostart": 1,
"privilege": "global privilege",
"period_s": 1,
"sensors": [
{
"uid": "RELAY_0",
"info": "Control first relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 0,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_1",
"info": "Control second relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 1,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_2",
"info": "Control third relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 2,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_3",
"info": "Control fourth relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 3,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_4",
"info": "Control fifth relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 4,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_5",
"info": "Control sixth relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 5,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_6",
"info": "Control seventh relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 6,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_7",
"info": "Control eighth relay",
"type": "COIL_HOLDING",
"format" : "INT16",
"register": 7,
"usage": {"action": ["write"], "data": "json_integer"},
"sample": [
{"action": "write", "data": 65280},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_ALL",
"info": "Control all relays",
"type": "COIL_HOLDING",
"format": "UINT16",
"register": 255,
"usage": {"action": ["write"], "data": "json_type_boolean"},
"sample": [
{"action": "write", "data": 1},
{"action": "write", "data": 0}
]
},
{
"uid": "RELAY_STATE",
"info": "Read states of relays",
"type": "COIL_HOLDING",
"format": "BOOL",
"register": 0,
"count": 8,
"usage": {
"action": ["read", "subscribe", "unsubscribe", "write"],
"data": ["json_boolean", "json_boolean", "json_boolean", "json_boolean", "json_boolean", "json_boolean", "json_boolean", "json_boolean"]
},
"sample": [
{"action": "write", "data": [true, false, true, false, true, false, true, false]}
]
}
]
}
}
}
}