@m1kad0/hannah-proto 4.5.0 → 4.6.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 +21 -0
- package/dist/compat_interceptor.js +6 -6
- package/dist/compat_versions.js +176 -88
- package/dist/descriptor.binpb +0 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/v1/activity_log.d.ts +60 -0
- package/dist/v1/activity_log.js +453 -0
- package/dist/v1/agent.d.ts +433 -0
- package/dist/v1/agent.js +2527 -0
- package/dist/v1/automation.d.ts +54 -0
- package/dist/v1/automation.js +303 -0
- package/dist/v1/car_state.d.ts +72 -0
- package/dist/v1/car_state.js +516 -0
- package/dist/v1/channel.d.ts +102 -0
- package/dist/v1/channel.js +587 -0
- package/dist/v1/control.d.ts +383 -0
- package/dist/v1/control.js +3879 -0
- package/dist/v1/device_control_menu.d.ts +88 -0
- package/dist/v1/device_control_menu.js +629 -0
- package/dist/v1/event_stream.d.ts +63 -0
- package/dist/v1/event_stream.js +494 -0
- package/dist/v1/hannah.d.ts +1644 -0
- package/dist/v1/hannah.js +968 -0
- package/dist/v1/index.d.ts +22 -0
- package/dist/v1/index.js +58 -0
- package/dist/v1/infrastructure.d.ts +98 -0
- package/dist/v1/infrastructure.js +652 -0
- package/dist/v1/logging.d.ts +189 -0
- package/dist/v1/logging.js +775 -0
- package/dist/v1/messages.d.ts +56 -0
- package/dist/v1/messages.js +398 -0
- package/dist/v1/satellite.d.ts +90 -0
- package/dist/v1/satellite.js +637 -0
- package/dist/v1/satellite_provisioning.d.ts +33 -0
- package/dist/v1/satellite_provisioning.js +84 -0
- package/dist/v1/satellite_proxy.d.ts +100 -0
- package/dist/v1/satellite_proxy.js +546 -0
- package/dist/v1/shared.d.ts +54 -0
- package/dist/v1/shared.js +249 -0
- package/dist/v1/speaker_enrollment.d.ts +44 -0
- package/dist/v1/speaker_enrollment.js +157 -0
- package/dist/v1/timer_admin.d.ts +42 -0
- package/dist/v1/timer_admin.js +273 -0
- package/dist/v1/timer_service.d.ts +133 -0
- package/dist/v1/timer_service.js +945 -0
- package/dist/v1/user_registry.d.ts +187 -0
- package/dist/v1/user_registry.js +1612 -0
- package/dist/v1/wakeword_capture.d.ts +101 -0
- package/dist/v1/wakeword_capture.js +611 -0
- package/dist/v1/weather.d.ts +81 -0
- package/dist/v1/weather.js +366 -0
- package/package.json +1 -1
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { EnumValues, StateType } from "./shared";
|
|
3
|
+
import { CaptureMode, SampleType } from "./wakeword_capture";
|
|
4
|
+
import { AgentWeatherUpdate } from "./weather";
|
|
5
|
+
export declare const protobufPackage = "hannah.v1";
|
|
6
|
+
export declare enum ResidentType {
|
|
7
|
+
RESIDENT_TYPE_UNSPECIFIED = 0,
|
|
8
|
+
ROOMIE = 1,
|
|
9
|
+
GUEST = 2,
|
|
10
|
+
PET = 3,
|
|
11
|
+
UNRECOGNIZED = -1
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Which single presence aspect to set. The residents adapter's presence.{away,home,night}
|
|
15
|
+
* datapoints guard their own cross-consistency (e.g. setting "away" true automatically
|
|
16
|
+
* flips "home" false) — Hannah only needs to name the aspect it actually has an opinion
|
|
17
|
+
* about, instead of writing the whole combined presence.state value (hannah#309, root
|
|
18
|
+
* cause of hannah#299: two independent Hannah-side decisions, home/away presence fusion
|
|
19
|
+
* and an explicit asleep/awake trigger, collapsed onto one write and could clobber each
|
|
20
|
+
* other's information). SET_AWAKE has no direct presence.state equivalent — it only
|
|
21
|
+
* clears "night" and leaves "home" untouched, regardless of its current value.
|
|
22
|
+
*/
|
|
23
|
+
export declare enum ResidentPresenceAction {
|
|
24
|
+
RESIDENT_PRESENCE_ACTION_UNSPECIFIED = 0,
|
|
25
|
+
AWAY = 1,
|
|
26
|
+
HOME = 2,
|
|
27
|
+
ASLEEP = 3,
|
|
28
|
+
AWAKE = 4,
|
|
29
|
+
UNRECOGNIZED = -1
|
|
30
|
+
}
|
|
31
|
+
/** Sent by the HannahAgent ioBroker adapter over the AgentConnect stream. */
|
|
32
|
+
export interface AgentMessage {
|
|
33
|
+
/** any ioBroker state changed */
|
|
34
|
+
stateUpdate?: AgentStateUpdate | undefined;
|
|
35
|
+
/** residents adapter presence changed */
|
|
36
|
+
residentUpdate?: AgentResident | undefined;
|
|
37
|
+
/** text command state changed */
|
|
38
|
+
textCommand?: AgentTextCommand | undefined;
|
|
39
|
+
/** satellite control command */
|
|
40
|
+
satelliteControl?: AgentSatelliteControl | undefined;
|
|
41
|
+
/** initial snapshot with all states */
|
|
42
|
+
sendSnapshot?: AgentDeviceSnapshot | undefined;
|
|
43
|
+
/** initial snapshot with all residents */
|
|
44
|
+
sendResidents?: AgentResidentSnapshot | undefined;
|
|
45
|
+
/** ask Resident via Hannah */
|
|
46
|
+
askResident?: AgentAskResident | undefined;
|
|
47
|
+
/** full room catalog, independent of devices */
|
|
48
|
+
sendRooms?: AgentRoomSnapshot | undefined;
|
|
49
|
+
weatherUpdate?: AgentWeatherUpdate | undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Adapter instructs Hannah to control satellites in a room or a specific satellite.
|
|
53
|
+
* room: room_id (enum ID segment) or "all" for all rooms.
|
|
54
|
+
* device_id: if non-empty, only the named satellite is targeted (volume/mute/capture only);
|
|
55
|
+
* room is still required (used for room-scoped commands and as fallback).
|
|
56
|
+
* For capture, device_id is mandatory — never room-broadcast.
|
|
57
|
+
*/
|
|
58
|
+
export interface AgentSatelliteControl {
|
|
59
|
+
room: string;
|
|
60
|
+
/** optional: target a specific satellite instead of the whole room */
|
|
61
|
+
deviceId: string;
|
|
62
|
+
/** set do-not-disturb */
|
|
63
|
+
dnd?: boolean | undefined;
|
|
64
|
+
/** mute/unmute microphone */
|
|
65
|
+
mute?: boolean | undefined;
|
|
66
|
+
/** set volume (0–100) */
|
|
67
|
+
volume?: number | undefined;
|
|
68
|
+
/** speak plain-text announcement (verbatim) */
|
|
69
|
+
announcement?: string | undefined;
|
|
70
|
+
/** speak SSML announcement */
|
|
71
|
+
announcementSsml?: string | undefined;
|
|
72
|
+
/** speak announcement, text rephrased by LLM first */
|
|
73
|
+
announcementRephrase?: string | undefined;
|
|
74
|
+
/** start/stop a Voice Collector capture on this satellite */
|
|
75
|
+
capture?: CaptureControl | undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Start or stop a Voice Collector capture — the AgentSatelliteControl counterpart
|
|
79
|
+
* to CaptureCommand, routed to the satellite named by AgentSatelliteControl.device_id.
|
|
80
|
+
*/
|
|
81
|
+
export interface CaptureControl {
|
|
82
|
+
sampleType: SampleType | undefined;
|
|
83
|
+
captureMode: CaptureMode;
|
|
84
|
+
stop: boolean;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* An ioBroker state change event. ack=true means the device confirmed the value
|
|
88
|
+
* (as opposed to ack=false which is the "desired" value). Hannah uses this to
|
|
89
|
+
* verify that a SetState command was executed successfully.
|
|
90
|
+
*/
|
|
91
|
+
export interface AgentStateUpdate {
|
|
92
|
+
/** full ioBroker state ID, e.g. "javascript.0.virtualDevice.Licht.EG.Wohnzimmer.DeckeSeite.on" */
|
|
93
|
+
stateId: string;
|
|
94
|
+
/** JSON-encoded value: "true", "42", "\"text\"" */
|
|
95
|
+
value: string;
|
|
96
|
+
/** true = confirmed by device */
|
|
97
|
+
ack: boolean;
|
|
98
|
+
/** Unix timestamp in milliseconds */
|
|
99
|
+
ts: bigint;
|
|
100
|
+
}
|
|
101
|
+
/** The text-command state in ioBroker changed — treat as a SubmitText call. */
|
|
102
|
+
export interface AgentTextCommand {
|
|
103
|
+
text: string;
|
|
104
|
+
}
|
|
105
|
+
/** Sent by Hannah Core over the AgentConnect stream. */
|
|
106
|
+
export interface AgentCommand {
|
|
107
|
+
/** Hannah wants to control an ioBroker device */
|
|
108
|
+
setState?: AgentSetState | undefined;
|
|
109
|
+
/** Hannah needs additional states streamed */
|
|
110
|
+
watchMore?: AgentWatchMore | undefined;
|
|
111
|
+
/** Hannah wants to set a resident's presence state */
|
|
112
|
+
setResident?: AgentSetResident | undefined;
|
|
113
|
+
/** a satellite registered or disconnected */
|
|
114
|
+
satelliteUpdate?: AgentSatelliteUpdate | undefined;
|
|
115
|
+
/** Hannah's answer to a text command */
|
|
116
|
+
textAnswer?: AgentTextAnswer | undefined;
|
|
117
|
+
/** satellite firmware version update */
|
|
118
|
+
firmwareEvent?: AgentFirmwareEvent | undefined;
|
|
119
|
+
/** BLE tag location changed */
|
|
120
|
+
bleUpdate?: AgentBleUpdate | undefined;
|
|
121
|
+
/** satellite sensor reading */
|
|
122
|
+
sensorUpdate?: AgentSensorUpdate | undefined;
|
|
123
|
+
/** answer to an ask_resident request */
|
|
124
|
+
residentAnswered?: AgentResidentAnswered | undefined;
|
|
125
|
+
/** Hannah Core deleted a satellite — adapter must remove its object tree */
|
|
126
|
+
satelliteDeleted?: AgentSatelliteDeleted | undefined;
|
|
127
|
+
/** Hannah wants to set a resident's mood, independent of presence */
|
|
128
|
+
setResidentMood?: AgentSetResidentMood | undefined;
|
|
129
|
+
}
|
|
130
|
+
export interface AgentFirmwareEvent {
|
|
131
|
+
device: string;
|
|
132
|
+
version: string;
|
|
133
|
+
/** true = newer version pending, false = current version report */
|
|
134
|
+
updateAvailable: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Hannah instructs the adapter to set an ioBroker state.
|
|
138
|
+
* The adapter calls setForeignState(); the resulting ack=true AgentStateUpdate
|
|
139
|
+
* confirms execution back to Hannah.
|
|
140
|
+
*/
|
|
141
|
+
export interface AgentSetState {
|
|
142
|
+
/** ioBroker state ID to write */
|
|
143
|
+
stateId: string;
|
|
144
|
+
/** JSON-encoded value */
|
|
145
|
+
value: string;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Hannah requests additional state IDs to be included in the AgentStateUpdate stream.
|
|
149
|
+
* Used by the trigger engine at runtime when triggers reference arbitrary state IDs
|
|
150
|
+
* (e.g. unless.state: "0_userdata.0.feeded") that aren't covered by enum discovery.
|
|
151
|
+
*/
|
|
152
|
+
export interface AgentWatchMore {
|
|
153
|
+
stateIds: string[];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Hannah instructs the adapter to set a resident's presence state in the residents adapter.
|
|
157
|
+
* type determines whether the target path is .roomie./.guest./.pet.
|
|
158
|
+
*/
|
|
159
|
+
export interface AgentSetResident {
|
|
160
|
+
/** e.g. "leonie", "hannah" */
|
|
161
|
+
residentId: string;
|
|
162
|
+
/**
|
|
163
|
+
* Legacy absolute presence value (0=absent, 1=home, 2=night) — writes the combined
|
|
164
|
+
* presence.state, which cross-clobbers whichever of home/away/night Hannah didn't
|
|
165
|
+
* intend to change. Superseded by `action`; kept only for adapters older than
|
|
166
|
+
* compat_version 2, which don't understand `action` yet and ignore it entirely.
|
|
167
|
+
* Senders should populate both until those adapters are no longer in use.
|
|
168
|
+
*
|
|
169
|
+
* @deprecated
|
|
170
|
+
*/
|
|
171
|
+
presenceState: number;
|
|
172
|
+
type: ResidentType;
|
|
173
|
+
/**
|
|
174
|
+
* Preferred over `presence_state`: sets only the single presence.{away,home,night}
|
|
175
|
+
* flag this action corresponds to, letting the residents adapter's own consistency
|
|
176
|
+
* guard handle the rest.
|
|
177
|
+
*/
|
|
178
|
+
action: ResidentPresenceAction;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Hannah instructs the adapter to set a resident's mood — separate command from
|
|
182
|
+
* AgentSetResident so it can fire independent of any presence change (e.g. when a
|
|
183
|
+
* Hannah User's linked mood changes without an arrival/departure).
|
|
184
|
+
*/
|
|
185
|
+
export interface AgentSetResidentMood {
|
|
186
|
+
/** e.g. "leonie", "hannah" */
|
|
187
|
+
residentId: string;
|
|
188
|
+
mood: number;
|
|
189
|
+
type: ResidentType;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Hannah notifies the adapter that a satellite registered or disconnected,
|
|
193
|
+
* or that a satellite's volume or mute state changed.
|
|
194
|
+
* The adapter updates hannah.<instance>.satellites.rooms.<room_id>.* states accordingly.
|
|
195
|
+
*/
|
|
196
|
+
export interface AgentSatelliteUpdate {
|
|
197
|
+
/** satellite device_id (== eFuse MAC since v0.34); adapter uses as ioBroker object-ID */
|
|
198
|
+
deviceId: string;
|
|
199
|
+
/** room_id: stable enum ID segment (e.g. "wohnzimmer"); adapter uses as ioBroker path segment */
|
|
200
|
+
room: string;
|
|
201
|
+
/** UDP address (empty if not applicable) */
|
|
202
|
+
address: string;
|
|
203
|
+
/** true = registered/online, false = gone/offline */
|
|
204
|
+
online: boolean;
|
|
205
|
+
/** current volume level (0–100); absent = no change */
|
|
206
|
+
volume?: number | undefined;
|
|
207
|
+
/** current mute state; absent = no change */
|
|
208
|
+
mute?: boolean | undefined;
|
|
209
|
+
/** human-readable name from Core DB (empty = fall back to device_id) */
|
|
210
|
+
displayName: string;
|
|
211
|
+
/** current do-not-disturb state; absent = no change */
|
|
212
|
+
dnd?: boolean | undefined;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Hannah Core deleted a satellite (RoomManager.delete_satellite()) — the adapter
|
|
216
|
+
* must remove the satellite's full object tree (and its sensor tree), mirroring
|
|
217
|
+
* the room cleanup AgentSatelliteUpdate already does for online/offline changes.
|
|
218
|
+
*/
|
|
219
|
+
export interface AgentSatelliteDeleted {
|
|
220
|
+
/** satellite device_id being deleted */
|
|
221
|
+
deviceId: string;
|
|
222
|
+
/** room_id the satellite was assigned to, for room-container cleanup */
|
|
223
|
+
room: string;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Hannah sends the answer to a text command back to the adapter.
|
|
227
|
+
* The adapter sets hannah.<instance>.textAnswer accordingly.
|
|
228
|
+
*/
|
|
229
|
+
export interface AgentTextAnswer {
|
|
230
|
+
/** plain-text answer */
|
|
231
|
+
text: string;
|
|
232
|
+
/** detected intent name */
|
|
233
|
+
intent: string;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* A notification from the ioBroker adapter.
|
|
237
|
+
* direct=true: skip LLM, play text unchanged (severity ignored).
|
|
238
|
+
* direct=false: LLM reformulates text; severity controls tone ("alert"|"notify"|"info").
|
|
239
|
+
*/
|
|
240
|
+
export interface AgentNotification {
|
|
241
|
+
text: string;
|
|
242
|
+
direct: boolean;
|
|
243
|
+
/** "alert" | "notify" | "info" — only used when direct=false */
|
|
244
|
+
severity: string;
|
|
245
|
+
}
|
|
246
|
+
export interface AgentStateValue {
|
|
247
|
+
value: string;
|
|
248
|
+
ack: boolean;
|
|
249
|
+
}
|
|
250
|
+
/** A device from the ioBroker adapter */
|
|
251
|
+
export interface AgentDevice {
|
|
252
|
+
stateId: string;
|
|
253
|
+
floor: string;
|
|
254
|
+
/** room_id: stable enum ID segment, e.g. "wohnzimmer" or "living_room" */
|
|
255
|
+
room: string;
|
|
256
|
+
device: string;
|
|
257
|
+
deviceType: string;
|
|
258
|
+
functions: string[];
|
|
259
|
+
value: AgentStateValue | undefined;
|
|
260
|
+
/** all display names from ioBroker enum, e.g. {"de": "Wohnzimmer", "en": "Living Room"} */
|
|
261
|
+
roomNames: {
|
|
262
|
+
[key: string]: string;
|
|
263
|
+
};
|
|
264
|
+
/** derived from ioBroker's common.type/role/states */
|
|
265
|
+
stateType: StateType;
|
|
266
|
+
/** only set when state_type is ENUM or COLOR */
|
|
267
|
+
enumValues: EnumValues | undefined;
|
|
268
|
+
/** derived from ioBroker's common.write */
|
|
269
|
+
writable: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Grouping ID for the device this state belongs to (the adapter's own
|
|
272
|
+
* `deviceId`, one path segment up from state_id) — lets Core group sibling
|
|
273
|
+
* states without guessing from state_id's path depth. Empty = adapter hasn't
|
|
274
|
+
* been updated yet; Core falls back to its own path-depth heuristic (hannah#257).
|
|
275
|
+
*/
|
|
276
|
+
deviceId: string;
|
|
277
|
+
/**
|
|
278
|
+
* Semantic role of this specific state (e.g. "on", "level", "color", "current",
|
|
279
|
+
* "expected"), resolved by the adapter from the state's ioBroker common.role —
|
|
280
|
+
* same per-state basis as device_type, not aggregated across sibling states
|
|
281
|
+
* (a thermostat's "current" and "expected" states have different roles but
|
|
282
|
+
* belong to one device). Empty = adapter hasn't been updated yet or role is
|
|
283
|
+
* unresolvable; Core falls back to its iobroker.state_names default table
|
|
284
|
+
* (hannah#256, hannah#257).
|
|
285
|
+
*/
|
|
286
|
+
canonicalKey: string;
|
|
287
|
+
/**
|
|
288
|
+
* Whether this device's actuator uses the inverted convention (0%=open,
|
|
289
|
+
* 100%=closed) instead of Hannah's default (0%=closed, 100%=open), e.g.
|
|
290
|
+
* some Homematic/KNX shutter/awning actuators. Unset = unknown/no override,
|
|
291
|
+
* not `false` (hannah-proto#4).
|
|
292
|
+
*/
|
|
293
|
+
inverted?: boolean | undefined;
|
|
294
|
+
}
|
|
295
|
+
export interface AgentDevice_RoomNamesEntry {
|
|
296
|
+
key: string;
|
|
297
|
+
value: string;
|
|
298
|
+
}
|
|
299
|
+
/** a list with all known devices from the ioBroker adapter */
|
|
300
|
+
export interface AgentDeviceSnapshot {
|
|
301
|
+
devices: AgentDevice[];
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* A room from the ioBroker adapter's enum.rooms.* catalog — independent of devices,
|
|
305
|
+
* so rooms without any device yet are still known to Hannah (e.g. before the first
|
|
306
|
+
* satellite is provisioned into a brand-new room).
|
|
307
|
+
*/
|
|
308
|
+
export interface AgentRoom {
|
|
309
|
+
/** enum ID segment, e.g. "wohnzimmer" */
|
|
310
|
+
roomId: string;
|
|
311
|
+
/** all display names from ioBroker enum, e.g. {"de": "Wohnzimmer", "en": "Living Room"} */
|
|
312
|
+
displayNames: {
|
|
313
|
+
[key: string]: string;
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
export interface AgentRoom_DisplayNamesEntry {
|
|
317
|
+
key: string;
|
|
318
|
+
value: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Full room catalog from the ioBroker adapter. Sent on AgentConnect and whenever
|
|
322
|
+
* enum.rooms.* changes, independent of AgentDeviceSnapshot.
|
|
323
|
+
*/
|
|
324
|
+
export interface AgentRoomSnapshot {
|
|
325
|
+
rooms: AgentRoom[];
|
|
326
|
+
}
|
|
327
|
+
/** A resident from the ioBroker adapter */
|
|
328
|
+
export interface AgentResident {
|
|
329
|
+
roomieId: string;
|
|
330
|
+
name?: string | undefined;
|
|
331
|
+
type: ResidentType;
|
|
332
|
+
moodLevel?: number | undefined;
|
|
333
|
+
presenceState?: number | undefined;
|
|
334
|
+
}
|
|
335
|
+
/** a list with all known residents */
|
|
336
|
+
export interface AgentResidentSnapshot {
|
|
337
|
+
residents: AgentResident[];
|
|
338
|
+
}
|
|
339
|
+
export interface AgentAskResident {
|
|
340
|
+
correlationId: string;
|
|
341
|
+
room: string;
|
|
342
|
+
question: string;
|
|
343
|
+
}
|
|
344
|
+
export interface AgentResidentAnswered {
|
|
345
|
+
correlationId: string;
|
|
346
|
+
answer: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Hannah notifies the adapter that a BLE tag's location has changed.
|
|
350
|
+
* The adapter creates/updates states under hannah.<instance>.ble.<label>.*.
|
|
351
|
+
* room and satellite are empty when the tag is no longer visible.
|
|
352
|
+
*/
|
|
353
|
+
export interface AgentBleUpdate {
|
|
354
|
+
/** human-readable tag name (from config, used as state path) */
|
|
355
|
+
label: string;
|
|
356
|
+
/** MAC address (lowercase, colon-separated) */
|
|
357
|
+
mac: string;
|
|
358
|
+
/** room name (empty = tag not visible / stale) */
|
|
359
|
+
room: string;
|
|
360
|
+
/** satellite device ID that last detected the tag */
|
|
361
|
+
satellite: string;
|
|
362
|
+
/** last known RSSI in dBm (0 when room is empty) */
|
|
363
|
+
rssi: number;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Hannah notifies the adapter of a satellite's sensor reading.
|
|
367
|
+
* The adapter creates/updates states under hannah.<instance>.satellites.<device>.sensors.*.
|
|
368
|
+
* gas_resistance is omitted (0.0) when not available (BMP280+AHT20 hardware).
|
|
369
|
+
* iaq/co2_equiv/voc_equiv are omitted (0.0) when BSEC2 is not calibrated yet.
|
|
370
|
+
*/
|
|
371
|
+
export interface AgentSensorUpdate {
|
|
372
|
+
/** satellite device ID */
|
|
373
|
+
device: string;
|
|
374
|
+
/** °C */
|
|
375
|
+
temperature: number;
|
|
376
|
+
/** hPa */
|
|
377
|
+
pressure: number;
|
|
378
|
+
/** % relative humidity (0 when not available) */
|
|
379
|
+
humidity: number;
|
|
380
|
+
/** IAQ 0–500 (BSEC2); 0 when not calibrated */
|
|
381
|
+
iaq: number;
|
|
382
|
+
/** 0=uncertain 1=low 2=medium 3=high */
|
|
383
|
+
iaqAccuracy: number;
|
|
384
|
+
/** CO₂ equivalent ppm (BSEC2); 0 when not available */
|
|
385
|
+
co2Equiv: number;
|
|
386
|
+
/** breath VOC equivalent ppm (BSEC2); 0 when not available */
|
|
387
|
+
vocEquiv: number;
|
|
388
|
+
}
|
|
389
|
+
export declare const AgentMessage: MessageFns<AgentMessage>;
|
|
390
|
+
export declare const AgentSatelliteControl: MessageFns<AgentSatelliteControl>;
|
|
391
|
+
export declare const CaptureControl: MessageFns<CaptureControl>;
|
|
392
|
+
export declare const AgentStateUpdate: MessageFns<AgentStateUpdate>;
|
|
393
|
+
export declare const AgentTextCommand: MessageFns<AgentTextCommand>;
|
|
394
|
+
export declare const AgentCommand: MessageFns<AgentCommand>;
|
|
395
|
+
export declare const AgentFirmwareEvent: MessageFns<AgentFirmwareEvent>;
|
|
396
|
+
export declare const AgentSetState: MessageFns<AgentSetState>;
|
|
397
|
+
export declare const AgentWatchMore: MessageFns<AgentWatchMore>;
|
|
398
|
+
export declare const AgentSetResident: MessageFns<AgentSetResident>;
|
|
399
|
+
export declare const AgentSetResidentMood: MessageFns<AgentSetResidentMood>;
|
|
400
|
+
export declare const AgentSatelliteUpdate: MessageFns<AgentSatelliteUpdate>;
|
|
401
|
+
export declare const AgentSatelliteDeleted: MessageFns<AgentSatelliteDeleted>;
|
|
402
|
+
export declare const AgentTextAnswer: MessageFns<AgentTextAnswer>;
|
|
403
|
+
export declare const AgentNotification: MessageFns<AgentNotification>;
|
|
404
|
+
export declare const AgentStateValue: MessageFns<AgentStateValue>;
|
|
405
|
+
export declare const AgentDevice: MessageFns<AgentDevice>;
|
|
406
|
+
export declare const AgentDevice_RoomNamesEntry: MessageFns<AgentDevice_RoomNamesEntry>;
|
|
407
|
+
export declare const AgentDeviceSnapshot: MessageFns<AgentDeviceSnapshot>;
|
|
408
|
+
export declare const AgentRoom: MessageFns<AgentRoom>;
|
|
409
|
+
export declare const AgentRoom_DisplayNamesEntry: MessageFns<AgentRoom_DisplayNamesEntry>;
|
|
410
|
+
export declare const AgentRoomSnapshot: MessageFns<AgentRoomSnapshot>;
|
|
411
|
+
export declare const AgentResident: MessageFns<AgentResident>;
|
|
412
|
+
export declare const AgentResidentSnapshot: MessageFns<AgentResidentSnapshot>;
|
|
413
|
+
export declare const AgentAskResident: MessageFns<AgentAskResident>;
|
|
414
|
+
export declare const AgentResidentAnswered: MessageFns<AgentResidentAnswered>;
|
|
415
|
+
export declare const AgentBleUpdate: MessageFns<AgentBleUpdate>;
|
|
416
|
+
export declare const AgentSensorUpdate: MessageFns<AgentSensorUpdate>;
|
|
417
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | bigint | undefined;
|
|
418
|
+
export type DeepPartial<T> = T extends bigint ? string | number | bigint : T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
419
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
420
|
+
} : Partial<T>;
|
|
421
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
422
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
423
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
424
|
+
} & {
|
|
425
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
426
|
+
};
|
|
427
|
+
export interface MessageFns<T> {
|
|
428
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
429
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
430
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
431
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
432
|
+
}
|
|
433
|
+
export {};
|