@enyo-energy/energy-app-sdk 0.0.168 → 0.0.169
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/dist/cjs/energy-app-package-definition.d.cts +41 -0
- package/dist/cjs/types/enyo-network-device.cjs +1 -0
- package/dist/cjs/types/enyo-network-device.d.cts +2 -1
- package/dist/cjs/version.cjs +1 -1
- package/dist/cjs/version.d.cts +1 -1
- package/dist/energy-app-package-definition.d.ts +41 -0
- package/dist/types/enyo-network-device.d.ts +2 -1
- package/dist/types/enyo-network-device.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -97,6 +97,46 @@ export interface EnergyAppPackageOptionsDeviceDetectionMqtt {
|
|
|
97
97
|
/** Matching values to identify the device */
|
|
98
98
|
matchingValues: string[];
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Optional device detection configuration for UDP broadcast probing.
|
|
102
|
+
* The host broadcasts the probe message on the local network and matches a
|
|
103
|
+
* JSON field in each response against the expected values to identify the
|
|
104
|
+
* device.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* // Detect Marstek Venus batteries answering on port 30000:
|
|
108
|
+
* {
|
|
109
|
+
* port: 30000,
|
|
110
|
+
* message: { id: 0, method: 'Marstek.GetDevice', params: { ble_mac: '0' } },
|
|
111
|
+
* field: 'src',
|
|
112
|
+
* operation: 'startsWith',
|
|
113
|
+
* matchingValues: ['VenusC'],
|
|
114
|
+
* }
|
|
115
|
+
*/
|
|
116
|
+
export interface EnergyAppPackageOptionsDeviceDetectionUdp {
|
|
117
|
+
/**
|
|
118
|
+
* Destination UDP port the device listens on. The probe is broadcast to
|
|
119
|
+
* this port (e.g. 30000 for Marstek Venus); responses are read from the
|
|
120
|
+
* datagrams the device sends back. Required — a UDP broadcast always needs
|
|
121
|
+
* a destination port.
|
|
122
|
+
*/
|
|
123
|
+
port: number;
|
|
124
|
+
/**
|
|
125
|
+
* The probe message to broadcast. Provide a JSON-serializable object
|
|
126
|
+
* (sent as its JSON string) or a raw string payload.
|
|
127
|
+
*/
|
|
128
|
+
message: Record<string, unknown> | string;
|
|
129
|
+
/**
|
|
130
|
+
* JSON field path in the response to match against. Supports dot notation
|
|
131
|
+
* for nested keys (e.g. `'src'` or `'result.device'`). If omitted, the
|
|
132
|
+
* entire response payload is matched.
|
|
133
|
+
*/
|
|
134
|
+
field?: string;
|
|
135
|
+
/** The matching operation to perform on the response field value */
|
|
136
|
+
operation: 'eq' | 'startsWith';
|
|
137
|
+
/** Values to match the response field value against */
|
|
138
|
+
matchingValues: string[];
|
|
139
|
+
}
|
|
100
140
|
/**
|
|
101
141
|
* Optional device detection configuration
|
|
102
142
|
*/
|
|
@@ -108,6 +148,7 @@ export interface EnergyAppPackageOptionsDeviceDetection {
|
|
|
108
148
|
eebus?: EnergyAppPackageOptionsDeviceDetectionEebus[];
|
|
109
149
|
mqtt?: EnergyAppPackageOptionsDeviceDetectionMqtt[];
|
|
110
150
|
mdns?: EnergyAppPackageOptionsDeviceDetectionMdns[];
|
|
151
|
+
udp?: EnergyAppPackageOptionsDeviceDetectionUdp[];
|
|
111
152
|
}
|
|
112
153
|
/**
|
|
113
154
|
* Optional configuration settings for an Energy App package.
|
|
@@ -9,4 +9,5 @@ var EnyoNetworkDeviceDetectedAtEnum;
|
|
|
9
9
|
EnyoNetworkDeviceDetectedAtEnum["Modbus"] = "modbus";
|
|
10
10
|
EnyoNetworkDeviceDetectedAtEnum["Http"] = "http";
|
|
11
11
|
EnyoNetworkDeviceDetectedAtEnum["Mdns"] = "mdns";
|
|
12
|
+
EnyoNetworkDeviceDetectedAtEnum["Udp"] = "udp";
|
|
12
13
|
})(EnyoNetworkDeviceDetectedAtEnum || (exports.EnyoNetworkDeviceDetectedAtEnum = EnyoNetworkDeviceDetectedAtEnum = {}));
|
package/dist/cjs/version.cjs
CHANGED
|
@@ -9,7 +9,7 @@ exports.getSdkVersion = getSdkVersion;
|
|
|
9
9
|
/**
|
|
10
10
|
* Current version of the enyo Energy App SDK.
|
|
11
11
|
*/
|
|
12
|
-
exports.SDK_VERSION = '0.0.
|
|
12
|
+
exports.SDK_VERSION = '0.0.169';
|
|
13
13
|
/**
|
|
14
14
|
* Gets the current SDK version.
|
|
15
15
|
* @returns The semantic version string of the SDK
|
package/dist/cjs/version.d.cts
CHANGED
|
@@ -97,6 +97,46 @@ export interface EnergyAppPackageOptionsDeviceDetectionMqtt {
|
|
|
97
97
|
/** Matching values to identify the device */
|
|
98
98
|
matchingValues: string[];
|
|
99
99
|
}
|
|
100
|
+
/**
|
|
101
|
+
* Optional device detection configuration for UDP broadcast probing.
|
|
102
|
+
* The host broadcasts the probe message on the local network and matches a
|
|
103
|
+
* JSON field in each response against the expected values to identify the
|
|
104
|
+
* device.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* // Detect Marstek Venus batteries answering on port 30000:
|
|
108
|
+
* {
|
|
109
|
+
* port: 30000,
|
|
110
|
+
* message: { id: 0, method: 'Marstek.GetDevice', params: { ble_mac: '0' } },
|
|
111
|
+
* field: 'src',
|
|
112
|
+
* operation: 'startsWith',
|
|
113
|
+
* matchingValues: ['VenusC'],
|
|
114
|
+
* }
|
|
115
|
+
*/
|
|
116
|
+
export interface EnergyAppPackageOptionsDeviceDetectionUdp {
|
|
117
|
+
/**
|
|
118
|
+
* Destination UDP port the device listens on. The probe is broadcast to
|
|
119
|
+
* this port (e.g. 30000 for Marstek Venus); responses are read from the
|
|
120
|
+
* datagrams the device sends back. Required — a UDP broadcast always needs
|
|
121
|
+
* a destination port.
|
|
122
|
+
*/
|
|
123
|
+
port: number;
|
|
124
|
+
/**
|
|
125
|
+
* The probe message to broadcast. Provide a JSON-serializable object
|
|
126
|
+
* (sent as its JSON string) or a raw string payload.
|
|
127
|
+
*/
|
|
128
|
+
message: Record<string, unknown> | string;
|
|
129
|
+
/**
|
|
130
|
+
* JSON field path in the response to match against. Supports dot notation
|
|
131
|
+
* for nested keys (e.g. `'src'` or `'result.device'`). If omitted, the
|
|
132
|
+
* entire response payload is matched.
|
|
133
|
+
*/
|
|
134
|
+
field?: string;
|
|
135
|
+
/** The matching operation to perform on the response field value */
|
|
136
|
+
operation: 'eq' | 'startsWith';
|
|
137
|
+
/** Values to match the response field value against */
|
|
138
|
+
matchingValues: string[];
|
|
139
|
+
}
|
|
100
140
|
/**
|
|
101
141
|
* Optional device detection configuration
|
|
102
142
|
*/
|
|
@@ -108,6 +148,7 @@ export interface EnergyAppPackageOptionsDeviceDetection {
|
|
|
108
148
|
eebus?: EnergyAppPackageOptionsDeviceDetectionEebus[];
|
|
109
149
|
mqtt?: EnergyAppPackageOptionsDeviceDetectionMqtt[];
|
|
110
150
|
mdns?: EnergyAppPackageOptionsDeviceDetectionMdns[];
|
|
151
|
+
udp?: EnergyAppPackageOptionsDeviceDetectionUdp[];
|
|
111
152
|
}
|
|
112
153
|
/**
|
|
113
154
|
* Optional configuration settings for an Energy App package.
|
|
@@ -6,4 +6,5 @@ export var EnyoNetworkDeviceDetectedAtEnum;
|
|
|
6
6
|
EnyoNetworkDeviceDetectedAtEnum["Modbus"] = "modbus";
|
|
7
7
|
EnyoNetworkDeviceDetectedAtEnum["Http"] = "http";
|
|
8
8
|
EnyoNetworkDeviceDetectedAtEnum["Mdns"] = "mdns";
|
|
9
|
+
EnyoNetworkDeviceDetectedAtEnum["Udp"] = "udp";
|
|
9
10
|
})(EnyoNetworkDeviceDetectedAtEnum || (EnyoNetworkDeviceDetectedAtEnum = {}));
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED