bropat / ioBroker.eusec

This ioBroker adapter allows to control Eufy security devices by connecting to the Eufy cloud servers.
MIT License
134 stars 17 forks source link

Last event states don't update anymore #202

Closed cratoo closed 2 years ago

cratoo commented 2 years ago

As discussed in #191 reporting the issue about missing lastevent* state updates. The adapter recognizes the push message and also mentions the message received by eufy, but the states are not updated. To me it seems as if the download is not even tried, possibly by the fix in #191 ?

Debug logs:

2021-11-30 11:14:45.018  - debug: eufy-security.0 (19699) [PushClient.handleParsedMessage] DataMessageStanza [{"tag":8,"object":{"id":"XXX","from":"3488XXX","to":"fR7g5HDstxACfzeg1WZnW2","category":"com.oceanwing.battery.cam","appData":[{"key":"device_sn","value":"T8210P00XXXX"},{"key":"payload","value":"XXX="},{"key":"station_sn","value":"T8010P2XXX"},{"key":"google.c.sender.id","value":"3488XXX"},{"key":"title","value":""},{"key":"type","value":"7"},{"key":"push_time","value":"1638267284942"},{"key":"content","value":"Doorbell:Someone has been spotted"},{"key":"event_time","value":"1638267284406"}],"persistentId":"0:16382672849","ttl":3600,"sent":"1638267284966"}}]
2021-11-30 11:14:45.019  - debug: eufy-security.0 (19699) [PushNotificationService.onMessage] Raw push message received [{"id":"XXX","from":"3488XXX","to":"fR7g5HDstxACfzeg1WZnW2","category":"com.oceanwing.battery.cam","persistentId":"0:1638267284972144%0d2a775cf9fd7ecd","ttl":3600,"sent":"1638267284966","payload":{"device_sn":"T8210P00202104F1","payload":{"event_type":3102,"device_sn":"T8210XXX","name":"Doorbell","channel":0,"cipher":42,"session_id":"20211130_111444","pic_url":"https://security-app-eu.eufylife.com/v1/s/g/XXX","create_time":1638267284406,"file_path":"h265_20211130111440","notification_style":3,"push_count":1},"station_sn":"T8XXX","google.c.sender.id":"3488XXX","title":"","type":"7","push_time":"1638267284942","content":"Doorbell:Someone has been spotted","event_time":"1638267284406"}}]
2021-11-30 11:14:45.020  - debug: eufy-security.0 (19699) [PushNotificationService.onMessage] Normalized push message received [{"name":"Doorbell","event_time":1638267284406,"type":7,"station_sn":"T8XXX","device_sn":"T821XXX","title":"","content":"Doorbell:Someone has been spotted","push_time":1638267284942,"channel":0,"cipher":42,"event_session":"20211130_111444","event_type":3102,"file_path":"/media/XXX/Camera00/h265_20211130111440.dat","pic_url":"https://security-app-eu.eufylife.com/v1/s/g/XXXX","push_count":1,"notification_style":3}]
2021-11-30 11:14:45.026  - debug: eufy-security.0 (19699) [EufySecurity.onPushMessage] Received push message [{"name":"Doorbell","event_time":1638267284406,"type":7,"station_sn":"T8XXX","device_sn":"T82XXXXX","title":"","content":"Doorbell:Someone has been spotted","push_time":1638267284942,"channel":0,"cipher":42,"event_session":"20211130_111444","event_type":3102,"file_path":"/media/XXXX/Camera00/h265_20211130111440.dat","pic_url":"https://security-app-eu.eufylife.com/v1/s/g/XXXX","push_count":1,"notification_style":3}]
2021-11-30 11:14:45.083  - debug: eufy-security.0 (19699) [EufySecurity.downloadEventVideo] Device: T821X full_path: /media/XXXX/Camera00/h265_20211130111440.dat cipher_id: 42
2021-11-30 11:14:45.084  - info: eufy-security.0 (19699) Downloading video event for device XXXX in 59.322 seconds...
2021-11-30 11:14:45.191  - debug: eufy-security.0 (19699) [EufySecurity.onStateChange] state eufy-security.0.XXX.cameras.XX.last_event_pic_url changed:  (ack = true) was already acknowledged, ignore it...
2021-11-30 11:14:45.192  - info: javascript.0 (7095) script.js.common.onMoveOrRing: eufy event pic
2021-11-30 11:14:45.194  - debug: eufy-security.0 (19699) [EufySecurity.onStateChange] state eufy-security.0.XXXX.cameras.XXXX.last_event_pic_html changed:  (ack = true) was already acknowledged, ignore it...
2021-11-30 11:14:45.252  - debug: eufy-security.0 (19699) [EufySecurity.onStateChange] state eufy-security.0.XXX.cameras.XXXX.person_detected changed: true (ack = true) was already acknowledged, ignore it...
2021-11-30 11:14:45.314  - debug: eufy-security.0 (19699) [EufySecurity.onStateChange] state eufy-security.0.XXX.cameras.XXXX.picture_url changed: https://security-app-eu.eufylife.com/v1/s/g/XXXX (ack = true) was already acknowledged, ignore it...
2021-11-30 11:14:45.383  - debug: eufy-security.0 (19699) [EufySecurity.onDevicePropertyChanged] onDevicePropertyChanged(): Property "personName" not implemented in this adapter (device: XXXX value: {"value":"Unknown","timestamp":1638267284406})

Versions:

asherungar commented 2 years ago

I think I also have the same problem, where do you set that debug log?

cratoo commented 2 years ago

Just want to add, that I don't get lastevent* at all anymore. No matter how many push notifications are send, there is no update of the states anymore :(

cratoo commented 2 years ago

Can confirm from my side. Works again like a charm! Thanks a lot :)