JanLoebel / JanLoebel/eufy-node-client

LocalLookupService.lookup timeout but works with CloudLookupService.lookup

Open
#19 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
TypeScript
Stars
42
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Hey,

First of all, I want to thank you for creating this library.
I received my Eufy battery doorbell last week and I'm thrilled to see that I can already start playing with it.
I started with the examples repo and everything worked perfectly (HTTP, push).
When trying to connect locally over the p2p connection I hit a timeout issue with the LocalLookupService.
I switched then to the run.ts in this repo and tested the cloud version witch worked like a charm:
```typescript
const mainP2pCloud = async () => {
const lookupService = new CloudLookupService();
try {
const addresses = await lookupService.lookup(P2P_DID, DSK_KEY);
console.log('Found addresses', addresses);
} catch (err) {
console.error('Not found any address...', err);
}
};
```

```
Found addresses [
{ host: 'xx.xx.xx.xx', port: xxxx },
{ host: '192.168.x.x', port: xxxx }
]
```

If I use the LocalLookupService:
```typescript
const mainP2pLocal = async () => {
const lookupService = new LocalLookupService();
try {
const address = await lookupService.lookup(LOCAL_STATION_IP);
console.log('Found address', address);
} catch (err) {
console.error('Not found any address...', err);
}
};
```

```
Not found any address... Timeout on address: 192.168.x.x
```
the 192.168.x.x is the local base station 2 IP address.

Could you point me in a certain direction to solve this issue?
Am I doing something wrong ?
Is it related to my router/network/pihole setup you think?
Could you explain to me what is actually broadcasted to the network?

Thanks in advance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing LocalLookupService.lookup with CloudLookupService.lookup and the usage shown in run.ts. Reproduce the timeout against the local base station IP and inspect what the local lookup broadcasts and waits for. Done means identifying the cause and making local lookup succeed, with the observed timeout behavior covered by an appropriate verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.