samemory / homebridge-eufy-security

Work in progress
Apache License 2.0
97 stars 14 forks source link

[Bug]: Found 0 stations - Found 0 devices #310

Closed khj24 closed 2 years ago

khj24 commented 2 years ago

What happened?

Trying to add this plugin to my Homebridge. It seems like it authenticates correctly with the newly created guest/family user with admin rights, but it finds 0 stations and 0 devices.

If I login to https://mysecurity.eufylife.com/ with the same credentials as used in this plugin, it shows the doorbell.

Help! Why won't the plugin find the doorbell?

Other notes: I have other homebridge plugins running, like Philips Hue which works like a charm.

I have also tried another Eufy security plugin by birkir, it finds the Uefy battery doorbell, but that plugin seems to have other issues.

Device Type

Doorbell (Supported)

Plugin Version

v1.0.x (Supported)

HomeBridge Version

v1.3.x (Supported)

NodeJS Version

v16 (Supported)

Operating System

Docker (UnSupported)

Relevant log output

[12/29/2021, 11:52:26 AM] [EufySecurity] Initializing EufySecurity platform...
[12/29/2021, 11:52:26 AM] [EufySecurity-1.0.8] INFO:  Eufy Security Plugin: enableDetailedLogging on
[12/29/2021, 11:52:26 AM] [EufySecurity-1.0.8] INFO:  Finished initializing Eufy Security Platform
[12/29/2021, 11:52:26 AM] [EufySecurity-1.0.8] DEBUG: discoveringDevices
[12/29/2021, 11:52:26 AM] [EufySecurity-1.0.8] DEBUG: EufyClient connected true
[12/29/2021, 11:52:26 AM] [EufySecurity-1.0.8] DEBUG: PollingInterval: 30
[12/29/2021, 11:52:26 AM] [EufySecurity-1.0.8] DEBUG: Refresh data from cloud and schedule next refresh.
[12/29/2021, 11:52:27 AM] [EufySecurity-1.0.8] DEBUG: Found 0 stations.
[12/29/2021, 11:52:27 AM] [EufySecurity-1.0.8] DEBUG: Found 0 devices.
github-actions[bot] commented 2 years ago

Did you check this Common Issues pages ?

schliemann commented 2 years ago

Which devices do you have?

khj24 commented 2 years ago

Which devices do you have?

I have the HomeBase 2 and T8210 Wireless Battery Doorbell.

schliemann commented 2 years ago

Have you disabled 2FA?

khj24 commented 2 years ago

Yes, didn't change a thing 👎 (same issue)

khj24 commented 2 years ago

Do the plugin determine which cloud to use by the login credentials or is it "hardcoded" to use the US cloud? Since I live in EU, GDPR rules and all, I most likely have 0 devices in the US cloud? Just a thought of mine..

schliemann commented 2 years ago

Our plugin hardcodes the country to US. I live in the EU. And I don't have problems discovering devices.

khj24 commented 2 years ago

Maybe Eufy changed procedure because of GDPR? Anyway that I can check if my devices are discoverable by the US cloud? Or a way to change the plugin to connect to EU cloud?

schliemann commented 2 years ago

You can try to change the platform.js file on your homebridge.

khj24 commented 2 years ago

It works! I've changed the country code to DK and suddenly the devices showes up :-)

schliemann commented 2 years ago

@lenoxys

Great. We should probably have this as a pr with country through the config.

lenoxys commented 2 years ago

@lenoxys

Great. We should probably have this as a pr with country through the config.

Ok

github-actions[bot] commented 2 years ago

Did you check this Road Map pages ?

Mikez20 commented 2 years ago

It works! I've changed the country code to DK and suddenly the devices showes up :-)

Could you share how you changed the country code

schliemann commented 2 years ago

In the platform.js file. It is not configurable in 1.0.8 or beta.

schliemann commented 2 years ago

I asked Bropat if it actually makes a difference

https://github.com/bropat/eufy-security-client/issues/92

Mikez20 commented 2 years ago

I asked Bropat if it actually makes a difference

bropat/eufy-security-client#92

Check, thnx. I seem to have the same problem that Homebridge doesn't discover any device in the Homebridge Eufy Security plugin. Any idea?

schliemann commented 2 years ago

You could try and set the country code to your country in the platform.js file.

I don't know if it will help however.

Mikez20 commented 2 years ago

Yes, but I am new to the Homebridge community and have no idea how to do that.

fullphat commented 2 years ago

If you launch a Terminal session and navigate to where the Eufy plugin is installed, you can edit the platform.js file. Try this:

nano platform.js

Navigate to line 67 or thereabouts and change the US in this line to your country code:

country: 'US',

To quit nano press CTRL+X, type "Y" and hit enter.

Mikez20 commented 2 years ago

Thnx for your advice, but could you give a hint where I can find the Eufy plugin? I have been browsing the directory's, but can't find anything that looks like the Eufy plugin. The nano platform.js command works because it starts a editor, but no code is displayed.

fullphat commented 2 years ago

Yes, it can be hard to find!

Mine is in /usr/local/lib/node_modules/

To find the plugin folder on your system, do:

where HomeBridge

navigate to that folder, then do:

ls -l

and look for the HomeBridge entry, which will probably be a link to another location. Navigate there and you should be in the right place.

Post back here if you get stuck.

lenoxys commented 2 years ago

can you try the latest beta? I've added the ability to select the country within the settings menu.

Mikez20 commented 2 years ago

can you try the latest beta? I've added the ability to select the country within the settings menu.

Check. Just loaded the beta and changed the country code. Eufy doorbell cam still doesn't show up.

Mikez20 commented 2 years ago

Yes, it can be hard to find!

Mine is in /usr/local/lib/node_modules/

To find the plugin folder on your system, do:

where HomeBridge

navigate to that folder, then do:

ls -l

and look for the HomeBridge entry, which will probably be a link to another location. Navigate there and you should be in the right place.

Post back here if you get stuck.

Thnx. Yes, that is the place where my plugins are. But now nano platform.js doesn't show any code:

pi@homebridge:/usr/local/lib/node_modules $ ls -l total 32 drwxr-xr-x 4 root root 4096 Dec 1 19:08 corepack drwxr-xr-x 3 root root 4096 Dec 12 09:50 @homebridge drwxr-xr-x 5 root root 4096 Dec 31 14:47 homebridge drwxr-xr-x 5 root root 4096 Dec 31 13:59 homebridge-config-ui-x drwxr-xr-x 6 root root 4096 Jan 3 14:40 homebridge-eufy-security drwxr-xr-x 3 root root 4096 Jan 1 18:24 homebridge-http-curtain drwxr-xr-x 4 root root 4096 Dec 31 14:21 homebridge-nest drwxr-xr-x 7 root root 4096 Dec 12 09:48 npm pi@homebridge:/usr/local/lib/node_modules $ nano platform.js pi@homebridge:/usr/local/lib/node_modules $

What am I missing?

Mikez20 commented 2 years ago

can you try the latest beta? I've added the ability to select the country within the settings menu.

Check. Just loaded the beta and changed the country code. Eufy doorbell cam still doesn't show up.

And you set the country code?

Yep. Absolutely and it was accepted.

schliemann commented 2 years ago

Yes, it can be hard to find! Mine is in /usr/local/lib/node_modules/ To find the plugin folder on your system, do: where HomeBridge navigate to that folder, then do: ls -l and look for the HomeBridge entry, which will probably be a link to another location. Navigate there and you should be in the right place. Post back here if you get stuck.

Thnx. Yes, that is the place where my plugins are. But now nano platform.js doesn't show any code:

pi@homebridge:/usr/local/lib/node_modules $ ls -l total 32 drwxr-xr-x 4 root root 4096 Dec 1 19:08 corepack drwxr-xr-x 3 root root 4096 Dec 12 09:50 @homebridge drwxr-xr-x 5 root root 4096 Dec 31 14:47 homebridge drwxr-xr-x 5 root root 4096 Dec 31 13:59 homebridge-config-ui-x drwxr-xr-x 6 root root 4096 Jan 3 14:40 homebridge-eufy-security drwxr-xr-x 3 root root 4096 Jan 1 18:24 homebridge-http-curtain drwxr-xr-x 4 root root 4096 Dec 31 14:21 homebridge-nest drwxr-xr-x 7 root root 4096 Dec 12 09:48 npm pi@homebridge:/usr/local/lib/node_modules $ nano platform.js pi@homebridge:/usr/local/lib/node_modules $

What am I missing?

You should navigate into homebridge-eufy-security

cd homebridge-eufy-security

Mikez20 commented 2 years ago

Yep. Thats what I thought. So I tried that, but still no code shows up when I do nano platform.js

Mikez20 commented 2 years ago

can you try the latest beta? I've added the ability to select the country within the settings menu.

Check. Just loaded the beta and changed the country code. Eufy doorbell cam still doesn't show up.

And you set the country code?

Yep. Absolutely and it was accepted.

Hhhmmmm, just checked the startup log and country still says US. So I afraid it works in the UI but is still not set right in the code.

fullphat commented 2 years ago

Yep. Thats what I thought. So I tried that, but still no code shows up when I do nano platform.js

Once you're in that folder, navigate to "dist" - it should be in there.

lenoxys commented 2 years ago

Yep. Thats what I thought. So I tried that, but still no code shows up when I do nano platform.js

Once you're in that folder, navigate to "dist" - it should be in there.

I've removed the static value from the beta so it's based on the config now

lenoxys commented 2 years ago

can you try the latest beta? I've added the ability to select the country within the settings menu.

Check. Just loaded the beta and changed the country code. Eufy doorbell cam still doesn't show up.

Can you do the wizard again and send me yours full logs ? eufy-plugin@secugrator.com

Mikez20 commented 2 years ago

can you try the latest beta? I've added the ability to select the country within the settings menu.

Check. Just loaded the beta and changed the country code. Eufy doorbell cam still doesn't show up.

Can you do the wizard again and send me yours full logs ? eufy-plugin@secugrator.com

Just send you the logfile.

Mikez20 commented 2 years ago

Yep, thats it. There it is. But now I can't change the country setting because I have no permission. Is there a solution for that?

lenoxys commented 2 years ago

Yep, thats it. There it is. But now I can't change the country setting because I have no permission. Is there a solution for that?

looks like browser issue : works on chrome but not on safari

Mikez20 commented 2 years ago

Sorry, just tried chrome but I keep getting the warning that platform.js is unwritable. I can find the country setting in the code and I can overwrite it, but I can't save it.

fullphat commented 2 years ago

Try:

sudo nano platform.js

I'm surprised you'd need root permissions, but it's worth a try.

Mikez20 commented 2 years ago

Aha, that was it. Now I could change the code and set country to NL. Unfortunately Homebridge is still not seeing my Eufy doorbell. After restarting Homebridge this is what the log says:

[04/01/2022, 16:55:07] [homebridge-eufy-security] Country set: NL

So it looks like that is oke now.

fullphat commented 2 years ago

Could try "DK" - that seemed to work for someone else on here.

However, I'm in the U.K. and I've never changed my country code so I'm not sure this is the cause of your issue.

schliemann commented 2 years ago

Could try "DK" - that seemed to work for someone else on here.

However, I'm in the U.K. and I've never changed my country code so I'm not sure this is the cause of your issue.

I live in DK and having US as country has always worked.

lenoxys commented 2 years ago

Aha, that was it. Now I could change the code and set country to NL. Unfortunately Homebridge is still not seeing my Eufy doorbell. After restarting Homebridge this is what the log says:

[04/01/2022, 16:55:07] [homebridge-eufy-security] Country set: NL

So it looks like that is oke now.

there is something wrong with your install, we shouldn't edit file using sudo not safe at all.

lenoxys commented 2 years ago

Could try "DK" - that seemed to work for someone else on here. However, I'm in the U.K. and I've never changed my country code so I'm not sure this is the cause of your issue.

I live in DK and having US as country has always worked.

Sometimes to see devices shared by other during troubleshooting I had to change the country but it's a matter of being part of Americas, Europe, Middle-east, Africa, Japan, APAC. Dunno when it's needed and when it's not.

Mikez20 commented 2 years ago

I'll try DK and see what happens.

Mikez20 commented 2 years ago

No luck with the DK setting. I've been looking at the log file myself and it looks like somehow underwater there is still the US setting. Enclosed a piece of the log after I changed country setting in the code to NL (line 46). Immediately after restarting Homebridge the log says that country is US and there are no devices found (line 2 and on). Thats weird, right?

homebridge.log.txt

lenoxys commented 2 years ago

No luck with the DK setting. I've been looking at the log file myself and it looks like somehow underwater there is still the US setting. Enclosed a piece of the log after I changed country setting in the code to NL (line 46). Immediately after restarting Homebridge the log says that country is US and there are no devices found (line 2 and on). Thats weird, right?

homebridge.log.txt

can you clear the cache of your browser ? Looks like the js script is the old one.

Mikez20 commented 2 years ago

Hhhmmm, clearing the cache solved a lot of problems with de Nest plugin and after restarting homebridge all log entry's say NL. So it seems you where right, there was something hanging in the cache. I do see a new log entry popup. 15 min. after restarting homebridge I now get the message "Push Closed!" (in orange colour). I never seen that before. During startup I see a INFO log entry that states "Push notification connection successfully established". I don't know how important this function is.

Next to that homebridge-eufy-security is still not learning any devices.

Mikez20 commented 2 years ago

I saw in earlier posts that 2FA might have something to do with not seeing devices. So I activated 2FA, but no result. Does anybody have an other idea?

schliemann commented 2 years ago

@Mikez20 please try and set enabledetailedlogging to 2 and provide the complete log.

Mikez20 commented 2 years ago

@schliemann, First of all thnx for your patience and sticking with me in my surge for the problem. I think I managed to get the log you asked for. Let me know if you can read the file and what your findings are.

homebridge.log 09012022.txt

schliemann commented 2 years ago

@Mikez20 It's difficult to say. We don't quite know why some peoples installations have problems finding devices.