fuatakgun/eufy_security

Homebase3 (s380) chime api call not working

Opened this issue · 3 comments

Trying to send the chime command call via the API to an S380 home base when a driveway sensor outside the eufy ecosystem pops off, The client trace returns 'device_not_supported'. To isolate, wrote some python directly call the ws client api. Can send an alarm command and have it go off just fine, but not chime the base station.

With logging set to debug, the relevant portion of the trace:

    await self._api.chime(ProductType.station, Config.station, ringtone)
  File "~/eufy/eufy_security_api/api_client.py", line 258, in chime
    await self._send_message_get_response(OutgoingMessage(OutgoingMessageType.chime, serial_no=serial_no, ringtone=ringtone))
  File "~/eufy/eufy_security_api/api_client.py", line 333, in _send_message_get_response
    return await future
eufy_security_api.exceptions.FailedCommandException: {'type': 'result', 'success': False, 'messageId': 'station.chime.344886388073415fbd86db61c58e51a1', 'errorCode': 'device_not_supported'}

Have yet to start digging around debug traces in the Node.js code, but it's acting like the API for an S380 is different. The eufy app has settings for Prompt Volume in the Audio Settings tab, and I can see it in the the dict as promptVolume, but there's another tab for Ringtone Settings , which has a switch for Homebase Alert, Homebase Ringtone Volume, and Homebase Alert Tones (which I take to be the ringtone int with metadata for 9 sounds plus default). None of these are in the api, so I figure these parameters are uncharted territory. So, Homebase Ringtone Volume, Homebase Alert Tones, and the command index to chime seem to be part of a newer schema.

I don't have the tools to sniff out the outgoing message type for the new chime command and the property for chime volume, if someone does, I can plug these into the test bench to see if they make it ring.

edit: Add eufy-security-ws trace:
`2024-04-17 04:20:31.555 ERROR eufy-security-ws Message error

NotSupportedError This functionality is not implemented or supported, , [object Object], NotSupportedError
error stack:
• station.ts Station.chimeHomebase
/node_modules/eufy-security-client/src/http/station.ts:9393
• message_handler.ts Function.handle
/src/lib/station/message_handler.ts:185
• task_queues processTicksAndRejections
internal/process/task_queues:95
• server.ts async Client.receiveMessage
/src/lib/server.ts:125
2024-04-17 04:20:32.163 INFO eufy-security-ws Client disconnected with ip: 127.0.0.1 port: 45660 code: 1006 reason: Abnormal Closure
`

Just tried this using the node.js interactive client, it appears to be a missing set of APIs on eufy-security-ws server related to S380. Issue filed over there, too... will report back as this progresses

Thanks, integration is mostly a pass through between node server and home assistant, so fixing it on node side would fix it here, hopefully

Related issue is here: bropat/eufy-security-ws#324