Repository navigation
Conversation
get_event_states() and set_event_enabled() went through request(), which turns the document into a dict and back: a write could change the regions and lines of a detection. They also took any error as "not there", a rejected password included, so a caller kept sending it for every detection; and a 403 notSupport, what cameras answer for the detections they lack, read as an authentication error. - ISAPIClient.get_detection_enabled(detection, channel=1) and set_detection_enabled(detection, enabled, channel=1) read and write only the enabled flag below the document's root, as text: the rest is sent back as read, and nothing is sent when it is already so. - A detection the device does not have raises ISAPINotSupportedError (404, 501, notSupport, invalidOperation, also with a 403). 401 and any other 403 raise ISAPIAuthError. - DETECTIONS lists the eight of a video channel; videoLoss is added to EVENT_ENDPOINTS. - get_event_states() and set_event_enabled() use them. get_event_states() stops on rejected credentials; set_event_enabled() raises when the device refuses the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
get_event_states() and set_event_enabled() went through request(), which turns the document into a dict and back: a write could change the regions and lines of a detection. They also took any error as "not there", a rejected password included, so a caller kept sending it for every detection; and a 403 notSupport, what cameras answer for the detections they lack, read as an authentication error.
Claude AI tool was used to help write this change.