Skip to content
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

Update night switch mode for specific NVR and IPC models #327

Merged
merged 1 commit into from
May 4, 2024

Conversation

FeatherKing
Copy link
Contributor

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 for async_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)

Triggered by the numeric state of sun.sun at December 31, 2023 at 7:46:06 AM
Call a service 'Dahua: Set Dahua Video Profile Mode To Day or Night' on driveway_dahua
Finished at December 31, 2023 at 7:46:08 AM (runtime: 1.51 seconds)

@rroller rroller merged commit 583165c into rroller:main May 4, 2024
@rroller
Copy link
Owner

rroller commented May 4, 2024

Thanks! Released in https://github.com/rroller/dahua/releases/tag/0.9.54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants