janloebel / eufy-node-client-examples Goto Github PK
View Code? Open in Web Editor NEWThis repository shows how to use the eufy-node-client.
This repository shows how to use the eufy-node-client.
Is there something of an idiot's guide to adding this to NodeRed ? Currently all I want to do is to receive a notification from the doorbell's motion sensor. I'm sure I can modify the example to do so, however NodeRed is completely new to me, as is most home automation. I don't mind learning, I don't mind Googling, but a shove in the right direction would be nice.
Completed the .env as appropriate and ran the http-read-data node.
When using debug=true the following returns every few seconds :
url: https://mysecurity.eufylife.com/api/v1/passport/login -> body: {"code":0,"msg":"ok","data":{"user_id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","email":"[real_user_name_returned_here]","nick_name":"user","auth_token":"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy","token_expires_at":1608084891,"avatar":"","invitation_code":"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz","inviter_code":"","verify_code_url":"","mac_addr":"","domain":"security-app.eufylife.com","ab_code":"US","geo_key":"wwwwwwwwwwwwwwwwwwwwwwww","privilege":0,"phone":"","phone_code":"","params":null,"trust_list":[]}}
The correct P2P etc. info doesn't return. Username and other info are correct, auth_token refreshes on every return. Just in case I changed the country and language codes in the main http code under eufy-node-client, but no luck.
Hi, when using the p2p-local example everything, i.e. the mode is changed, but the script does not terminate at the end. Any ideas?
I realize that this client is now deprecated but I am no longer able to change the guard mode on the HomeBase. Running the node command in terminal, it shows connected and sent but the mode status doesn't change. I can see the HomeBase through the node http lookup and can change the guard mode of the indoor 2k cameras.
Any idea why this stopped functioning?
Wondering if you have an example of how to just get the status of a device/setting. Specifically using p2p.
For example, how would I get the current status of the arm mode? I see how to do with http but I am looking for a way to get this status without using the http service.
Hi.
Great idea with an example!
You might want to include a cd eufy-node-client-examples after the git clone.
I was working my way through the guide and got to inserting credentials in the .env file and running node examples/http-read-data/index.js
this gives the following error:
Starting... No credentials found -> register new... (node:2486697) UnhandledPromiseRejectionWarning: TypeError: HttpService is not a constructor at main (/home/media/eufy-node-client-examples/examples/http-read-data/index.js:12:23) at Object.<anonymous> (/home/media/eufy-node-client-examples/examples/http-read-data/index.js:25:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) (node:2486697) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:2486697) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:2486697) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/media/eufy-node-client-examples/node_modules/eufy-node-client/build/push/checkin.proto' (node:2486697) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
npm install returned
pm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
Hi.
You might want to include a cd eufy-node-client-examples after the git clone.
I was working my way through the guide and got to inserting credentials in the .env file and running node examples/http-read-data/index.js
this gives the following error:
Starting... No credentials found -> register new... (node:2486697) UnhandledPromiseRejectionWarning: TypeError: HttpService is not a constructor at main (/home/media/eufy-node-client-examples/examples/http-read-data/index.js:12:23) at Object.<anonymous> (/home/media/eufy-node-client-examples/examples/http-read-data/index.js:25:1) at Module._compile (internal/modules/cjs/loader.js:778:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3) (node:2486697) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:2486697) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:2486697) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/media/eufy-node-client-examples/node_modules/eufy-node-client/build/push/checkin.proto' (node:2486697) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
npm install returned
pm WARN [email protected] No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
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.