nonsleepr / ha-eufy-security

Custom integration of Home Assistant with EufySecurity
168 stars 44 forks source link

unable to log into integration #21

Open k-rock opened 3 years ago

k-rock commented 3 years ago

Hi! I had my eufy security up and working with Home Assistant for some time.. then it stopped working. I removed the component and re-installed it. I notice that I cannot log into the integration - it keeps prompting me for my username & password. I double checked my username & password which are correct.

eufy related items in my logs:

s➜ config git:(master) more home-assistant.log|grep eufy 2020-12-02 06:27:52 ERROR (MainThread) [custom_components.hacs.repository.integration.nonsleepr.ha-eufy-security] GitHub Ratelimit error 2020-12-02 06:27:52 ERROR (MainThread) [custom_components.hacs.factory] nonsleepr/ha-eufy-security - GitHub Ratelimit error 2020-12-02 07:17:13 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for eufy_security which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. ➜ config git:(master)

I am able to log into https://mysecurity.eufylife.com/#/camera to view my camera:

image

I see this after entering my username and password: image

belidi commented 3 years ago

the same thing at home

JuliusLedoux commented 3 years ago

Same thing for me. It is stuck asking for user name and password. I double verified and they are correct.

johannes281 commented 3 years ago

Same for me. No Login with primary eufy account possible. Login with account without devices works!

r77s commented 3 years ago

For me the same error. I try to login, the window for email and password is closing and reopen again.

kai-seipp commented 3 years ago

+1, this integration is currently broken with current home assistant instances I would say...

mischpoke commented 3 years ago

Same for me.

k-rock commented 3 years ago

Did you turn off 2fa? That fixed for me...

On Tue, Dec 15, 2020 at 6:15 PM mischpoke notifications@github.com wrote:

Same for me.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nonsleepr/ha-eufy-security/issues/21#issuecomment-745626046, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADXS3J7UZDBIZSSWWLTFP4DSU7UXRANCNFSM4UK4KFKA .

kai-seipp commented 3 years ago

Thanks for that hint! That actually did get me a bit further. I now could setup the integration. But now I get this error in my logs:

`Logger: homeassistant.components.camera Source: custom_components/eufy_security/camera.py:46 Integration: Camera (documentation, issues) First occurred: 1:00:57 (2 occurrences) Last logged: 1:02:06

Error while setting up eufy_security platform for camera Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/eufy_security/camera.py", line 31, in async_setup_entry [EufySecurityCam(hass, camera) for camera in api.cameras.values()], True File "/config/custom_components/eufy_security/camera.py", line 31, in [EufySecurityCam(hass, camera) for camera in api.cameras.values()], True File "/config/custom_components/eufy_security/camera.py", line 46, in init self._ffmpeg_image_frame = ImageFrame(self._ffmpeg.binary, loop=hass.loop) TypeError: init() got an unexpected keyword argument 'loop'`

chrmart5 commented 3 years ago

Turning off 2FA worked to get the integration set up but now I'm getting the same error logs as above. Tried on V 1.0.0b6 as well as 2020.12.7

davida72 commented 3 years ago

This fix worked for me.

Edit: fixed URL.

mydevbox commented 3 years ago

I had this integration working on my Rpi 4 hassio install but I recently purchased a HA Blue and started to migrate everything over. After installing via HACS I was able to get the integration to accept my credentials however, none of my cameras were being recognized. So, I uninstalled and reinstalled it via HACS. When I went into integration to try to install again, my credentials were no longer accepted. As soon as I type them in, it goes immediately back to prompting for them agian.

I tried the code fix suggested by @davida72 above however, that did not solve the issue for me. I would like to get this working again so will try the 2FA next. Hopefully, someone can figure out exactly what's happening.

mydevbox commented 3 years ago

After doing some testing with Postman, I noticed that I could get authenticated only if I added a space after my email address. I then tried to do the same in the integration and sure enough that got me passed the login loop.

Now, I am back to having the integration installed but no camera entities listed. I even added the code-fix back but still no luck.

mydevbox commented 3 years ago

I was able to get my cameras working again. Turned out that the code edit had a TAB in it instead of 8 spaces. As soon as I corrected that and restarted HA, my camera entities appeared. Though, I am now getting bunch of warnings in the logs as shown below.

Here's what fixed it for me:

  1. Had to add a space to the end of my email at the prompt. I'm not sure if I added the space when creating my account or if that's Eufy's issue
  2. Had to apply the code fix that @davida72 listed https://community.home-assistant.io/t/eufy-camera-integration/121758/383?u=davida72

2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1186", value "�����������"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1230", value "100"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1045", value "0"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1246", value "0"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1141", value "-55"```
akeslo commented 3 years ago

I was able to get my cameras working again. Turned out that the code edit had a TAB in it instead of 8 spaces. As soon as I corrected that and restarted HA, my camera entities appeared. Though, I am now getting bunch of warnings in the logs as shown below.

Here's what fixed it for me:

  1. Had to add a space to the end of my email at the prompt. I'm not sure if I added the space when creating my account or if that's Eufy's issue
  2. Had to apply the code fix that @davida72 listed https://community.home-assistant.io/t/eufy-camera-integration/121758/383?u=davida72
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1186", value "�����������"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1230", value "100"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1045", value "0"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1246", value "0"
2021-01-02 16:06:51 WARNING (MainThread) [eufy_security.camera] Unable to process parameter "1141", value "-55"```

This got me back up and running, thank you.

k-rock commented 3 years ago

I keep seeing the following errors in my logs.. . any suggestions for fixing this?

2021-01-09 21:21:36 ERROR (MainThread) [homeassistant.components.camera] Error while setting up eufy_security platform for camera File "/config/custom_components/eufy_security/camera.py", line 31, in async_setup_entry File "/config/custom_components/eufy_security/camera.py", line 31, in File "/config/custom_components/eufy_security/camera.py", line 46, in init

moccajava commented 3 years ago

I confirm that I had to disable 2FA to allow HACS integration login to succeed. Hope the 2FA issue can be fixed.

genebean commented 3 years ago

For those turning off 2FA - does turning it back on break things?

genebean commented 3 years ago

https://github.com/FuzzyMistborn/python-eufy-security/issues/57 documents why 2FA is failing and what is needed to fix it - I just don't know enough about the code to create the fix myself. Here's hoping someone here might be able to take the flow I document there and codify it for use in Home Assistant (or elsewhere)