Update night switch mode for specific NVR and IPC models #327
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.
I recently purchased an IPC-Color4K-T-2.8mm and while integrating it with Home Assistant, the call to flip between day and night mode was failing with a "501 Not Implemented", after looking at some tcpdump traffic and also the ipcamtalk forums, this camera seems to use the newer web 5.0 interface. I found a string in the forums that worked. Originally i modified the call
async_set_video_profile_mode
, and that worked, but then i noticed that the call forasync_set_night_switch_mode
is basically the same code as what i had modified.I went back and found the logic in camera.py on line 319 and added part of this camera model there (they also make an X model and a 3.6mm version of each, so i trimmed the model name a bit). Not sure if this model logic should be handled in a different way, but im already running this at home and its working. (Trace log from home assistant)