-
Notifications
You must be signed in to change notification settings - Fork 5
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
channelId parameter should be omitted when not needed #10
Comments
Good point, channelId usage has never be clear from the API documentation. I wonder if the fact that it applies to some cameras but not to others may be related to the fact that some cameras have multiple channels, most of the cameras only have channel 0. If we find the correlation we can conditionally use channelid without the user's prompt |
What I have found in the API documentation about channelId is something about NVR. But could it also be that devises with two lenses/cameras uses the channelId? Any way I have now sorted out the mess in my form. If you would like to see a suggestion to solve it you can find it here: If you think that is a good solution I can make a pull request. |
@Strixx76 I like your approach. let me see if I can refactor it together with another couple of changes I need to do in the short term and I'll come back to you. Many thanks! |
Could I also the suggest that you change so that the "sensors" gets updated asynchronous? If you change the for-loop in ImouDevice.async_get_data to use asyncio.gather() you will speed up things. That will also do that the sensors not failing will be updated. Now the loop breaks when one of the sensor fails to update. You could of course instead simply catch all exceptions here and log them like I did to be able to find out what was casing the bug. |
If channelId parameter is omitted in
getDeviceCameraStatus
andsetDeviceCameraStatus
when forenableType
with scopedevice
.This will fix issues reported in user2684/imou_life#82
The text was updated successfully, but these errors were encountered: