user2684 / imou_life

Home Assistant custom component for controlling Imou devices
MIT License
128 stars 21 forks source link

Missing "Push Notifications" switch #107

Closed SergeySpain closed 1 month ago

SergeySpain commented 6 months ago

Describe the bug

I don't see switch to enable "Push Notification" after adding new camera Rex 3D 3MP-5365

Screenshot 2024-05-07 at 16 22 25

Debug log

This message appeared in HA logs


InvalidResponse: time, type, msgType or deviceId not found in {'productId': 'zeZxKS6G', 'labelType': 'motionAlarm', 'type': '312200', 'message': {}, 'deviceId': '744FAAAPBV05365', 'token': '9a5e6e945ebd44139c75288a3a21bfb9', 'utcTime': '1715091433', 'alarmId': '1171052871532005456', 'name': 'Rex 3D 3MP-5365', 'time': 1715098633, 'localDate': '2024-05-07 16:17:13', 'refId': '312200', 'thumbUrl': 'https://imou-fk-ali-online-paas-iot-private-picture.eu-central-1.oss.aliyuncs.com/lechange/744FAAAPBV05365_img/Alarm/0/9a5e6e945ebd44139c75288a3a21bfb9_0.jpg?Expires=1715177851&OSSAccessKeyId=LTAI5tEPoYHPJZ8Qe5bttaG4&Signature=kWx%2BohuNbgLoCK%2Fyg0Pqq%2FLLn38%3D', 'picurlArray': ['https://imou-fk-ali-online-paas-iot-private-picture.eu-central-1.oss.aliyuncs.com/lechange/744FAAAPBV05365_img/Alarm/0/9a5e6e945ebd44139c75288a3a21bfb9_0.jpg?Expires=1715177851&OSSAccessKeyId=LTAI5tEPoYHPJZ8Qe5bttaG4&Signature=kWx%2BohuNbgLoCK%2Fyg0Pqq%2FLLn38%3D'], 'channelId': '0'} Traceback (most recent call last): File "/config/custom_components/imou_life/coordinator.py", line 42, in _async_update_data return await self.device.async_get_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/imouapi/device.py", line 414, in async_get_data await sensor_instance.async_update() File "/usr/local/lib/python3.12/site-packages/imouapi/device_entity.py", line 231, in async_update raise InvalidResponse(f"time, type, msgType or deviceId not found in {alarm}") imouapi.exceptions.InvalidResponse: time, type, msgType or deviceId not found in {'productId': 'zeZxKS6G', 'labelType': 'motionAlarm', 'type': '312200', 'message': {}, 'deviceId': '744FAAAPBV05365', 'token': '9a5e6e945ebd44139c75288a3a21bfb9', 'utcTime': '1715091433', 'alarmId': '1171052871532005456', 'name': 'Rex 3D 3MP-5365', 'time': 1715098633, 'localDate': '2024-05-07 16:17:13', 'refId': '312200', 'thumbUrl': 'https://imou-fk-ali-online-paas-iot-private-picture.eu-central-1.oss.aliyuncs.com/lechange/744FAAAPBV05365_img/Alarm/0/9a5e6e945ebd44139c75288a3a21bfb9_0.jpg?Expires=1715177851&OSSAccessKeyId=LTAI5tEPoYHPJZ8Qe5bttaG4&Signature=kWx%2BohuNbgLoCK%2Fyg0Pqq%2FLLn38%3D', 'picurlArray': ['https://imou-fk-ali-online-paas-iot-private-picture.eu-central-1.oss.aliyuncs.com/lechange/744FAAAPBV05365_img/Alarm/0/9a5e6e945ebd44139c75288a3a21bfb9_0.jpg?Expires=1715177851&OSSAccessKeyId=LTAI5tEPoYHPJZ8Qe5bttaG4&Signature=kWx%2BohuNbgLoCK%2Fyg0Pqq%2FLLn38%3D'], 'channelId': '0'}
user2684 commented 6 months ago

Hi, have tried with this instructions? https://github.com/user2684/imou_life?tab=readme-ov-file#option-3 Thanks

UMB8998 commented 6 months ago

Hello, I'm having this same issue, but it seems related to compatibility with that specific camera. Using the IPC-GS2D-5K0W (REX 3D 5MP) after setting the callback id the Push notification switch doesn't show up, but using the IPC-F42 (BULLET 2C 4MP) the switch does show up, I tried reloading the device or restarting HA but it still doesn't show. About the ERROR that @SergeySpain commented it shows up even before adding the Callback URL

johnnylocktang commented 5 months ago

Same here, no limitations and went with Option 3 in Motion Detection Configuration. Been trying to remove / re-add the device. Switch is missing.

IPC-B32-V2 by Imou Firmware: 2.800.0000000.10.R.240131 Hardware: 9L02ECFPDP2DE8E

johnnylocktang commented 5 months ago

Not sure this could be a lead, even though I've set the callback URI it doesn't appear here? image

Not sure it should, but anyway. Everything else got a value.

user2684 commented 1 month ago

Closing due to inactivity, feel free to reopen it if needed