forked from wicket1001/IoT-Box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pawn.script
151 lines (149 loc) · 4.21 KB
/
pawn.script
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
150
151
//===========
//Wireless Thermometer
//===========
//===
//=== Settings
//===
<table>
//Configuration block 0 should be used
name = config0
//Title of the config. section displayed on the server
title = Configuration
<field>
//Parameter 0 should be used for the transmission interval
name = field0
//Alternative field name that can be used by the REST-API
alias = RecordInterval
//Title of the parameter displayed on the server
title = Record Interval
//Position in config block 0 where the parameter is saved
byteofs = 0
//No decimal places
decpl = 0
//Data type: 32Bit unsigned
type = u32
//Unit to be used to enter the value for the parameter
units = sec
//Lowest valid value for the parameter
min = 1
//Default value is 60 sec.
default = 60
</field>
<field>
//Parameter 1 should be used for the record interval
name = field1
alias = TransmissionInterval
title = Transmission Interval
byteofs = 4
decpl = 0
type = u32
units = min
min = 1
default = 60
//Conversion factor sec.->min. (sec. used internally)
vscale = 0.01666666667
</field>
<field>
//Parameter 2 should be used for the connection type
name = field2
alias = TransmissionMode
title = Transmission Mode
byteofs = 8
decpl = 0
type = u8
default = 0
//Selection options for the dropdown list
editmask = 0=Intervall;1=Wakeup;2=Online
</field>
</table>
//===
//=== Measurement Channels
//===
<split>
//Raw data channel (always "rm2mraw" for the rapidM2M M3 ) from which the data records should be
//copied
source = rm2mraw
//Measurement data channel to which the data record should be copied
target = histdata0
//If the first byte of the data record corresponds to this value, it is copied to the specified
//measurement data channel.
target=histdata1
key = 00
</split>
<table>
//Measurement data channel 0 should be used.
name = histdata0
<field>
//Data field 0 should be used for the battery voltage.
name = ch0
//Alternative field name that can be used by the REST-API
alias = VoltageBattery
//Title of the data field displayed on the server
title = Battery Voltage
//Position in measurement data channel 0 where the data field is saved
//Note: The key for the split tag is located at position "0"
byteofs = 1
//The measurement value should be rounded off to two decimal places.
decpl = 2
//Data type: 16Bit signed
type = s16
//Conversion factor mV->V (V is used internally)
vscale = 0.001
//Measurement value unit displayed on the server
units = V
</field>
<field>
//Data field 1 should be used for the USB charging voltage.
name = ch1
alias = VoltageUSB
title = USB Voltage
byteofs = 3
decpl = 2
type = s16
vscale = 0.001
units = V
</field>
<field>
//Data field 2 should be used for the temperature.
name = ch2
alias = Temperature
title = Temperature
byteofs = 5
decpl = 1
type = s16
vscale = 0.1
units = °C
</field>
<field>
//Data field 3 should be used for the humidity.
name = ch3
alias = Humidity
title = Humidity
byteofs = 7
decpl = 1
type = s16
vscale = 0.1
units = %
</field>
</table>
//===
//=== Measurement Channels
//===
//<split>
// source = rm2mraw
// target = histdata1
// key = 00
//</split>
<table>
name = histdata1
<field>
name = ch0
alias = VoltageBattery
title = Battery Voltage
byteofs = 1
decpl = 2
type = s16
vscale = 0.001
units = V
</field>
</table>