Skip to content

Add ISAPI support for SupplementLight / ColorVu white light mode control #118

Open

Description

@GwiezdnySzeryf

Feature request

Please add support for Hikvision SupplementLight ISAPI controls.

Some Hikvision ColorVu / hybrid light cameras expose the built-in illumination mode through:

GET /ISAPI/Image/channels/{channel}/supplementLight
PUT /ISAPI/Image/channels/{channel}/supplementLight
GET /ISAPI/Image/channels/{channel}/capabilities

This would allow downstream integrations, especially Home Assistant, to expose the camera's built-in light mode as a select entity.

Tested Device

Model: IPC-T260HA-LU Black
Firmware: V5.8.5 build 250714

Available Modes

The camera reports the following options in ImageChannel capabilities:

<SupplementLight>
  <supplementLightMode opt="eventIntelligence,colorVuWhiteLight,irLight,close">eventIntelligence</supplementLightMode>
  <mixedLightBrightnessRegulatMode opt="auto,manual">auto</mixedLightBrightnessRegulatMode>
  <whiteLightBrightness min="0" max="100">100</whiteLightBrightness>
  <irLightBrightness min="0" max="100">100</irLightBrightness>
  <EventIntelligenceModeCfg>
    <brightnessRegulatMode opt="auto,manual">auto</brightnessRegulatMode>
    <whiteLightBrightness min="0" max="100">100</whiteLightBrightness>
    <irLightBrightness min="0" max="100">100</irLightBrightness>
    <associatedVMDHuman>true</associatedVMDHuman>
  </EventIntelligenceModeCfg>
</SupplementLight>

The useful mode values are:

eventIntelligence
colorVuWhiteLight
irLight
close

Current State Endpoint

GET /ISAPI/Image/channels/1/supplementLight

Example response:

<SupplementLight version="2.0" xmlns="http://www.hikvision.com/ver20/XMLSchema">
  <supplementLightMode>eventIntelligence</supplementLightMode>
  <mixedLightBrightnessRegulatMode>auto</mixedLightBrightnessRegulatMode>
  <whiteLightBrightness>100</whiteLightBrightness>
  <irLightBrightness>100</irLightBrightness>
  <EventIntelligenceModeCfg>
    <brightnessRegulatMode>auto</brightnessRegulatMode>
    <whiteLightBrightness>100</whiteLightBrightness>
    <irLightBrightness>100</irLightBrightness>
    <associatedVMDHuman>true</associatedVMDHuman>
  </EventIntelligenceModeCfg>
</SupplementLight>

Set Mode Endpoint

PUT /ISAPI/Image/channels/1/supplementLight

A minimal XML body without the XML declaration, namespace, or version attribute was accepted by the camera:

<SupplementLight>
  <supplementLightMode>eventIntelligence</supplementLightMode>
  <mixedLightBrightnessRegulatMode>auto</mixedLightBrightnessRegulatMode>
  <whiteLightBrightness>100</whiteLightBrightness>
  <irLightBrightness>100</irLightBrightness>
  <EventIntelligenceModeCfg>
    <brightnessRegulatMode>auto</brightnessRegulatMode>
    <whiteLightBrightness>100</whiteLightBrightness>
    <irLightBrightness>100</irLightBrightness>
    <associatedVMDHuman>true</associatedVMDHuman>
  </EventIntelligenceModeCfg>
</SupplementLight>

The device returned:

<ResponseStatus>
  <statusCode>1</statusCode>
  <statusString>OK</statusString>
  <subStatusCode>ok</subStatusCode>
</ResponseStatus>

Note: sending back the full XML response including XML declaration, namespace, and version attribute caused badXmlFormat on this model.

Proposed pyHik API

get_supplement_light(channel=1)
get_supplement_light_capabilities(channel=1)
set_supplement_light_mode(channel=1, mode="colorVuWhiteLight")

Optional helper constants:

SUPPLEMENT_LIGHT_EVENT_INTELLIGENCE = "eventIntelligence"
SUPPLEMENT_LIGHT_WHITE_LIGHT = "colorVuWhiteLight"
SUPPLEMENT_LIGHT_IR = "irLight"
SUPPLEMENT_LIGHT_OFF = "close"

Home Assistant Use Case

Home Assistant's official Hikvision integration currently exposes camera and binary_sensor entities.

With pyHik support, Home Assistant could expose this as a select entity, for example:

select.front_camera_supplement_light_mode

Options:

eventIntelligence
colorVuWhiteLight
irLight
close

This is better than a simple switch because the camera supports more than just on/off.

Activity

  1. GwiezdnySzeryf commented on Jun 3, 2026

    @GwiezdnySzeryf
    Author

    I successfully implemented this locally in Home Assistant as a working setup:

    • input_select.camera_supplement_light_mode (helper, options: eventIntelligence, colorVuWhiteLight, irLight, close)
    • rest_command.hikvision_set_supplement_light_mode with PUT /ISAPI/Image/channels/1/supplementLight (digest auth, minimal XML body)
    • script.set_camera_supplement_light_mode calling the rest_command
    • automation.set_camera_light_mode_on_change triggered by state change of the helper

    All ISAPI endpoints used (GET/PUT supplementLight, GET capabilities) work correctly on:

    Model: IPC-T260HA-LU Black
    Firmware: V5.8.5 build 250714
    

    The rest_command PUT test with the current mode (eventIntelligence) returned statusCode 1 / OK, and the camera state was confirmed unchanged via GET.

  2. mezz64 commented on Sep 1, 2026

    @mezz64
    Owner

    I successfully implemented this locally in Home Assistant as a working setup:

    * `input_select.camera_supplement_light_mode` (helper, options: `eventIntelligence`, `colorVuWhiteLight`, `irLight`, `close`)
    
    * `rest_command.hikvision_set_supplement_light_mode` with `PUT /ISAPI/Image/channels/1/supplementLight` (digest auth, minimal XML body)
    
    * `script.set_camera_supplement_light_mode` calling the rest_command
    
    * `automation.set_camera_light_mode_on_change` triggered by state change of the helper
    

    All ISAPI endpoints used (GET/PUT supplementLight, GET capabilities) work correctly on:

    Model: IPC-T260HA-LU Black
    Firmware: V5.8.5 build 250714
    

    The rest_command PUT test with the current mode (eventIntelligence) returned statusCode 1 / OK, and the camera state was confirmed unchanged via GET.

    Are you modifying the ISAPI capability recently added into the library or other adjustments? I always welcome PR's and am open to adding additional endpoints to the existing ISAPI code.

  3. mezz64 commented on Nov 12, 2026

    @mezz64
    Owner

    pyHik's master branch now has a general image-settings API (ISAPIClient.get_image_settings and set_image_setting, added in #142 and #143). It isn't released yet. It reads /ISAPI/Image/channels/<n>/capabilities and returns each setting the camera reports as a switch, number or select. So if your camera lists SupplementLight there, the light mode should appear as the select SupplementLight/supplementLightMode, without needing dedicated methods. The brightness values should appear as numbers.

    It hasn't been tested on a ColorVu camera yet, so if you have time I'd be interested to know whether it works on your IPC-T260HA-LU. One difference from your rest_command: pyHik writes by reading the whole document from /ISAPI/Image/channels/1, changing only the one value, and sending the document back, not by writing to /supplementLight. I don't know yet whether your camera accepts that.

    To install from master:

    pip install git+https://github.com/mezz64/pyHik.git

    Then:

    from pyhik.isapi import ISAPIClient
    
    with ISAPIClient("CAMERA_IP", port=80, username="USER", password="PASS") as client:
        for s in client.get_image_settings(1):
            if s.path.startswith("SupplementLight"):
                print(s.path, s.type.value, s.value, s.options or (s.min_value, s.max_value))
    
        path = "SupplementLight/supplementLightMode"
        original = client.get_image_values(1).get(path)
        print("current mode:", original)
    
        result = client.set_image_setting(path, "colorVuWhiteLight", 1)
        print("write:", result)
        print("read back:", client.get_image_values(1).get(path))
    
        print("restore:", client.set_image_setting(path, original, 1))

    This changes the light mode briefly and then puts it back.

    It would help to see:

    • the output of the script;
    • if the write fails, the sub_status it reports (for example notSupport or badXmlFormat).

    On the Home Assistant side, the integration doesn't use these settings yet. A select entity would come later in a separate HA change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions