@ya-modbus/driver-or-we-516 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +203 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +801 -0
- package/dist/index.js.map +1 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# @ya-modbus/driver-or-we-516
|
|
2
|
+
|
|
3
|
+
ORNO OR-WE-516 3-Phase Energy Meter driver for ya-modbus.
|
|
4
|
+
|
|
5
|
+
## Device Information
|
|
6
|
+
|
|
7
|
+
- **Manufacturer**: ORNO
|
|
8
|
+
- **Model**: OR-WE-516
|
|
9
|
+
- **Type**: 3-Phase Energy Meter with RS-485, 80A, MID
|
|
10
|
+
- **Communication**: Modbus RTU
|
|
11
|
+
- **Default Settings**:
|
|
12
|
+
- Address: 1
|
|
13
|
+
- Baud rate: 9600
|
|
14
|
+
- Parity: Odd
|
|
15
|
+
- Stop bits: 1
|
|
16
|
+
- Data bits: 8
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @ya-modbus/driver-or-we-516
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
import { createDriver } from '@ya-modbus/driver-or-we-516'
|
|
28
|
+
import { ModbusRTU } from '@ya-modbus/transport-rtu'
|
|
29
|
+
|
|
30
|
+
// Create transport
|
|
31
|
+
const transport = new ModbusRTU({
|
|
32
|
+
path: '/dev/ttyUSB0',
|
|
33
|
+
baudRate: 9600,
|
|
34
|
+
parity: 'odd',
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
// Create driver
|
|
38
|
+
const driver = await createDriver({
|
|
39
|
+
transport,
|
|
40
|
+
slaveId: 1,
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
// Read voltages and frequency
|
|
44
|
+
const values = await driver.readDataPoints(['voltage_l1', 'voltage_l2', 'voltage_l3', 'frequency'])
|
|
45
|
+
console.log(values)
|
|
46
|
+
// { voltage_l1: 230.5, voltage_l2: 231.2, voltage_l3: 229.8, frequency: 50.01 }
|
|
47
|
+
|
|
48
|
+
// Read total active energy
|
|
49
|
+
const energy = await driver.readDataPoint('active_energy_total')
|
|
50
|
+
console.log(`Total energy: ${energy} kWh`)
|
|
51
|
+
|
|
52
|
+
// Read all power values
|
|
53
|
+
const power = await driver.readDataPoints([
|
|
54
|
+
'active_power_total',
|
|
55
|
+
'reactive_power_total',
|
|
56
|
+
'apparent_power_total',
|
|
57
|
+
'power_factor_total',
|
|
58
|
+
])
|
|
59
|
+
console.log(power)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Using Default Configuration
|
|
63
|
+
|
|
64
|
+
The driver exports a `DEFAULT_CONFIG` constant with factory-default device settings:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { createDriver, DEFAULT_CONFIG } from '@ya-modbus/driver-or-we-516'
|
|
68
|
+
import { ModbusRTU } from '@ya-modbus/transport-rtu'
|
|
69
|
+
|
|
70
|
+
// Use default configuration for connecting to factory-default device
|
|
71
|
+
const transport = new ModbusRTU({
|
|
72
|
+
path: '/dev/ttyUSB0',
|
|
73
|
+
baudRate: DEFAULT_CONFIG.baudRate, // 9600
|
|
74
|
+
parity: DEFAULT_CONFIG.parity, // 'odd'
|
|
75
|
+
dataBits: DEFAULT_CONFIG.dataBits, // 8
|
|
76
|
+
stopBits: DEFAULT_CONFIG.stopBits, // 1
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
const driver = await createDriver({
|
|
80
|
+
transport,
|
|
81
|
+
slaveId: DEFAULT_CONFIG.defaultAddress, // 1
|
|
82
|
+
})
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Data Points
|
|
86
|
+
|
|
87
|
+
### Device Information
|
|
88
|
+
|
|
89
|
+
| ID | Name | Type | Access | Description |
|
|
90
|
+
| ------------------ | ---------------- | ------- | ---------- | ------------------------------------- |
|
|
91
|
+
| `serial_number` | Serial Number | integer | Read-only | Device serial number (32-bit) |
|
|
92
|
+
| `device_address` | Device Address | integer | Read-write | Modbus address (1-247) |
|
|
93
|
+
| `baud_rate` | Baud Rate | enum | Read-write | Baud rate (1200, 2400, 4800, 9600) |
|
|
94
|
+
| `software_version` | Software Version | float | Read-only | Firmware version |
|
|
95
|
+
| `hardware_version` | Hardware Version | float | Read-only | Hardware revision |
|
|
96
|
+
| `ct_rate` | CT Rate | integer | Read-only | Current transformer ratio |
|
|
97
|
+
| `s0_output_rate` | S0 Output Rate | float | Read-write | S0 pulse output rate (imp/kWh) |
|
|
98
|
+
| `cycle_time` | Cycle Time | integer | Read-write | Measurement cycle time (0-65535) |
|
|
99
|
+
| `combined_code` | Combined Code | integer | Read-write | Bidirectional energy calculation mode |
|
|
100
|
+
|
|
101
|
+
### Real-time Measurements
|
|
102
|
+
|
|
103
|
+
| ID | Name | Type | Unit | Access | Description |
|
|
104
|
+
| ---------------------- | -------------------- | ----- | ---- | --------- | ---------------------------- |
|
|
105
|
+
| `voltage_l1` | L1 Voltage | float | V | Read-only | Phase L1 voltage |
|
|
106
|
+
| `voltage_l2` | L2 Voltage | float | V | Read-only | Phase L2 voltage |
|
|
107
|
+
| `voltage_l3` | L3 Voltage | float | V | Read-only | Phase L3 voltage |
|
|
108
|
+
| `frequency` | Grid Frequency | float | Hz | Read-only | Grid frequency |
|
|
109
|
+
| `current_l1` | L1 Current | float | A | Read-only | Phase L1 current |
|
|
110
|
+
| `current_l2` | L2 Current | float | A | Read-only | Phase L2 current |
|
|
111
|
+
| `current_l3` | L3 Current | float | A | Read-only | Phase L3 current |
|
|
112
|
+
| `active_power_total` | Total Active Power | float | kW | Read-only | Total active power |
|
|
113
|
+
| `active_power_l1` | L1 Active Power | float | kW | Read-only | Phase L1 active power |
|
|
114
|
+
| `active_power_l2` | L2 Active Power | float | kW | Read-only | Phase L2 active power |
|
|
115
|
+
| `active_power_l3` | L3 Active Power | float | kW | Read-only | Phase L3 active power |
|
|
116
|
+
| `reactive_power_total` | Total Reactive Power | float | kVAr | Read-only | Total reactive power |
|
|
117
|
+
| `reactive_power_l1` | L1 Reactive Power | float | kVAr | Read-only | Phase L1 reactive power |
|
|
118
|
+
| `reactive_power_l2` | L2 Reactive Power | float | kVAr | Read-only | Phase L2 reactive power |
|
|
119
|
+
| `reactive_power_l3` | L3 Reactive Power | float | kVAr | Read-only | Phase L3 reactive power |
|
|
120
|
+
| `apparent_power_total` | Total Apparent Power | float | kVA | Read-only | Total apparent power |
|
|
121
|
+
| `apparent_power_l1` | L1 Apparent Power | float | kVA | Read-only | Phase L1 apparent power |
|
|
122
|
+
| `apparent_power_l2` | L2 Apparent Power | float | kVA | Read-only | Phase L2 apparent power |
|
|
123
|
+
| `apparent_power_l3` | L3 Apparent Power | float | kVA | Read-only | Phase L3 apparent power |
|
|
124
|
+
| `power_factor_total` | Total Power Factor | float | - | Read-only | Total power factor (-1 to 1) |
|
|
125
|
+
| `power_factor_l1` | L1 Power Factor | float | - | Read-only | Phase L1 power factor |
|
|
126
|
+
| `power_factor_l2` | L2 Power Factor | float | - | Read-only | Phase L2 power factor |
|
|
127
|
+
| `power_factor_l3` | L3 Power Factor | float | - | Read-only | Phase L3 power factor |
|
|
128
|
+
|
|
129
|
+
### Energy Counters
|
|
130
|
+
|
|
131
|
+
| ID | Name | Type | Unit | Access | Description |
|
|
132
|
+
| ---------------------------- | -------------------------- | ----- | ----- | --------- | ------------------------ |
|
|
133
|
+
| `active_energy_total` | Total Active Energy | float | kWh | Read-only | Total active energy |
|
|
134
|
+
| `active_energy_l1` | L1 Total Active Energy | float | kWh | Read-only | Phase L1 active energy |
|
|
135
|
+
| `active_energy_l2` | L2 Total Active Energy | float | kWh | Read-only | Phase L2 active energy |
|
|
136
|
+
| `active_energy_l3` | L3 Total Active Energy | float | kWh | Read-only | Phase L3 active energy |
|
|
137
|
+
| `active_energy_forward` | Forward Active Energy | float | kWh | Read-only | Forward (import) active |
|
|
138
|
+
| `active_energy_forward_l1` | L1 Forward Active Energy | float | kWh | Read-only | L1 forward active |
|
|
139
|
+
| `active_energy_forward_l2` | L2 Forward Active Energy | float | kWh | Read-only | L2 forward active |
|
|
140
|
+
| `active_energy_forward_l3` | L3 Forward Active Energy | float | kWh | Read-only | L3 forward active |
|
|
141
|
+
| `active_energy_reverse` | Reverse Active Energy | float | kWh | Read-only | Reverse (export) active |
|
|
142
|
+
| `active_energy_reverse_l1` | L1 Reverse Active Energy | float | kWh | Read-only | L1 reverse active |
|
|
143
|
+
| `active_energy_reverse_l2` | L2 Reverse Active Energy | float | kWh | Read-only | L2 reverse active |
|
|
144
|
+
| `active_energy_reverse_l3` | L3 Reverse Active Energy | float | kWh | Read-only | L3 reverse active |
|
|
145
|
+
| `reactive_energy_total` | Total Reactive Energy | float | kVArh | Read-only | Total reactive energy |
|
|
146
|
+
| `reactive_energy_l1` | L1 Reactive Energy | float | kVArh | Read-only | Phase L1 reactive energy |
|
|
147
|
+
| `reactive_energy_l2` | L2 Reactive Energy | float | kVArh | Read-only | Phase L2 reactive energy |
|
|
148
|
+
| `reactive_energy_l3` | L3 Reactive Energy | float | kVArh | Read-only | Phase L3 reactive energy |
|
|
149
|
+
| `reactive_energy_forward` | Forward Reactive Energy | float | kVArh | Read-only | Forward reactive energy |
|
|
150
|
+
| `reactive_energy_forward_l1` | L1 Forward Reactive Energy | float | kVArh | Read-only | L1 forward reactive |
|
|
151
|
+
| `reactive_energy_forward_l2` | L2 Forward Reactive Energy | float | kVArh | Read-only | L2 forward reactive |
|
|
152
|
+
| `reactive_energy_forward_l3` | L3 Forward Reactive Energy | float | kVArh | Read-only | L3 forward reactive |
|
|
153
|
+
| `reactive_energy_reverse` | Reverse Reactive Energy | float | kVArh | Read-only | Reverse reactive energy |
|
|
154
|
+
| `reactive_energy_reverse_l1` | L1 Reverse Reactive Energy | float | kVArh | Read-only | L1 reverse reactive |
|
|
155
|
+
| `reactive_energy_reverse_l2` | L2 Reverse Reactive Energy | float | kVArh | Read-only | L2 reverse reactive |
|
|
156
|
+
| `reactive_energy_reverse_l3` | L3 Reverse Reactive Energy | float | kVArh | Read-only | L3 reverse reactive |
|
|
157
|
+
|
|
158
|
+
## Register Mapping
|
|
159
|
+
|
|
160
|
+
| Range | Registers | Type | Description |
|
|
161
|
+
| ------------- | ---------- | ------- | ------------------------------ |
|
|
162
|
+
| 0x0000-0x003B | 60 (120 B) | Holding | Device info + real-time values |
|
|
163
|
+
| 0x0042 | 1 (2 B) | Holding | Combined code (config) |
|
|
164
|
+
| 0x0100-0x012F | 48 (96 B) | Holding | Energy counters |
|
|
165
|
+
|
|
166
|
+
All float values are IEEE 754 single-precision (32-bit) big-endian.
|
|
167
|
+
|
|
168
|
+
## Configuration
|
|
169
|
+
|
|
170
|
+
### Change Device Address
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
// Change address from 1 to 5
|
|
174
|
+
await driver.writeDataPoint('device_address', 5)
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Change Baud Rate
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
// Set baud rate to 4800
|
|
181
|
+
await driver.writeDataPoint('baud_rate', 4800)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Configure S0 Pulse Output
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
// Set S0 output rate (impulses per kWh)
|
|
188
|
+
await driver.writeDataPoint('s0_output_rate', 1000.0)
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Configure Combined Code (Bidirectional Mode)
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
// Read current combined code setting
|
|
195
|
+
const mode = await driver.readDataPoint('combined_code')
|
|
196
|
+
|
|
197
|
+
// Set combined code for bidirectional energy calculation
|
|
198
|
+
await driver.writeDataPoint('combined_code', 5)
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
GPL-3.0-or-later
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ORNO OR-WE-516 3-Phase Energy Meter Driver
|
|
3
|
+
*
|
|
4
|
+
* 3-phase energy meter with RS-485, 80A, MID, 3 modules, DIN TH-35mm
|
|
5
|
+
* https://orno.pl/en/product/1086/3-phase-energy-meter-with-rs-485-80a-mid-3-modules-din-th-35mm
|
|
6
|
+
*
|
|
7
|
+
* Factory default specifications are exported via the DEFAULT_CONFIG constant.
|
|
8
|
+
* See DEFAULT_CONFIG for baud rate, parity, data bits, stop bits, and default address.
|
|
9
|
+
*
|
|
10
|
+
* Register mapping:
|
|
11
|
+
* - Holding registers 0x0000-0x003B: Device info and real-time measurements
|
|
12
|
+
* - Holding registers 0x0100-0x012F: Energy counters
|
|
13
|
+
* - All float values are IEEE 754 single-precision (32-bit)
|
|
14
|
+
*/
|
|
15
|
+
import type { CreateDriverFunction } from '@ya-modbus/driver-types';
|
|
16
|
+
/**
|
|
17
|
+
* Supported configuration values for OR-WE-516
|
|
18
|
+
*
|
|
19
|
+
* The device supports:
|
|
20
|
+
* - Baud rates: 1200, 2400, 4800, 9600 bps
|
|
21
|
+
* - Parity: odd
|
|
22
|
+
* - Data bits: 8 only
|
|
23
|
+
* - Stop bits: 1 only
|
|
24
|
+
* - Slave address: 1-247 (standard Modbus range)
|
|
25
|
+
*
|
|
26
|
+
* See DEFAULT_CONFIG for factory defaults.
|
|
27
|
+
*/
|
|
28
|
+
export declare const SUPPORTED_CONFIG: {
|
|
29
|
+
readonly validBaudRates: readonly [1200, 2400, 4800, 9600];
|
|
30
|
+
readonly validParity: readonly ["odd"];
|
|
31
|
+
readonly validDataBits: readonly [8];
|
|
32
|
+
readonly validStopBits: readonly [1];
|
|
33
|
+
readonly validAddressRange: readonly [1, 247];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Default OR-WE-516 device configuration
|
|
37
|
+
*
|
|
38
|
+
* Use these values when connecting to a factory-default OR-WE-516 device.
|
|
39
|
+
* These are the settings the device ships with from the manufacturer.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DEFAULT_CONFIG: {
|
|
42
|
+
readonly baudRate: 9600;
|
|
43
|
+
readonly parity: "odd";
|
|
44
|
+
readonly dataBits: 8;
|
|
45
|
+
readonly stopBits: 1;
|
|
46
|
+
readonly defaultAddress: 1;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Create OR-WE-516 device driver
|
|
50
|
+
*/
|
|
51
|
+
export declare const createDriver: CreateDriverFunction;
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAWH,OAAO,KAAK,EAGV,oBAAoB,EAIrB,MAAM,yBAAyB,CAAA;AAEhC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB;;;;;;CAMa,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,cAAc;;;;;;CAMa,CAAA;AAupBxC;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,oBA+H1B,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,801 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ORNO OR-WE-516 3-Phase Energy Meter Driver
|
|
4
|
+
*
|
|
5
|
+
* 3-phase energy meter with RS-485, 80A, MID, 3 modules, DIN TH-35mm
|
|
6
|
+
* https://orno.pl/en/product/1086/3-phase-energy-meter-with-rs-485-80a-mid-3-modules-din-th-35mm
|
|
7
|
+
*
|
|
8
|
+
* Factory default specifications are exported via the DEFAULT_CONFIG constant.
|
|
9
|
+
* See DEFAULT_CONFIG for baud rate, parity, data bits, stop bits, and default address.
|
|
10
|
+
*
|
|
11
|
+
* Register mapping:
|
|
12
|
+
* - Holding registers 0x0000-0x003B: Device info and real-time measurements
|
|
13
|
+
* - Holding registers 0x0100-0x012F: Energy counters
|
|
14
|
+
* - All float values are IEEE 754 single-precision (32-bit)
|
|
15
|
+
*/
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.createDriver = exports.DEFAULT_CONFIG = exports.SUPPORTED_CONFIG = void 0;
|
|
18
|
+
const driver_sdk_1 = require("@ya-modbus/driver-sdk");
|
|
19
|
+
/**
|
|
20
|
+
* Supported configuration values for OR-WE-516
|
|
21
|
+
*
|
|
22
|
+
* The device supports:
|
|
23
|
+
* - Baud rates: 1200, 2400, 4800, 9600 bps
|
|
24
|
+
* - Parity: odd
|
|
25
|
+
* - Data bits: 8 only
|
|
26
|
+
* - Stop bits: 1 only
|
|
27
|
+
* - Slave address: 1-247 (standard Modbus range)
|
|
28
|
+
*
|
|
29
|
+
* See DEFAULT_CONFIG for factory defaults.
|
|
30
|
+
*/
|
|
31
|
+
exports.SUPPORTED_CONFIG = {
|
|
32
|
+
validBaudRates: [1200, 2400, 4800, 9600],
|
|
33
|
+
validParity: ['odd'],
|
|
34
|
+
validDataBits: [8],
|
|
35
|
+
validStopBits: [1],
|
|
36
|
+
validAddressRange: [1, 247],
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Default OR-WE-516 device configuration
|
|
40
|
+
*
|
|
41
|
+
* Use these values when connecting to a factory-default OR-WE-516 device.
|
|
42
|
+
* These are the settings the device ships with from the manufacturer.
|
|
43
|
+
*/
|
|
44
|
+
exports.DEFAULT_CONFIG = {
|
|
45
|
+
baudRate: 9600,
|
|
46
|
+
parity: 'odd',
|
|
47
|
+
dataBits: 8,
|
|
48
|
+
stopBits: 1,
|
|
49
|
+
defaultAddress: 1,
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Validators for writable data points
|
|
53
|
+
*/
|
|
54
|
+
const isValidBaudRate = (0, driver_sdk_1.createEnumValidator)(exports.SUPPORTED_CONFIG.validBaudRates);
|
|
55
|
+
const isValidAddress = (0, driver_sdk_1.createRangeValidator)(...exports.SUPPORTED_CONFIG.validAddressRange);
|
|
56
|
+
const isValidCycleTime = (0, driver_sdk_1.createRangeValidator)(0, 65535);
|
|
57
|
+
/**
|
|
58
|
+
* Data point definitions for OR-WE-516
|
|
59
|
+
*/
|
|
60
|
+
const DATA_POINTS = [
|
|
61
|
+
// Device info
|
|
62
|
+
{
|
|
63
|
+
id: 'serial_number',
|
|
64
|
+
name: 'Serial Number',
|
|
65
|
+
type: 'integer',
|
|
66
|
+
access: 'r',
|
|
67
|
+
pollType: 'static',
|
|
68
|
+
description: 'Device serial number',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'device_address',
|
|
72
|
+
name: 'Device Address',
|
|
73
|
+
type: 'integer',
|
|
74
|
+
access: 'rw',
|
|
75
|
+
pollType: 'on-demand',
|
|
76
|
+
description: 'Modbus device address (1-247)',
|
|
77
|
+
min: 1,
|
|
78
|
+
max: 247,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'baud_rate',
|
|
82
|
+
name: 'Baud Rate',
|
|
83
|
+
type: 'enum',
|
|
84
|
+
access: 'rw',
|
|
85
|
+
pollType: 'on-demand',
|
|
86
|
+
description: 'Serial communication baud rate',
|
|
87
|
+
enumValues: {
|
|
88
|
+
1200: '1200 bps',
|
|
89
|
+
2400: '2400 bps',
|
|
90
|
+
4800: '4800 bps',
|
|
91
|
+
9600: '9600 bps',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 'software_version',
|
|
96
|
+
name: 'Software Version',
|
|
97
|
+
type: 'float',
|
|
98
|
+
access: 'r',
|
|
99
|
+
pollType: 'static',
|
|
100
|
+
description: 'Firmware software version',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'hardware_version',
|
|
104
|
+
name: 'Hardware Version',
|
|
105
|
+
type: 'float',
|
|
106
|
+
access: 'r',
|
|
107
|
+
pollType: 'static',
|
|
108
|
+
description: 'Hardware version',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: 'ct_rate',
|
|
112
|
+
name: 'CT Rate',
|
|
113
|
+
type: 'integer',
|
|
114
|
+
access: 'r',
|
|
115
|
+
pollType: 'static',
|
|
116
|
+
description: 'Current transformer ratio',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
id: 's0_output_rate',
|
|
120
|
+
name: 'S0 Output Rate',
|
|
121
|
+
type: 'float',
|
|
122
|
+
access: 'rw',
|
|
123
|
+
pollType: 'on-demand',
|
|
124
|
+
description: 'S0 pulse output rate',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: 'cycle_time',
|
|
128
|
+
name: 'Cycle Time',
|
|
129
|
+
type: 'integer',
|
|
130
|
+
access: 'rw',
|
|
131
|
+
pollType: 'on-demand',
|
|
132
|
+
description: 'Measurement cycle time',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'combined_code',
|
|
136
|
+
name: 'Combined Code',
|
|
137
|
+
type: 'integer',
|
|
138
|
+
access: 'rw',
|
|
139
|
+
pollType: 'on-demand',
|
|
140
|
+
description: 'Synthesis code for bidirectional energy calculation mode',
|
|
141
|
+
},
|
|
142
|
+
// Voltage measurements
|
|
143
|
+
{
|
|
144
|
+
id: 'voltage_l1',
|
|
145
|
+
name: 'L1 Voltage',
|
|
146
|
+
type: 'float',
|
|
147
|
+
unit: 'V',
|
|
148
|
+
access: 'r',
|
|
149
|
+
description: 'Phase L1 voltage',
|
|
150
|
+
decimals: 1,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: 'voltage_l2',
|
|
154
|
+
name: 'L2 Voltage',
|
|
155
|
+
type: 'float',
|
|
156
|
+
unit: 'V',
|
|
157
|
+
access: 'r',
|
|
158
|
+
description: 'Phase L2 voltage',
|
|
159
|
+
decimals: 1,
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
id: 'voltage_l3',
|
|
163
|
+
name: 'L3 Voltage',
|
|
164
|
+
type: 'float',
|
|
165
|
+
unit: 'V',
|
|
166
|
+
access: 'r',
|
|
167
|
+
description: 'Phase L3 voltage',
|
|
168
|
+
decimals: 1,
|
|
169
|
+
},
|
|
170
|
+
// Frequency
|
|
171
|
+
{
|
|
172
|
+
id: 'frequency',
|
|
173
|
+
name: 'Grid Frequency',
|
|
174
|
+
type: 'float',
|
|
175
|
+
unit: 'Hz',
|
|
176
|
+
access: 'r',
|
|
177
|
+
description: 'Grid frequency',
|
|
178
|
+
decimals: 2,
|
|
179
|
+
},
|
|
180
|
+
// Current measurements
|
|
181
|
+
{
|
|
182
|
+
id: 'current_l1',
|
|
183
|
+
name: 'L1 Current',
|
|
184
|
+
type: 'float',
|
|
185
|
+
unit: 'A',
|
|
186
|
+
access: 'r',
|
|
187
|
+
description: 'Phase L1 current',
|
|
188
|
+
decimals: 3,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: 'current_l2',
|
|
192
|
+
name: 'L2 Current',
|
|
193
|
+
type: 'float',
|
|
194
|
+
unit: 'A',
|
|
195
|
+
access: 'r',
|
|
196
|
+
description: 'Phase L2 current',
|
|
197
|
+
decimals: 3,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: 'current_l3',
|
|
201
|
+
name: 'L3 Current',
|
|
202
|
+
type: 'float',
|
|
203
|
+
unit: 'A',
|
|
204
|
+
access: 'r',
|
|
205
|
+
description: 'Phase L3 current',
|
|
206
|
+
decimals: 3,
|
|
207
|
+
},
|
|
208
|
+
// Active power
|
|
209
|
+
{
|
|
210
|
+
id: 'active_power_total',
|
|
211
|
+
name: 'Total Active Power',
|
|
212
|
+
type: 'float',
|
|
213
|
+
unit: 'kW',
|
|
214
|
+
access: 'r',
|
|
215
|
+
description: 'Total active power (all phases)',
|
|
216
|
+
decimals: 3,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: 'active_power_l1',
|
|
220
|
+
name: 'L1 Active Power',
|
|
221
|
+
type: 'float',
|
|
222
|
+
unit: 'kW',
|
|
223
|
+
access: 'r',
|
|
224
|
+
description: 'Phase L1 active power',
|
|
225
|
+
decimals: 3,
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
id: 'active_power_l2',
|
|
229
|
+
name: 'L2 Active Power',
|
|
230
|
+
type: 'float',
|
|
231
|
+
unit: 'kW',
|
|
232
|
+
access: 'r',
|
|
233
|
+
description: 'Phase L2 active power',
|
|
234
|
+
decimals: 3,
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: 'active_power_l3',
|
|
238
|
+
name: 'L3 Active Power',
|
|
239
|
+
type: 'float',
|
|
240
|
+
unit: 'kW',
|
|
241
|
+
access: 'r',
|
|
242
|
+
description: 'Phase L3 active power',
|
|
243
|
+
decimals: 3,
|
|
244
|
+
},
|
|
245
|
+
// Reactive power
|
|
246
|
+
{
|
|
247
|
+
id: 'reactive_power_total',
|
|
248
|
+
name: 'Total Reactive Power',
|
|
249
|
+
type: 'float',
|
|
250
|
+
unit: 'kVAr',
|
|
251
|
+
access: 'r',
|
|
252
|
+
description: 'Total reactive power (all phases)',
|
|
253
|
+
decimals: 3,
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
id: 'reactive_power_l1',
|
|
257
|
+
name: 'L1 Reactive Power',
|
|
258
|
+
type: 'float',
|
|
259
|
+
unit: 'kVAr',
|
|
260
|
+
access: 'r',
|
|
261
|
+
description: 'Phase L1 reactive power',
|
|
262
|
+
decimals: 3,
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
id: 'reactive_power_l2',
|
|
266
|
+
name: 'L2 Reactive Power',
|
|
267
|
+
type: 'float',
|
|
268
|
+
unit: 'kVAr',
|
|
269
|
+
access: 'r',
|
|
270
|
+
description: 'Phase L2 reactive power',
|
|
271
|
+
decimals: 3,
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
id: 'reactive_power_l3',
|
|
275
|
+
name: 'L3 Reactive Power',
|
|
276
|
+
type: 'float',
|
|
277
|
+
unit: 'kVAr',
|
|
278
|
+
access: 'r',
|
|
279
|
+
description: 'Phase L3 reactive power',
|
|
280
|
+
decimals: 3,
|
|
281
|
+
},
|
|
282
|
+
// Apparent power
|
|
283
|
+
{
|
|
284
|
+
id: 'apparent_power_total',
|
|
285
|
+
name: 'Total Apparent Power',
|
|
286
|
+
type: 'float',
|
|
287
|
+
unit: 'kVA',
|
|
288
|
+
access: 'r',
|
|
289
|
+
description: 'Total apparent power (all phases)',
|
|
290
|
+
decimals: 3,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
id: 'apparent_power_l1',
|
|
294
|
+
name: 'L1 Apparent Power',
|
|
295
|
+
type: 'float',
|
|
296
|
+
unit: 'kVA',
|
|
297
|
+
access: 'r',
|
|
298
|
+
description: 'Phase L1 apparent power',
|
|
299
|
+
decimals: 3,
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: 'apparent_power_l2',
|
|
303
|
+
name: 'L2 Apparent Power',
|
|
304
|
+
type: 'float',
|
|
305
|
+
unit: 'kVA',
|
|
306
|
+
access: 'r',
|
|
307
|
+
description: 'Phase L2 apparent power',
|
|
308
|
+
decimals: 3,
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
id: 'apparent_power_l3',
|
|
312
|
+
name: 'L3 Apparent Power',
|
|
313
|
+
type: 'float',
|
|
314
|
+
unit: 'kVA',
|
|
315
|
+
access: 'r',
|
|
316
|
+
description: 'Phase L3 apparent power',
|
|
317
|
+
decimals: 3,
|
|
318
|
+
},
|
|
319
|
+
// Power factor
|
|
320
|
+
{
|
|
321
|
+
id: 'power_factor_total',
|
|
322
|
+
name: 'Total Power Factor',
|
|
323
|
+
type: 'float',
|
|
324
|
+
access: 'r',
|
|
325
|
+
description: 'Total power factor (all phases)',
|
|
326
|
+
decimals: 3,
|
|
327
|
+
min: -1,
|
|
328
|
+
max: 1,
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
id: 'power_factor_l1',
|
|
332
|
+
name: 'L1 Power Factor',
|
|
333
|
+
type: 'float',
|
|
334
|
+
access: 'r',
|
|
335
|
+
description: 'Phase L1 power factor',
|
|
336
|
+
decimals: 3,
|
|
337
|
+
min: -1,
|
|
338
|
+
max: 1,
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: 'power_factor_l2',
|
|
342
|
+
name: 'L2 Power Factor',
|
|
343
|
+
type: 'float',
|
|
344
|
+
access: 'r',
|
|
345
|
+
description: 'Phase L2 power factor',
|
|
346
|
+
decimals: 3,
|
|
347
|
+
min: -1,
|
|
348
|
+
max: 1,
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
id: 'power_factor_l3',
|
|
352
|
+
name: 'L3 Power Factor',
|
|
353
|
+
type: 'float',
|
|
354
|
+
access: 'r',
|
|
355
|
+
description: 'Phase L3 power factor',
|
|
356
|
+
decimals: 3,
|
|
357
|
+
min: -1,
|
|
358
|
+
max: 1,
|
|
359
|
+
},
|
|
360
|
+
// Active energy
|
|
361
|
+
{
|
|
362
|
+
id: 'active_energy_total',
|
|
363
|
+
name: 'Total Active Energy',
|
|
364
|
+
type: 'float',
|
|
365
|
+
unit: 'kWh',
|
|
366
|
+
access: 'r',
|
|
367
|
+
description: 'Total active energy (all phases)',
|
|
368
|
+
decimals: 2,
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
id: 'active_energy_l1',
|
|
372
|
+
name: 'L1 Total Active Energy',
|
|
373
|
+
type: 'float',
|
|
374
|
+
unit: 'kWh',
|
|
375
|
+
access: 'r',
|
|
376
|
+
description: 'Phase L1 total active energy',
|
|
377
|
+
decimals: 2,
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
id: 'active_energy_l2',
|
|
381
|
+
name: 'L2 Total Active Energy',
|
|
382
|
+
type: 'float',
|
|
383
|
+
unit: 'kWh',
|
|
384
|
+
access: 'r',
|
|
385
|
+
description: 'Phase L2 total active energy',
|
|
386
|
+
decimals: 2,
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
id: 'active_energy_l3',
|
|
390
|
+
name: 'L3 Total Active Energy',
|
|
391
|
+
type: 'float',
|
|
392
|
+
unit: 'kWh',
|
|
393
|
+
access: 'r',
|
|
394
|
+
description: 'Phase L3 total active energy',
|
|
395
|
+
decimals: 2,
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: 'active_energy_forward',
|
|
399
|
+
name: 'Forward Active Energy',
|
|
400
|
+
type: 'float',
|
|
401
|
+
unit: 'kWh',
|
|
402
|
+
access: 'r',
|
|
403
|
+
description: 'Forward (import) active energy',
|
|
404
|
+
decimals: 2,
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
id: 'active_energy_forward_l1',
|
|
408
|
+
name: 'L1 Forward Active Energy',
|
|
409
|
+
type: 'float',
|
|
410
|
+
unit: 'kWh',
|
|
411
|
+
access: 'r',
|
|
412
|
+
description: 'Phase L1 forward active energy',
|
|
413
|
+
decimals: 2,
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
id: 'active_energy_forward_l2',
|
|
417
|
+
name: 'L2 Forward Active Energy',
|
|
418
|
+
type: 'float',
|
|
419
|
+
unit: 'kWh',
|
|
420
|
+
access: 'r',
|
|
421
|
+
description: 'Phase L2 forward active energy',
|
|
422
|
+
decimals: 2,
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
id: 'active_energy_forward_l3',
|
|
426
|
+
name: 'L3 Forward Active Energy',
|
|
427
|
+
type: 'float',
|
|
428
|
+
unit: 'kWh',
|
|
429
|
+
access: 'r',
|
|
430
|
+
description: 'Phase L3 forward active energy',
|
|
431
|
+
decimals: 2,
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
id: 'active_energy_reverse',
|
|
435
|
+
name: 'Reverse Active Energy',
|
|
436
|
+
type: 'float',
|
|
437
|
+
unit: 'kWh',
|
|
438
|
+
access: 'r',
|
|
439
|
+
description: 'Reverse (export) active energy',
|
|
440
|
+
decimals: 2,
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
id: 'active_energy_reverse_l1',
|
|
444
|
+
name: 'L1 Reverse Active Energy',
|
|
445
|
+
type: 'float',
|
|
446
|
+
unit: 'kWh',
|
|
447
|
+
access: 'r',
|
|
448
|
+
description: 'Phase L1 reverse active energy',
|
|
449
|
+
decimals: 2,
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
id: 'active_energy_reverse_l2',
|
|
453
|
+
name: 'L2 Reverse Active Energy',
|
|
454
|
+
type: 'float',
|
|
455
|
+
unit: 'kWh',
|
|
456
|
+
access: 'r',
|
|
457
|
+
description: 'Phase L2 reverse active energy',
|
|
458
|
+
decimals: 2,
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
id: 'active_energy_reverse_l3',
|
|
462
|
+
name: 'L3 Reverse Active Energy',
|
|
463
|
+
type: 'float',
|
|
464
|
+
unit: 'kWh',
|
|
465
|
+
access: 'r',
|
|
466
|
+
description: 'Phase L3 reverse active energy',
|
|
467
|
+
decimals: 2,
|
|
468
|
+
},
|
|
469
|
+
// Reactive energy
|
|
470
|
+
{
|
|
471
|
+
id: 'reactive_energy_total',
|
|
472
|
+
name: 'Total Reactive Energy',
|
|
473
|
+
type: 'float',
|
|
474
|
+
unit: 'kVArh',
|
|
475
|
+
access: 'r',
|
|
476
|
+
description: 'Total reactive energy (all phases)',
|
|
477
|
+
decimals: 2,
|
|
478
|
+
},
|
|
479
|
+
{
|
|
480
|
+
id: 'reactive_energy_l1',
|
|
481
|
+
name: 'L1 Total Reactive Energy',
|
|
482
|
+
type: 'float',
|
|
483
|
+
unit: 'kVArh',
|
|
484
|
+
access: 'r',
|
|
485
|
+
description: 'Phase L1 total reactive energy',
|
|
486
|
+
decimals: 2,
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
id: 'reactive_energy_l2',
|
|
490
|
+
name: 'L2 Total Reactive Energy',
|
|
491
|
+
type: 'float',
|
|
492
|
+
unit: 'kVArh',
|
|
493
|
+
access: 'r',
|
|
494
|
+
description: 'Phase L2 total reactive energy',
|
|
495
|
+
decimals: 2,
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
id: 'reactive_energy_l3',
|
|
499
|
+
name: 'L3 Total Reactive Energy',
|
|
500
|
+
type: 'float',
|
|
501
|
+
unit: 'kVArh',
|
|
502
|
+
access: 'r',
|
|
503
|
+
description: 'Phase L3 total reactive energy',
|
|
504
|
+
decimals: 2,
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
id: 'reactive_energy_forward',
|
|
508
|
+
name: 'Forward Reactive Energy',
|
|
509
|
+
type: 'float',
|
|
510
|
+
unit: 'kVArh',
|
|
511
|
+
access: 'r',
|
|
512
|
+
description: 'Forward (import) reactive energy',
|
|
513
|
+
decimals: 2,
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
id: 'reactive_energy_forward_l1',
|
|
517
|
+
name: 'L1 Forward Reactive Energy',
|
|
518
|
+
type: 'float',
|
|
519
|
+
unit: 'kVArh',
|
|
520
|
+
access: 'r',
|
|
521
|
+
description: 'Phase L1 forward reactive energy',
|
|
522
|
+
decimals: 2,
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
id: 'reactive_energy_forward_l2',
|
|
526
|
+
name: 'L2 Forward Reactive Energy',
|
|
527
|
+
type: 'float',
|
|
528
|
+
unit: 'kVArh',
|
|
529
|
+
access: 'r',
|
|
530
|
+
description: 'Phase L2 forward reactive energy',
|
|
531
|
+
decimals: 2,
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
id: 'reactive_energy_forward_l3',
|
|
535
|
+
name: 'L3 Forward Reactive Energy',
|
|
536
|
+
type: 'float',
|
|
537
|
+
unit: 'kVArh',
|
|
538
|
+
access: 'r',
|
|
539
|
+
description: 'Phase L3 forward reactive energy',
|
|
540
|
+
decimals: 2,
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
id: 'reactive_energy_reverse',
|
|
544
|
+
name: 'Reverse Reactive Energy',
|
|
545
|
+
type: 'float',
|
|
546
|
+
unit: 'kVArh',
|
|
547
|
+
access: 'r',
|
|
548
|
+
description: 'Reverse (export) reactive energy',
|
|
549
|
+
decimals: 2,
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: 'reactive_energy_reverse_l1',
|
|
553
|
+
name: 'L1 Reverse Reactive Energy',
|
|
554
|
+
type: 'float',
|
|
555
|
+
unit: 'kVArh',
|
|
556
|
+
access: 'r',
|
|
557
|
+
description: 'Phase L1 reverse reactive energy',
|
|
558
|
+
decimals: 2,
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
id: 'reactive_energy_reverse_l2',
|
|
562
|
+
name: 'L2 Reverse Reactive Energy',
|
|
563
|
+
type: 'float',
|
|
564
|
+
unit: 'kVArh',
|
|
565
|
+
access: 'r',
|
|
566
|
+
description: 'Phase L2 reverse reactive energy',
|
|
567
|
+
decimals: 2,
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
id: 'reactive_energy_reverse_l3',
|
|
571
|
+
name: 'L3 Reverse Reactive Energy',
|
|
572
|
+
type: 'float',
|
|
573
|
+
unit: 'kVArh',
|
|
574
|
+
access: 'r',
|
|
575
|
+
description: 'Phase L3 reverse reactive energy',
|
|
576
|
+
decimals: 2,
|
|
577
|
+
},
|
|
578
|
+
];
|
|
579
|
+
/**
|
|
580
|
+
* Register mapping for real-time data (0x0000-0x003B)
|
|
581
|
+
*/
|
|
582
|
+
const REALTIME_REGISTER_MAP = {
|
|
583
|
+
serial_number: 0,
|
|
584
|
+
device_address: 2,
|
|
585
|
+
baud_rate: 3,
|
|
586
|
+
software_version: 4,
|
|
587
|
+
hardware_version: 6,
|
|
588
|
+
ct_rate: 8,
|
|
589
|
+
s0_output_rate: 9,
|
|
590
|
+
cycle_time: 13,
|
|
591
|
+
voltage_l1: 14,
|
|
592
|
+
voltage_l2: 16,
|
|
593
|
+
voltage_l3: 18,
|
|
594
|
+
frequency: 20,
|
|
595
|
+
current_l1: 22,
|
|
596
|
+
current_l2: 24,
|
|
597
|
+
current_l3: 26,
|
|
598
|
+
active_power_total: 28,
|
|
599
|
+
active_power_l1: 30,
|
|
600
|
+
active_power_l2: 32,
|
|
601
|
+
active_power_l3: 34,
|
|
602
|
+
reactive_power_total: 36,
|
|
603
|
+
reactive_power_l1: 38,
|
|
604
|
+
reactive_power_l2: 40,
|
|
605
|
+
reactive_power_l3: 42,
|
|
606
|
+
apparent_power_total: 44,
|
|
607
|
+
apparent_power_l1: 46,
|
|
608
|
+
apparent_power_l2: 48,
|
|
609
|
+
apparent_power_l3: 50,
|
|
610
|
+
power_factor_total: 52,
|
|
611
|
+
power_factor_l1: 54,
|
|
612
|
+
power_factor_l2: 56,
|
|
613
|
+
power_factor_l3: 58,
|
|
614
|
+
};
|
|
615
|
+
/**
|
|
616
|
+
* Register mapping for energy data (relative to 0x0100)
|
|
617
|
+
*/
|
|
618
|
+
const ENERGY_REGISTER_MAP = {
|
|
619
|
+
active_energy_total: 0,
|
|
620
|
+
active_energy_l1: 2,
|
|
621
|
+
active_energy_l2: 4,
|
|
622
|
+
active_energy_l3: 6,
|
|
623
|
+
active_energy_forward: 8,
|
|
624
|
+
active_energy_forward_l1: 10,
|
|
625
|
+
active_energy_forward_l2: 12,
|
|
626
|
+
active_energy_forward_l3: 14,
|
|
627
|
+
active_energy_reverse: 16,
|
|
628
|
+
active_energy_reverse_l1: 18,
|
|
629
|
+
active_energy_reverse_l2: 20,
|
|
630
|
+
active_energy_reverse_l3: 22,
|
|
631
|
+
reactive_energy_total: 24,
|
|
632
|
+
reactive_energy_l1: 26,
|
|
633
|
+
reactive_energy_l2: 28,
|
|
634
|
+
reactive_energy_l3: 30,
|
|
635
|
+
reactive_energy_forward: 32,
|
|
636
|
+
reactive_energy_forward_l1: 34,
|
|
637
|
+
reactive_energy_forward_l2: 36,
|
|
638
|
+
reactive_energy_forward_l3: 38,
|
|
639
|
+
reactive_energy_reverse: 40,
|
|
640
|
+
reactive_energy_reverse_l1: 42,
|
|
641
|
+
reactive_energy_reverse_l2: 44,
|
|
642
|
+
reactive_energy_reverse_l3: 46,
|
|
643
|
+
};
|
|
644
|
+
/**
|
|
645
|
+
* Register mapping for config registers outside bulk read range
|
|
646
|
+
* These registers are read/written individually
|
|
647
|
+
*/
|
|
648
|
+
const CONFIG_REGISTER_MAP = {
|
|
649
|
+
combined_code: 0x0042,
|
|
650
|
+
};
|
|
651
|
+
/**
|
|
652
|
+
* Data points that are single 16-bit registers (not floats)
|
|
653
|
+
*/
|
|
654
|
+
const SINGLE_REGISTER_POINTS = new Set([
|
|
655
|
+
'device_address',
|
|
656
|
+
'baud_rate',
|
|
657
|
+
'ct_rate',
|
|
658
|
+
'cycle_time',
|
|
659
|
+
'combined_code',
|
|
660
|
+
]);
|
|
661
|
+
/**
|
|
662
|
+
* Data points that are 32-bit integers (2 registers)
|
|
663
|
+
*/
|
|
664
|
+
const DOUBLE_REGISTER_INT_POINTS = new Set(['serial_number']);
|
|
665
|
+
/**
|
|
666
|
+
* Decode data point value from buffer
|
|
667
|
+
*/
|
|
668
|
+
function decodeRealtimeDataPoint(id, buffer) {
|
|
669
|
+
const registerOffset = REALTIME_REGISTER_MAP[id];
|
|
670
|
+
if (registerOffset === undefined) {
|
|
671
|
+
throw new Error(`Unknown realtime data point: ${id}`);
|
|
672
|
+
}
|
|
673
|
+
if (SINGLE_REGISTER_POINTS.has(id)) {
|
|
674
|
+
return buffer.readUInt16BE(registerOffset * 2);
|
|
675
|
+
}
|
|
676
|
+
if (DOUBLE_REGISTER_INT_POINTS.has(id)) {
|
|
677
|
+
return buffer.readUInt32BE(registerOffset * 2);
|
|
678
|
+
}
|
|
679
|
+
return (0, driver_sdk_1.readFloatBE)(buffer, registerOffset * 2);
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Decode energy data point value from buffer
|
|
683
|
+
*/
|
|
684
|
+
function decodeEnergyDataPoint(id, buffer) {
|
|
685
|
+
const registerOffset = ENERGY_REGISTER_MAP[id];
|
|
686
|
+
if (registerOffset === undefined) {
|
|
687
|
+
throw new Error(`Unknown energy data point: ${id}`);
|
|
688
|
+
}
|
|
689
|
+
return (0, driver_sdk_1.readFloatBE)(buffer, registerOffset * 2);
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Create OR-WE-516 device driver
|
|
693
|
+
*/
|
|
694
|
+
const createDriver = (config) => {
|
|
695
|
+
const { transport } = config;
|
|
696
|
+
const driver = {
|
|
697
|
+
name: 'OR-WE-516',
|
|
698
|
+
manufacturer: 'ORNO',
|
|
699
|
+
model: 'OR-WE-516',
|
|
700
|
+
dataPoints: DATA_POINTS,
|
|
701
|
+
async readDataPoint(id) {
|
|
702
|
+
// Check if it's a realtime data point
|
|
703
|
+
if (id in REALTIME_REGISTER_MAP) {
|
|
704
|
+
const buffer = await transport.readHoldingRegisters(0, 60);
|
|
705
|
+
return decodeRealtimeDataPoint(id, buffer);
|
|
706
|
+
}
|
|
707
|
+
// Check if it's an energy data point
|
|
708
|
+
if (id in ENERGY_REGISTER_MAP) {
|
|
709
|
+
const buffer = await transport.readHoldingRegisters(0x100, 48);
|
|
710
|
+
return decodeEnergyDataPoint(id, buffer);
|
|
711
|
+
}
|
|
712
|
+
// Check if it's a config register (read individually)
|
|
713
|
+
const configRegister = CONFIG_REGISTER_MAP[id];
|
|
714
|
+
if (configRegister !== undefined) {
|
|
715
|
+
const buffer = await transport.readHoldingRegisters(configRegister, 1);
|
|
716
|
+
return buffer.readUInt16BE(0);
|
|
717
|
+
}
|
|
718
|
+
throw new Error(`Unknown data point: ${id}`);
|
|
719
|
+
},
|
|
720
|
+
async writeDataPoint(id, value) {
|
|
721
|
+
if (id === 'device_address') {
|
|
722
|
+
if (!(0, driver_sdk_1.isValidInteger)(value) || !isValidAddress(value)) {
|
|
723
|
+
const [min, max] = exports.SUPPORTED_CONFIG.validAddressRange;
|
|
724
|
+
throw new Error((0, driver_sdk_1.formatRangeError)('device address', min, max));
|
|
725
|
+
}
|
|
726
|
+
await transport.writeSingleRegister(2, value);
|
|
727
|
+
return;
|
|
728
|
+
}
|
|
729
|
+
if (id === 'baud_rate') {
|
|
730
|
+
if (!isValidBaudRate(value)) {
|
|
731
|
+
throw new Error((0, driver_sdk_1.formatEnumError)('baud rate', exports.SUPPORTED_CONFIG.validBaudRates));
|
|
732
|
+
}
|
|
733
|
+
await transport.writeSingleRegister(3, value);
|
|
734
|
+
return;
|
|
735
|
+
}
|
|
736
|
+
if (id === 's0_output_rate') {
|
|
737
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
738
|
+
throw new Error('Invalid S0 output rate: must be a finite number');
|
|
739
|
+
}
|
|
740
|
+
const buffer = (0, driver_sdk_1.writeFloatBE)(value);
|
|
741
|
+
await transport.writeMultipleRegisters(0x0009, buffer);
|
|
742
|
+
return;
|
|
743
|
+
}
|
|
744
|
+
if (id === 'cycle_time') {
|
|
745
|
+
if (!(0, driver_sdk_1.isValidInteger)(value) || !isValidCycleTime(value)) {
|
|
746
|
+
throw new Error((0, driver_sdk_1.formatRangeError)('cycle time', 0, 65535));
|
|
747
|
+
}
|
|
748
|
+
await transport.writeSingleRegister(0x000d, value);
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
if (id === 'combined_code') {
|
|
752
|
+
if (!(0, driver_sdk_1.isValidInteger)(value) || !isValidCycleTime(value)) {
|
|
753
|
+
throw new Error((0, driver_sdk_1.formatRangeError)('combined code', 0, 65535));
|
|
754
|
+
}
|
|
755
|
+
await transport.writeSingleRegister(0x0042, value);
|
|
756
|
+
return;
|
|
757
|
+
}
|
|
758
|
+
throw new Error(`Data point ${id} is read-only`);
|
|
759
|
+
},
|
|
760
|
+
async readDataPoints(ids) {
|
|
761
|
+
const result = {};
|
|
762
|
+
// Separate data points by register type
|
|
763
|
+
const realtimePoints = ids.filter((id) => id in REALTIME_REGISTER_MAP);
|
|
764
|
+
const energyPoints = ids.filter((id) => id in ENERGY_REGISTER_MAP);
|
|
765
|
+
const configPoints = ids.filter((id) => id in CONFIG_REGISTER_MAP);
|
|
766
|
+
// Read realtime registers if needed
|
|
767
|
+
if (realtimePoints.length > 0) {
|
|
768
|
+
const buffer = await transport.readHoldingRegisters(0, 60);
|
|
769
|
+
for (const id of realtimePoints) {
|
|
770
|
+
result[id] = decodeRealtimeDataPoint(id, buffer);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
// Read energy registers if needed
|
|
774
|
+
if (energyPoints.length > 0) {
|
|
775
|
+
const buffer = await transport.readHoldingRegisters(0x100, 48);
|
|
776
|
+
for (const id of energyPoints) {
|
|
777
|
+
result[id] = decodeEnergyDataPoint(id, buffer);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
// Read config registers individually
|
|
781
|
+
for (const id of configPoints) {
|
|
782
|
+
const register = CONFIG_REGISTER_MAP[id];
|
|
783
|
+
if (register !== undefined) {
|
|
784
|
+
const buffer = await transport.readHoldingRegisters(register, 1);
|
|
785
|
+
result[id] = buffer.readUInt16BE(0);
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
// Check for unknown data points
|
|
789
|
+
const unknownPoints = ids.filter((id) => !(id in REALTIME_REGISTER_MAP) &&
|
|
790
|
+
!(id in ENERGY_REGISTER_MAP) &&
|
|
791
|
+
!(id in CONFIG_REGISTER_MAP));
|
|
792
|
+
if (unknownPoints.length > 0) {
|
|
793
|
+
throw new Error(`Unknown data points: ${unknownPoints.join(', ')}`);
|
|
794
|
+
}
|
|
795
|
+
return result;
|
|
796
|
+
},
|
|
797
|
+
};
|
|
798
|
+
return Promise.resolve(driver);
|
|
799
|
+
};
|
|
800
|
+
exports.createDriver = createDriver;
|
|
801
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot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C9B,CAAC,EAAE,EAAE,EAAE,CACL,CAAC,CAAC,EAAE,IAAI,qBAAqB,CAAC;gBAC9B,CAAC,CAAC,EAAE,IAAI,mBAAmB,CAAC;gBAC5B,CAAC,CAAC,EAAE,IAAI,mBAAmB,CAAC,CAC/B,CAAA;YACD,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CAAC,wBAAwB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACrE,CAAC;YAED,OAAO,MAAM,CAAA;QACf,CAAC;KACF,CAAA;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;AAChC,CAAC,CAAA;AA/HY,QAAA,YAAY,gBA+HxB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ya-modbus/driver-or-we-516",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "ORNO OR-WE-516 3-phase energy meter driver for ya-modbus",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"modbus",
|
|
7
|
+
"driver",
|
|
8
|
+
"energy-meter",
|
|
9
|
+
"power-meter",
|
|
10
|
+
"orno",
|
|
11
|
+
"or-we-516",
|
|
12
|
+
"3-phase",
|
|
13
|
+
"ya-modbus-driver"
|
|
14
|
+
],
|
|
15
|
+
"author": "Geno Roupsky <185580+groupsky@users.noreply.github.com>",
|
|
16
|
+
"license": "GPL-3.0-or-later",
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"CHANGELOG.md"
|
|
24
|
+
],
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/groupsky/ya-modbus.git",
|
|
28
|
+
"directory": "packages/driver-or-we-516"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/groupsky/ya-modbus/tree/main/packages/driver-or-we-516#readme",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/groupsky/ya-modbus/issues"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsc --build",
|
|
39
|
+
"clean": "rm -rf dist",
|
|
40
|
+
"lint": "eslint .",
|
|
41
|
+
"test": "jest"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@ya-modbus/driver-sdk": "^0.6.0",
|
|
45
|
+
"@ya-modbus/driver-types": "^0.6.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@ya-modbus/cli": "^0.6.0"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": ">=20.0.0"
|
|
52
|
+
}
|
|
53
|
+
}
|