Skip to content

Commit

Permalink
Capture the new attempt
Browse files Browse the repository at this point in the history
Some progress maybe?
  • Loading branch information
TomasHubelbauer committed Mar 11, 2024
1 parent 9a2a388 commit c988694
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
persistent.json

# NPM
node_modules

# Bun
bun.lockb
15 changes: 15 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { EufySecurity, P2PConnectionType } from "eufy-security-client";

const eufySecurity = await EufySecurity.initialize({
username: 'test',
password: 'test',
country: 'CZ',
language: 'en',
eventDurationSeconds: 60,
p2pConnectionSetup: P2PConnectionType.QUICKEST,
pollingIntervalMinutes: 1,
});

// Make `persistent.json` to avoid crash #1
// Note that Bun doesn't support Git leading to crash #2
// See https://github.com/oven-sh/bun/pull/4395
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"@types/bun": "^1.0.8",
"eufy-security-client": "^3.0.0"
}
}
15 changes: 15 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Eufy Doorbell Snapshotter

This repository contains my effort to write a script to periodically take snaps
from my Eufy doorbell for timelapse video production purposes.

I am trying to use the https://github.com/bropat/eufy-security-client library,
but it depends on `mqtt` which doesn't work with Vite (version 1 of me trying
this that I have removed but is still in the Git history) and `got` which is not
supported by Bun at the moment: https://github.com/oven-sh/bun/pull/4395.

I don't want to be touching Node anymore so I'll wait for either MQTT to fix the
ESM export or for Bun to fix the `got` support.

The library uses Got for HTTP2 which I don't think native `fetch` supports so I
don't think there is a path to drop the dep.

0 comments on commit c988694

Please sign in to comment.