bropat / eufy-security-client

This shared library allows to control Eufy security devices by connecting to the Eufy cloud servers and local/remote stations over p2p.
MIT License
480 stars 69 forks source link

[Bug]: getting NULL when getting list of devices. #91

Closed rangerek closed 2 years ago

rangerek commented 2 years ago

Client version

1.5.0

Node version

14.15.4

Operating System type

Linux

Operating system version

Ubuntu

Describe the bug

when using HB plugin using your client it doesnt find any devices assigned to that account - they closed my ticket as it looks like sth with your client they say https://github.com/samemory/homebridge-eufy-security/issues/304

To reproduce

  1. Go to '...'
  2. Click on '...'
  3. Scroll down to '....'
  4. See error

Screenshots & Logfiles

12/24/2021, 12:54:31 PM] [EufySecurity-1.0.8] DEBUG: Stations - Response: { code: 0, msg: 'Succeed.', data: null } [12/24/2021, 12:54:31 PM] [EufySecurity-1.0.8] INFO: No stations found. [12/24/2021, 12:54:31 PM] [EufySecurity-1.0.8] DEBUG: Request: { method: 'post', endpoint: 'v1/app/get_devs_list', baseUrl: 'https://security-app.eufylife.com', token: 'xxx', data: { device_sn: '', num: 1000, orderby: '', page: 0, station_sn: '', time_zone: 3600000, transaction: '1640346871793' }, headers: { app_version: 'v3.3.1_1058', os_type: 'android', os_version: '30', phone_model: 'EUFYCLIENT', country: 'US', language: 'en', openudid: '442aac8b42e150ef', uid: '', net_type: 'wifi', mnc: '02', mcc: '262', sn: 'b3b4bc497c96', Model_type: 'PHONE', timezone: 'GMT+01:00', 'Cache-Control': 'no-cache', 'X-Auth-Token': 'xxx' } } [12/24/2021, 12:54:31 PM] [EufySecurity-1.0.8] DEBUG: Response: { code: 0, msg: 'ok', data: { list: [] } } [12/24/2021, 12:54:31 PM] [EufySecurity-1.0.8] DEBUG: Save cloud token and token expiration { token: 'xxx', tokenExpiration: 2022-01-21T21:18:33.000Z } [12/24/2021, 12:54:31 PM] [EufySecurity-1.0.8] DEBUG: Login with previous push credentials... { fidResponse: { name: 'projects/348804314802/installations/dJkvMpR5yTGBT7yyXPtMhU', fid: 'dJkvMpR5yTGBT7yyXPtMhU', refreshToken: 'xxx', authToken: { token: 'xxx', expiresIn: '604800s', expiresAt: 1640812125906 } }, checkinResponse: { statsOk: true, timeMs: '1640346799235', androidId: '3463518376255236960', securityToken: 'xxx', versionInfo: 'k3o7GO5GTawYUO6eTSP7b7WYw5zE3hc', deviceDataVersionInfo: 'ABFEt1XWiZEVcFLhSFlAbqAa8djMwd2b_VtC6B5qo8GYHCwjbOjWWQ46xJ0XoZHw6VvGGeFN7_rsGitOnjEBBFPHS8t7pF04e3i54-b_mZ26Ki4WVIy1ffuqJ7dlV_oWjz3NzaBEuoN0vC8vDwc5E_YBl5yudg-ZFeOgKFo6WqpHiCkM1hSpE9B5z9wcTizUwp8PWK9dCHAW8QMI8F3kLJgrH3m8eGlSWl16vfhP9IxMUa9PbFomXykz9R6rqrLdZQXSSxXxFgvvOS0guypJkV1cWrS8iboJbKfKFFTKP7bCrc1D08KZ85ShRu7VCb6cskWCRgxDA8lb1O3ZckIjPI_Xpxa5s4eGi3vs9JKumA-qFIFXXQnpipU' }, gcmResponse: { token: 'xxx' } } [12/24/2021, 12:54:31 PM] [EufySecurity-1.0.8] DEBUG: Request: { method: 'post', endpoint: 'v1/app/get_hub_list', baseUrl: 'https://security-app.eufylife.com', token: 'xxx', data: { device_sn: '', num: 1000, orderby: '', page: 0, station_sn: '', time_zone: 3600000, transaction: '1640346871833' }, headers: { app_version: 'v3.3.1_1058', os_type: 'android', os_version: '30', phone_model: 'EUFYCLIENT', country: 'US', language: 'en', openudid: '442aac8b42e150ef', uid: '', net_type: 'wifi', mnc: '02', mcc: '262', sn: 'b3b4bc497c96', Model_type: 'PHONE', timezone: 'GMT+01:00', 'Cache-Control': 'no-cache', 'X-Auth-Token': 'xxx' } } [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] DEBUG: Devices - Response: { code: 0, msg: 'Succeed.', data: null } [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] INFO: No devices found. [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] DEBUG: Found 0 stations. [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] DEBUG: Found 0 devices. [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] DEBUG: Stations - Response: { code: 0, msg: 'Succeed.', data: null } [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] INFO: No stations found. [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] DEBUG: Request: { method: 'post', endpoint: 'v1/app/get_devs_list', baseUrl: 'https://security-app.eufylife.com', token: 'xxx', data: { device_sn: '', num: 1000, orderby: '', page: 0, station_sn: '', time_zone: 3600000, transaction: '1640346872427' }, headers: { app_version: 'v3.3.1_1058', os_type: 'android', os_version: '30', phone_model: 'EUFYCLIENT', country: 'US', language: 'en', openudid: '442aac8b42e150ef', uid: '', net_type: 'wifi', mnc: '02', mcc: '262', sn: 'b3b4bc497c96', Model_type: 'PHONE', timezone: 'GMT+01:00', 'Cache-Control': 'no-cache', 'X-Auth-Token': 'xxx' } }

[12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] DEBUG: Devices - Response: { code: 0, msg: 'Succeed.', data: null } [12/24/2021, 12:54:32 PM] [EufySecurity-1.0.8] INFO: No devices found. [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Login response: GCM -> logged in -> waiting for push messages... [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Request: { method: 'post', endpoint: 'v1/apppush/register_push_token', baseUrl: 'https://security-app.eufylife.com', token: 'xxx', data: { is_notification_enable: true, token: 'xxx', transaction: '1640346873269' }, headers: { app_version: 'v3.3.1_1058', os_type: 'android', os_version: '30', phone_model: 'EUFYCLIENT', country: 'US', language: 'en', openudid: '442aac8b42e150ef', uid: '', net_type: 'wifi', mnc: '02', mcc: '262', sn: 'b3b4bc497c96', Model_type: 'PHONE', timezone: 'GMT+01:00', 'Cache-Control': 'no-cache', 'X-Auth-Token': 'xxx' } } [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: IqStanza: Not implemented { tag: 7, object: { type: 'SET', id: '', extension: { id: 12, data: } } } [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Response: { code: 0, msg: 'Succeed.' } [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Push token registered successfully [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Request: { method: 'post', endpoint: 'v1/app/review/app_push_check', baseUrl: 'https://security-app.eufylife.com', token: 'xxx', data: { app_type: 'eufySecurity', transaction: '1640346873472' }, headers: { app_version: 'v3.3.1_1058', os_type: 'android', os_version: '30', phone_model: 'EUFYCLIENT', country: 'US', language: 'en', openudid: '442aac8b42e150ef', uid: '', net_type: 'wifi', mnc: '02', mcc: '262', sn: 'b3b4bc497c96', Model_type: 'PHONE', timezone: 'GMT+01:00', 'Cache-Control': 'no-cache', 'X-Auth-Token': 'xxx' } } [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Response: { code: 0, msg: 'Succeed.' } [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Push token OK [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] INFO: Push notification connection successfully established [12/24/2021, 12:54:33 PM] [EufySecurity-1.0.8] DEBUG: Push Connected!

Additional context

No response

bropat commented 2 years ago

I don't see a bug here. Furthermore, the Eufy Cloud here says that this account has no devices assigned to it.

Sometimes when this problem occurs, it has helped to share the devices again with admin rights in the Eufy app.