fuatakgun / eufy_security

Home Assistant integration to manage Eufy Security devices as cameras, home base stations, doorbells, motion and contact sensors.
922 stars 76 forks source link

Failed to setup, after update to 2023.6.1 - schema_incompatible #809

Closed Raarrrinator closed 1 year ago

Raarrrinator commented 1 year ago

Good evening,

I just updated to 2023.6.1 and after rebooting all integrations where available except for Eufy Security.

It displayed "Failed to setup"

schema_incompatible is a term mentioned in all logs.


System log shows the following:

Logger: homeassistant.config_entries Source: custom_components/eufy_security/eufy_security_api/api_client.py:350 Integration: Eufy Security (documentation, issues) First occurred: 22:40:42 (1 occurrences) Last logged: 22:40:42

Error setting up entry 127.0.0.1 for eufy_security Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/eufy_security/init.py", line 50, in async_setup_entry await coordinator.initialize() File "/config/custom_components/eufy_security/coordinator.py", line 39, in initialize await self._api.connect() File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 72, in connect await self._set_schema(SCHEMA_VERSION) File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 150, in _set_schema await self._send_message_get_response(OutgoingMessage(OutgoingMessageType.set_api_schema, schema_version=schema_version)) File "/config/custom_components/eufy_security/eufy_security_api/api_client.py", line 350, in _send_message_get_response return await future ^^^^^^^^^^^^ custom_components.eufy_security.eufy_security_api.exceptions.FailedCommandException: {'type': 'result', 'success': False, 'messageId': 'set_api_schema.35829526b70542579bff45dbfc597811', 'errorCode': 'schema_incompatible'}


When checking the logs of the Eufy Security add-on the following is found:

2023-06-11 20:36:11.712 INFO Authentication properties changed, invalidate saved cloud token. 2023-06-11 20:36:19.543 INFO Eufy Security server listening on host 0.0.0.0, port 3000 2023-06-11 20:36:29.777 INFO Push notification connection successfully established 2023-06-11 20:36:29.862 INFO Connected to station T8410P3121361F9F on host 192.168.3.208 and port 27828 2023-06-11 20:36:29.868 INFO Connected to station T8200N0021121A14 on host 192.168.3.113 and port 19679 2023-06-11 20:36:36.754 ERROR Message error Error
details: { schemaId: 17, errorCode: 'schema_incompatible' } error stack: • server.ts:91 receiveMessage src/lib/server.ts:91:27 • server.ts:68 src/lib/server.ts:68:53 • node:events:513 emit node:events:513:28 • websocket.js:1178 receiverOnMessage node_modules/ws/lib/websocket.js:1178:20 • node:events:513 emit node:events:513:28 • receiver.js:528 dataMessage node_modules/ws/lib/receiver.js:528:14 • receiver.js:446 getData node_modules/ws/lib/receiver.js:446:17 • receiver.js:148 startLoop node_modules/ws/lib/receiver.js:148:22 • receiver.js:83 _write node_modules/ws/lib/receiver.js:83:10 • writable:391 writeOrBuffer node:internal/streams/writable:391:12


I tried completely removing the integration, add-on and HACS integration, rebooting and reinstalling but the error remains,

Info:

Home Assistant 2023.6.1 Supervisor 2023.06.1 Operating System 10.2 Frontend 20230608.0 - latest Eufy Security Add-on Version 1.3.0 Eufy Security Integration Version latest available

If you need more, please let me know,.

Thank you advance for your support!

fuatakgun commented 1 year ago

you should migrate into bropat's version of add-on. eufy-security-ws - Current version: 1.5.2 (Changelog)

tempus2016 commented 1 year ago

you should migrate into bropat's version of add-on. eufy-security-ws - Current version: 1.5.2 (Changelog)

is this the best option? Move away from this component to the other?

fuatakgun commented 1 year ago

@tempus2016 , there are two components, one custom component (integration) and one add-on.

Earlier, i was managing both but now bropat is managing add-on and i own the custom component. So i am asking you to migrate add-on but keep the custom component. What's wrong with this approach?

tempus2016 commented 1 year ago

@tempus2016 , there are two components, one custom component (integration) and one add-on.

Earlier, i was managing both but now bropat is managing add-on and i own the custom component. So i am asking you to migrate add-on but keep the custom component. What's wrong with this approach?

There's nothing wrong with it. I'm just confirming that this is what you meant. Migrate to the other addon.

PutoPunko commented 1 year ago

Hi @fuatakgun,

I've been redirected from #810. I can't add Bropat repository to HA addons. Is there any migration guide from one to the other? Are you stopping this addon development? If yes, then I suggest you add a note to avoid too many questions ;)

Thanks,

PutoPunko commented 1 year ago

Forget my last post. I installed it with https://github.com/bropat/hassio-eufy-security-ws

fuatakgun commented 1 year ago

Actually, I had updated the README very long ago but there is no proper way to inform all users regarding to discontinuing an add-on other than releasing a new version :) anyway, updated the respective repository with a warning.

bajwamar commented 1 year ago

@fuatakgun

Earlier, i was managing both but now bropat is managing add-on and i own the custom component. So i am asking you to migrate add-on but keep the custom component. What's wrong with this approach?

I have migrated the add-on from yours to bropat and my camera is working find and my door lock is reporting the correct status but I cannot open or close the lock therefore, my automations are not running

kaystrobach commented 1 year ago

the migration solved most of the issues - awesome. - Maybe it makes sense to add a release of your addon and simply post a message all the time into the notifications to migrate the plugin

bramschats commented 1 year ago

I have a homebase and the doorbell from eufy and am experiencing the same behaviour. It has worked before the updates.

installed Eufy security v6.3.1 installed Home assistant 2023.7.2 installed add-on from bropat

getting this error from the bropat add-on log:

2023-07-18 09:52:32.561  ERROR Message error 
 Error  
details:
{
  schemaId: 17,
  errorCode: 'schema_incompatible'
}
error stack:
• server.ts:91 receiveMessage
    src/lib/server.ts:91:27
• server.ts:68 <anonymous>
    src/lib/server.ts:68:53
• node:events:513 emit
    node:events:513:28
• websocket.js:1178 receiverOnMessage
    node_modules/ws/lib/websocket.js:1178:20
• node:events:513 emit
    node:events:513:28
• receiver.js:528 dataMessage
    node_modules/ws/lib/receiver.js:528:14
• receiver.js:446 getData
    node_modules/ws/lib/receiver.js:446:17
• receiver.js:148 startLoop
    node_modules/ws/lib/receiver.js:148:22
• receiver.js:83 _write
    node_modules/ws/lib/receiver.js:83:10
• writable:391 writeOrBuffer
    node:internal/streams/writable:391:12

No entities show from the integration: Failed to setup...

bramschats commented 1 year ago

My fault... although I installed the new add-on it seems it was still the old one... Changed it and working again! thnx

vaderag commented 1 year ago

Sorry if this is a dumb question - I'm a little bit confused... what does "migrating" involve? I still see this addon in HACS but am getting the error image

Uninstalling this addon and installing this addon? Isn't that going to break all the flows we have? Is there a more seamless way?

EDIT: For anyone wondering, I went ahead and did this:

It appears to have worked and retained settings (although not fully tested)

1h8fulkat commented 1 year ago

Sorry if this is a dumb question - I'm a little bit confused... what does "migrating" involve? I still see this addon in HACS but am getting the error image

Uninstalling this addon and installing this addon? Isn't that going to break all the flows we have? Is there a more seamless way?

EDIT: For anyone wondering, I went ahead and did this:

  • Install the new addon
  • Configured, copying information from the old addon before starting
  • Stopped the old addon before starting
  • Started the new addon
  • Reloaded the Eufy integration

It appears to have worked and retained settings (although not fully tested)

Thank you, my add-in was incorrect, this fixed my issue. I don't know why this was so difficult to get an answer to.