forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bridge-serial.xml
148 lines (145 loc) · 5.66 KB
/
bridge-serial.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="modbus"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<bridge-type id="serial">
<label>Modbus Serial Slave</label>
<description>Endpoint for Modbus serial slaves</description>
<config-description>
<parameter name="port" type="text" required="true">
<label>Serial Port</label>
<context>serial-port</context>
<limitToOptions>false</limitToOptions>
<description>Serial port to use, for example /dev/ttyS0 or COM1</description>
</parameter>
<parameter name="id" type="integer">
<label>Id</label>
<description>Slave id. Also known as station address or unit identifier.</description>
<default>1</default>
</parameter>
<!-- serial parameters -->
<parameter name="baud" type="integer" multiple="false">
<label>Baud</label>
<description>Baud of the connection</description>
<default>9600</default>
<options>
<option value="75">75</option>
<option value="110">110</option>
<option value="300">300</option>
<option value="1200">1200</option>
<option value="2400">2400</option>
<option value="4800">4800</option>
<option value="9600">9600</option>
<option value="19200">19200</option>
<option value="38400">38400</option>
<option value="57600">57600</option>
<option value="115200">115200</option>
</options>
</parameter>
<parameter name="stopBits" type="text" multiple="false">
<label>Stop Bits</label>
<description>Stop bits</description>
<default>1.0</default>
<options>
<option value="1.0">1</option>
<option value="1.5">1.5</option>
<option value="2.0">2</option>
</options>
</parameter>
<parameter name="parity" type="text" multiple="false">
<label>Parity</label>
<description>Parity</description>
<default>none</default>
<options>
<option value="none">None</option>
<option value="even">Even</option>
<option value="odd">Odd</option>
</options>
</parameter>
<parameter name="dataBits" type="integer" multiple="false">
<label>Data Bits</label>
<description>Data bits</description>
<default>8</default>
<options>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
</options>
</parameter>
<parameter name="encoding" type="text" multiple="false">
<label>Encoding</label>
<description>Encoding</description>
<default>rtu</default>
<options>
<option value="ascii">ASCII</option>
<option value="rtu">RTU</option>
<option value="bin">BIN</option>
</options>
</parameter>
<parameter name="enableDiscovery" type="boolean">
<label>Discovery Enabled</label>
<description>When enabled we try to find a device specific handler. Turn this on if you're using one of the
supported devices.</description>
<default>false</default>
</parameter>
<parameter name="echo" type="boolean">
<label>RS485 Echo Mode</label>
<description><![CDATA[Flag for setting the RS485 echo mode
<br/>
<br/>This controls whether we should try to read back whatever we send on the line, before reading the response.
]]></description>
<default>false</default>
<advanced>true</advanced>
</parameter>
<parameter name="receiveTimeoutMillis" type="integer" min="0" unit="ms">
<label>Read Operation Timeout</label>
<description>Timeout for read operations. In milliseconds.</description>
<default>1500</default>
<advanced>true</advanced>
</parameter>
<parameter name="flowControlIn" type="text" multiple="false">
<label>Flow Control In</label>
<description>Type of flow control for receiving</description>
<default>none</default>
<!-- values here match SerialPort.FLOWCONTROL_* constants -->
<options>
<option value="none">None</option>
<option value="xon/xoff in">XON/XOFF</option>
<option value="rts/cts in">RTS/CTS</option>
</options>
</parameter>
<parameter name="flowControlOut" type="text" multiple="false">
<label>Flow Control Out</label>
<description>Type of flow control for sending</description>
<default>none</default>
<!-- values here match SerialPort.FLOWCONTROL_* constants -->
<options>
<option value="none">None</option>
<option value="xon/xoff out">XON/XOFF</option>
<option value="rts/cts out">RTS/CTS</option>
</options>
</parameter>
<!-- connection handling -->
<parameter name="timeBetweenTransactionsMillis" type="integer" min="0" unit="ms">
<label>Time Between Transactions</label>
<description>How long to delay we must have at minimum between two consecutive MODBUS transactions. In milliseconds.</description>
<default>35</default>
</parameter>
<parameter name="connectMaxTries" type="integer" min="1">
<label>Maximum Connection Tries</label>
<description>How many times we try to establish the connection. Should be at least 1.</description>
<default>1</default>
<advanced>true</advanced>
</parameter>
<parameter name="connectTimeoutMillis" type="integer" min="0" unit="ms">
<label>Timeout for Establishing the Connection</label>
<description>The maximum time that is waited when establishing the connection. Value of zero means that system/OS
default is respected. In milliseconds.</description>
<default>10000</default>
<advanced>true</advanced>
</parameter>
</config-description>
</bridge-type>
</thing:thing-descriptions>