Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alarm state of Indoor 2K camera is not changed via Home app #161

Closed
njuart opened this issue Jun 1, 2022 · 11 comments
Closed

Alarm state of Indoor 2K camera is not changed via Home app #161

njuart opened this issue Jun 1, 2022 · 11 comments
Assignees
Labels
bug Something isn't working fixed

Comments

@njuart
Copy link

njuart commented Jun 1, 2022

Client version

2.0.1

Node version

16.15.0

Operating System type

Linux

Operating system version

Raspbian 11

Describe the bug

Hi, hope I’m addressing issue in a right way. In my setup I’m using Indoor 2K camera integrated into Homekit via Homebridge Eufy Security plugin. Recently one weird problem appeared. When I change alarm state of camera to one of the options (away, home etc.) it doesn’t change and gets stuck in infinite arming loop. But when I immediately open Eufy app and check if state is changed there (and it’s actually changed) and then go back to Home app I see that state now changed there also. It happens every time. I don’t have this problem with arming Homebase 2. We’ve made some testing and research here homebridge-eufy-security/plugin#38 and came to a conclusion that issue is not related to plugin itself, but may be somehow related to Eufy Security Client. So maybe there are any suggestions regarding this. Thx in advance.

To reproduce

  1. Arm Indoor 2K camera alarm in Home app (via Homebridge Eufy Security plugin
  2. See infinite arming loop
  3. Go to Eufy app
  4. Check guard state there
  5. See it changed
  6. Go back to Home app
  7. See it’s changed there also

Screenshots & Logfiles

4359519C-413F-46DC-94E0-8B44F8399705

Additional context

Additional investigation can be found here homebridge-eufy-security/plugin#38

@njuart njuart added the bug Something isn't working label Jun 1, 2022
@bropat bropat self-assigned this Jun 12, 2022
@bropat bropat added the fixed in next version Fixed in the code of the next release label Jun 12, 2022
bropat added a commit that referenced this issue Jun 12, 2022
@bropat bropat added fixed and removed fixed in next version Fixed in the code of the next release labels Jun 12, 2022
@bropat bropat closed this as completed Jun 12, 2022
@thieren
Copy link
Contributor

thieren commented Jun 12, 2022

Hey @bropat

Just checked with @njuart and unfortunately this doesn't seem to fix the issue. Any other ideas?

@bropat
Copy link
Owner

bropat commented Jun 12, 2022

Then I need the debug logs from @njuart (eufy-security-client).

@bropat bropat reopened this Jun 12, 2022
@thieren
Copy link
Contributor

thieren commented Jun 12, 2022

Sure. Will check with him and we'll provide the logs

@thieren
Copy link
Contributor

thieren commented Jun 13, 2022

Here are the logs:

the one from @njuart where the guard mode change is not recognised:

2022-06-13T09:16:00.769Z - DEBUG: Push token OK
2022-06-13T09:16:00.769Z - INFO: Push notification connection successfully established
2022-06-13T09:16:19.069Z - DEBUG: Sending guard mode command to station T8400P************ with value: AWAY
2022-06-13T09:16:19.069Z - DEBUG: Using CMD_SET_ARMING for station T8400P************
2022-06-13T09:16:19.071Z - DEBUG: Sending p2p command...{"station":"T8400P************","sequence":1,"commandType":1224,"channel":255,"retries":0,"messageStatesSize":1}
2022-06-13T09:16:19.078Z - DEBUG: Station T8400P************ - ACK DATA - received from host 192.168.1.107:17082 for sequence 1
2022-06-13T09:16:19.345Z - DEBUG: Station T8400P************ - DATA DATA - received from host 192.168.1.107:17082 - Processing sequence 1...
2022-06-13T09:16:19.345Z - DEBUG: Station T8400P************ - Received data{"seqNo":1,"header":{"commandId":1224,"bytesToRead":132,"channel":255,"signCode":0,"type":1},"bytesRead":132,"bytesToRead":132,"firstPartMessage":true,"messageSize":148}
2022-06-13T09:16:19.345Z - DEBUG: Station T8400P************ - Received data{"commandIdName":"CMD_SET_ARMING","commandId":1224,"resultCodeName":"ERROR_PPCS_SUCCESSFUL","resultCode":0,"message":"\u0000\u0000\u0000\u0000\u0018��\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000��\u0001\u0000\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000�P�\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000�C\u0002�\u0010\u0000\u0000\u0000\u0000�\u0001\u0000\u0000\u0000\u0000\u0000\u0003\u0003\u0000\u0000","data":"00000000000000001881c601000000000000000000000000000000000000000000000000000000000000000000000000e8ecb6010000000001000000000000000000000000000000000000000000000000000000d850dd01000000000000000000000000000000000000000000000000f743028710000000009001000000000003030000"}
2022-06-13T09:16:19.346Z - DEBUG: Station T8400P************ - Result data for command received{"messageState":{"sequence":1,"commandType":1224,"channel":255,"data":{"type":"Buffer","data":[209,0,0,1,88,90,89,72,200,4,132,0,0,0,1,0,255,0,0,0,0,0,0,0,57,56,53,55,98,57,57,100,50,51,97,102,97,100,97,54,51,98,56,57,56,97,51,100,53,102,100,49,102,55,101,102,48,56,49,102,52,54,51,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"retries":0,"acknowledged":true,"returnCode":-133,"property":{"name":"guardMode","value":0},"timeout":{"_idleTimeout":-1,"_idlePrev":null,"_idleNext":null,"_idleStart":69305,"_onTimeout":null,"_repeat":null,"_destroyed":true}},"resultCodeName":"ERROR_PPCS_SUCCESSFUL","resultCode":0}
2022-06-13T09:16:19.346Z - DEBUG: Got p2p command response{"station":"T8400P************","commandType":1224,"channel":255,"returnCodeName":"ERROR_PPCS_SUCCESSFUL","returnCode":0,"property":{"name":"guardMode","value":0}}
2022-06-13T09:16:19.346Z - DEBUG: Station T8400P************ - DATA DATA - Received expected sequence (seqNo: 1 queuedData.size: 0)

And one from me. Here it works flawlessly:

2022-06-13T09:34:10.527Z - DEBUG: Push token OK
2022-06-13T09:34:10.527Z - INFO: Push notification connection successfully established
2022-06-13T09:34:27.703Z - DEBUG: Sending guard mode command to station T8010P************ with value: AWAY
2022-06-13T09:34:27.704Z - DEBUG: Using CMD_SET_PAYLOAD for station T8010P************{"main_sw_version":"3.1.9.0h"}
2022-06-13T09:34:27.710Z - DEBUG: Sending p2p command...{"station":"T8010P************","sequence":0,"commandType":1350,"channel":255,"retries":0,"messageStatesSize":1}
2022-06-13T09:34:27.753Z - DEBUG: Station T8010P************ - ACK DATA - received from host **.**.***.*:10134 for sequence 0
2022-06-13T09:34:28.190Z - DEBUG: Station T8010P************ - DATA DATA - received from host **.**.***.*:10134 - Processing sequence 0...
2022-06-13T09:34:28.192Z - DEBUG: Station T8010P************ - Received data{"seqNo":0,"header":{"commandId":1350,"bytesToRead":132,"channel":255,"signCode":0,"type":1},"bytesRead":132,"bytesToRead":132,"firstPartMessage":true,"messageSize":148}
2022-06-13T09:34:28.194Z - DEBUG: Station T8010P************ - Received data{"commandIdName":"CMD_SET_PAYLOAD","commandId":1350,"resultCodeName":"ERROR_PPCS_SUCCESSFUL","resultCode":0,"message":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","data":"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}
2022-06-13T09:34:28.194Z - DEBUG: Station T8010P************ - Result data for command received{"messageState":{"sequence":0,"commandType":1350,"nestedCommandType":1224,"channel":255,"data":{"type":"Buffer","data":[209,0,0,0,88,90,89,72,70,5,121,0,0,0,1,0,255,0,0,0,123,34,97,99,99,111,117,110,116,95,105,100,34,58,34,52,102,102,50,51,56,49,102,98,50,56,97,101,97,54,56,53,99,52,102,101,101,50,98,53,54,100,50,50,48,56,98,97,102,102,54,98,100,102,97,34,44,34,99,109,100,34,58,49,50,50,52,44,34,109,86,97,108,117,101,51,34,58,48,44,34,112,97,121,108,111,97,100,34,58,123,34,109,111,100,101,95,116,121,112,101,34,58,48,44,34,117,115,101,114,95,110,97,109,101,34,58,34,34,125,125]},"retries":0,"acknowledged":true,"returnCode":-133,"property":{"name":"guardMode","value":0},"timeout":{"_idleTimeout":-1,"_idlePrev":null,"_idleNext":null,"_idleStart":27533,"_onTimeout":null,"_repeat":null,"_destroyed":true}},"resultCodeName":"ERROR_PPCS_SUCCESSFUL","resultCode":0}
2022-06-13T09:34:28.195Z - DEBUG: Got p2p command response{"station":"T8010P************","commandType":1224,"channel":255,"returnCodeName":"ERROR_PPCS_SUCCESSFUL","returnCode":0,"property":{"name":"guardMode","value":0}}
2022-06-13T09:34:28.198Z - DEBUG: Station T8010P************ - DATA DATA - Received expected sequence (seqNo: 0 queuedData.size: 0)
2022-06-13T09:34:28.200Z - DEBUG: Station T8010P************ - DATA CONTROL - received from host **.**.***.*:10134 - Processing sequence 0...
2022-06-13T09:34:28.200Z - DEBUG: Station T8010P************ - Received data{"seqNo":0,"header":{"commandId":1151,"bytesToRead":8,"channel":255,"signCode":0,"type":0},"bytesRead":8,"bytesToRead":8,"firstPartMessage":true,"messageSize":24}
2022-06-13T09:34:28.201Z - DEBUG: Station T8010P************ - Alarm mode changed to: AWAY
2022-06-13T09:34:28.202Z - INFO: Alarm mode for station T8010P************ changed to: AWAY

@bropat
Copy link
Owner

bropat commented Jun 14, 2022

It looks like the T8400 does not give this feedback over the P2P connection, unlike e.g. T8010 or T8002:

2022-06-13T09:34:28.200Z - DEBUG: Station T8010P************ - DATA CONTROL - received from host **.**.***.*:10134 - Processing sequence 0...
2022-06-13T09:34:28.200Z - DEBUG: Station T8010P************ - Received data{"seqNo":0,"header":{"commandId":1151,"bytesToRead":8,"channel":255,"signCode":0,"type":0},"bytesRead":8,"bytesToRead":8,"firstPartMessage":true,"messageSize":24}

Or only this part is missing in the log extract above ;)
Would it be possible to get a complete log?

@Palmke
Copy link
Contributor

Palmke commented Jun 14, 2022

I also make the same observation in my T8140's.
Only when opening the app I see it updates. So the eufy app itself also needs to poll the information from the device.

It appears the homebase is more talkative because of the alarm system it providers. Hence the recent adoptations of alarm armed/delay events in this repository. It must send out this data for the external monitoring service eufy providers in some markets.

@thieren
Copy link
Contributor

thieren commented Jun 14, 2022

It looks like the T8400 does not give this feedback over the P2P connection, unlike e.g. T8410 or T8010:

2022-06-13T09:34:28.200Z - DEBUG: Station T8010P************ - DATA CONTROL - received from host **.**.***.*:10134 - Processing sequence 0...
2022-06-13T09:34:28.200Z - DEBUG: Station T8010P************ - Received data{"seqNo":0,"header":{"commandId":1151,"bytesToRead":8,"channel":255,"signCode":0,"type":0},"bytesRead":8,"bytesToRead":8,"firstPartMessage":true,"messageSize":24}

Or only this part is missing in the log extract above ;) Would it be possible to get a complete log?

Actually both are the last log messages of the logs. So no additional output we could provide.
To my knowledge @njuart waited a while after setting the mode until he pulled the log. So yeah. No feedback over p2p connection from the 'station'.

@bropat
Copy link
Owner

bropat commented Jun 14, 2022

I have understood where the problem lies. Thank you for the hints! I will fix it.

bropat added a commit that referenced this issue Jun 15, 2022
@bropat bropat added the fixed in next version Fixed in the code of the next release label Jun 15, 2022
@thieren
Copy link
Contributor

thieren commented Jun 15, 2022

@njuart reports that your changes indeed fix the issue. Superb work!

@jhaleit
Copy link

jhaleit commented Jul 9, 2022

I have a T8414 and this issue still exists. Changing the guard mode doesn’t do anything besides time out..

@thieren
Copy link
Contributor

thieren commented Jul 9, 2022

Hi @jhaleit

The fix will be implemented in version 2.1.1. until now 2.1.0 is the published version of this library.

bropat added a commit that referenced this issue Jul 16, 2022
Merged #171 - Fix: stream command for T8420
Merged #169 - Don't send the alarm armed p2p events as alarm events
Fixed issue #167
Fixed issue #161
Updated versions of the package dependencies
@bropat bropat removed the fixed in next version Fixed in the code of the next release label Jul 16, 2022
@bropat bropat added the fixed label Jul 16, 2022
@bropat bropat closed this as completed Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

5 participants