janloebel / eufy-node-client Goto Github PK
View Code? Open in Web Editor NEWExperiment to talk to eufy security
Experiment to talk to eufy security
I am looking for instructions on how to obtain my DSK_KEY and ACTOR_ID.
Thank you!
This seems great but an example for how to use it from e.g. a shell script would be great ;)
I am mostly interested in
Hi,
would it be possible use your code as Node in Node-Red to receive doorbell events?
I have done some misconception regarding the recognition of first / last messages while receiving multipart messages. Does anybody have an idea how that could be done?
Have a Eufy Floodlight camera which sadly isn't supported by HomeKit (or even provides a RTSP feed) so anything that can integrate even basic functionality would be great!
As of today, I have noticed that the push notification no longer works correctly. Before i received the payload correctly and now it is missing:
{"notification":{"from":"348804314802","priority":"normal"},"persistentId":"<id>"}
Do you have the same behavior?
Hi,
I cant figure it if it is currently possible to control the security profiles of the Eufy Base with this node scripts?
If so, can you maybe give some guidance how to start? That would be very nice, thank you!
Currently after connecting to a device it's not possible to disconnect again. But it would be nice to only send one command and then disconnect again.
Trying to do a lookup service on the wired doorbell directly. Does this work without the homebase?
const address = await lookupService.lookup('192.168.0.155');
This just times out on port 32108.
Hi,
I'm writing a simple bash script to turn on and off the night vision.
I'm using this simple code to retrieve all the information that I need:
token=$(curl -s --header "Content-Type: application/json" --request POST --data '{"email":"[email protected]","password":"MyP455w0rd"}' https://mysecurity.eufylife.com/apieu/v1/passport/login | jq --raw-output '.data.auth_token')
curl -H "X-Auth-Token: $token" -H "Content-Type: application/json" --request POST --data '{"device_sn": "","num": 100,"orderby": "","page": 0,"station_sn": ""}' https://mysecurity.eufylife.com/apieu/v1/app/get_devs_list
curl -H "X-Auth-Token: $token" -H "Content-Type: application/json" --request POST --data '{"device_sn": "MyDevicesSN", "station_sn": "MyStationSN", "params": [{"param_type": 2002,"param_value": "1"}]}' https://mysecurity.eufylife.com/api/v1/app/upload_devs_params
but it doesn't works.
Please may you give me same input to get this?
Thanks a lot
M.
Did you get the doorbell notifications working?
Thanks for your amazing work! I have been analyzing some additional data to send commands to each device (channel) and with some minor adjustments its working.
Wireshark logs:
cam0 off:
8800 0000 0100 0000 0000 0000 0000 0100 0000
cam0 on:
8800 0000 0100 0000 0000 0000 0000 0000 0000
cam1 off:
8800 0000 0100 0100 0000 0100 0000 0100 0000
cam1 on:
8800 0000 0100 0100 0000 0100 0000 0000 0000
cam2 off:
8800 0000 0100 0200 0000 0200 0000 0100 0000
cam2 on:
8800 0000 0100 0200 0000 0200 0000 0000 0000
I have altered buildIntStringCommandPayload
to include the channel (0x00, 0x01, 0x02) as can be seen above. These correspond with device_channel
in the json-payload received from get_devs_list
.
export const buildIntStringCommandPayload = (value: number, actor: string, channel = 0): Buffer => {
const headerBuffer = Buffer.from([0x88, 0x00]);
const emptyBuffer = Buffer.from([0x00, 0x00]);
const magicBuffer = Buffer.from([0x1, 0x00]);
const channelBuffer = Buffer.from([channel, 0x00]);
const valueBuffer = Buffer.from([value, 0x00]);
const actorBuffer = Buffer.from(actor);
const rest = Buffer.alloc(88);
return Buffer.concat([
headerBuffer,
emptyBuffer,
magicBuffer,
channelBuffer,
emptyBuffer,
channelBuffer,
emptyBuffer,
valueBuffer,
emptyBuffer,
actorBuffer,
rest,
]);
};
Now you can send commands to the individual channels:
To switch individual cameras on/off use command 0b04 (1035) with 0 (on) or 1 (off)
Turn camera 0 on
service.sendCommandWithIntString(CommandTypes.CMD_DEVS_SWITCH, 0, 0);
Turn camera 2 off
service.sendCommandWithIntString(CommandTypes.CMD_DEVS_SWITCH, 1, 2);
Im currently using CMD_NAS_TEST
to manually start/stop the RTSP stream which seems to work just fine.
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:
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:
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.
I have installed your node and can run the p2p local file from the terminal to change my security mode but wanted to find out how to run it from webcore using a get request? I'd like to incorporate the mode changes with smartthings.
thanks
Hey, great work!
I am using this library in a plug-in for Homebridge, a proxy for HomeKit, and have some issues that people have been reporting and was wondering if you may have some insight into them.
Hi @JanLoebel ,
I do have a question about the PushRegisterService.
Is this firebaseinstallation from Eufy or someone else?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.