Skip to content

Commit

Permalink
Incremented schema version to 12
Browse files Browse the repository at this point in the history
Added new Station event `alarmArmDelayEvent`
Updated dependency eufy-security-client to 2.1.2
Updated dev dependencies
Updated docs
  • Loading branch information
bropat committed Jul 30, 2022
1 parent 5bc60d2 commit 12598f8
Show file tree
Hide file tree
Showing 7 changed files with 139 additions and 114 deletions.
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![logo](_media/eufy-security-ws.png)

# eufy-security-ws <small>0.9.3</small>
# eufy-security-ws <small>0.9.4</small>

> A small server wrapper around [eufy-security-client](https://github.com/bropat/eufy-security-client) library to access it via a WebSocket
Expand Down
18 changes: 18 additions & 0 deletions docs/api_events.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,24 @@ interface {
}
```

### `alarm arm delay event`

[compatible with schema version: 12+]

This event is sent whenever an alarm arm delay event occurred.

```ts
interface {
type: "event";
event: {
source: "station";
event: "alarm arm delay event";
serialNumber: string;
alarmDelay: number;
}
}
```

## Device level events

### `device added`
Expand Down
6 changes: 5 additions & 1 deletion docs/api_schema_versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ Base schema.
## Schema 11

* Added new property `imageMirrored` to Device
* Added new Station events `alarmDelayEvent` and `alarmArmedEvent`
* Added new Station events `alarmDelayEvent` and `alarmArmedEvent`

## Schema 12

* Added new Station event `alarmArmDelayEvent`
206 changes: 103 additions & 103 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eufy-security-ws",
"version": "0.9.3",
"version": "0.9.4",
"description": "Node WebSocket server implementation to integrate Eufy Security devices",
"main": "dist/lib/index.js",
"bin": {
Expand Down Expand Up @@ -45,20 +45,20 @@
"dependencies": {
"ansi-colors": "^4.1.3",
"commander": "^9.4.0",
"eufy-security-client": "^2.1.1",
"eufy-security-client": "^2.1.2",
"fs-extra": "^10.1.0",
"promptly": "^3.2.0",
"tslog": "^3.3.3",
"ws": "^8.8.1"
},
"devDependencies": {
"@types/node": "^16.11.45",
"@types/node": "^16.11.46",
"@types/node-rsa": "^1.1.1",
"@types/promptly": "^3.0.2",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"eslint": "^8.19.0",
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"prettier": "^2.7.1",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export const version = require("../../package.json").version;
export const minSchemaVersion = 0;

// maximal/current schema version the server supports
export const maxSchemaVersion = 11;
export const maxSchemaVersion = 12;
7 changes: 5 additions & 2 deletions src/lib/forward.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AudioCodec, Camera, CommandResult, CommandType, Device, DoorbellCamera, EntrySensor, ErrorCode, IndoorCamera, MotionSensor, ParamType, PropertyValue, Station, StreamMetadata, VideoCodec, AlarmEvent, BatteryDoorbellCamera } from "eufy-security-client";
import { AudioCodec, Camera, CommandResult, CommandType, Device, DoorbellCamera, EntrySensor, ErrorCode, IndoorCamera, MotionSensor, ParamType, PropertyValue, Station, StreamMetadata, VideoCodec, AlarmEvent } from "eufy-security-client";
import { Readable } from "stream";

import { JSONValue, OutgoingEvent } from "./outgoing_message";
Expand Down Expand Up @@ -459,6 +459,9 @@ export class EventForwarder {
case CommandType.CMD_INDOOR_ROTATE:
command = DeviceCommand.panAndTilt;
break;
case CommandType.CMD_INDOOR_PAN_CALIBRATION:
command = DeviceCommand.calibrate;
break;
case CommandType.CMD_SET_DEVS_TONE_FILE:
command = DeviceCommand.triggerAlarm;
break;
Expand Down Expand Up @@ -537,7 +540,7 @@ export class EventForwarder {
event: StationEvent.alarmArmDelayEvent,
serialNumber: station.getSerial(),
armDelay: armDelay
}, 11);
}, 12);
});
}

Expand Down

0 comments on commit 12598f8

Please sign in to comment.