IPC-T5442T-ZE CGI Profile Switching Not Working (Firmware V2.820.15OG001.0.R)

surly

n3wb
Dec 31, 2021
2
0
Canada
Hi all:

I'm working on finally getting my Home Assistant set up to control the switchover from day to night profiles on my IPC-T5442T-ZE via CGI. The camera is running firmware V2.820.15OG001.0.R (Build Date: 2021-07-06).

Digest authentication over HTTPS is working correctly (curl -k --digest), and I can query parameters like VideoInMode[0].Mode. However, attempts to switch profiles or force day/night behavior via CGI consistently return "Error! Bad Request!".

Here’s a summary of what I’ve tried:
  • VideoInMode[0].Mode=1 and =2 work (Night and Auto), but =0 fails with "Bad Request!"
  • DayNightMode[0]=Color, B/W, and Auto all return "Error"
  • switchProfile.cgi?profileName=day, night, general → "Error"
  • switchProfile.cgi?profileId=0, 1, 2 → "Error"
  • configManager.cgi?action=setConfig&Profile[0]=... → "Error"
  • getConfig&name=All confirms profiles exist: "day", "night", "general"
  • Profile management modes in UI include: General, Full Time, Schedule, Day/Night
My goal is to switch between profiles externally (e.g., "day" and "night") using automation. Is CGI-based profile switching supported on this firmware? If not, is there an alternative method (ONVIF, RPC2, etc.) that allows external control?

Thanks for any guidance you can provide. If this is working fine for you, please also let me know because then perhaps I've just made a silly mistake.
 
Just for a little extra clarity - some API elements I've found force the B&W/IR on and off. That's not what I'm looking for. I'm just looking to flip between "day", "night" and "general". Thus replacing the in-camera day/night schedule with API/CGI commands from an outside source. Within each day/night/general profile I have the manual or auto color/B&W settings that I wish to have in place for that profile. I don't wish to override the detailed settings within the profile, just set which profile is active.


2025-10-21 08_03_44-Clipboard.png


2025-10-21 08_03_59-Setting — Mozilla Firefox.png
 
Since thst is an older GUI camera, there is this utility and the commands also that some use in BI.

Thread 'Dahua day/night switch utility - DahuaSunriseSunset'