Kankun

The kankun switch integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows you to toggle customized Kankun SP3 Wi-Fi switches. Switches are modified to include the json.cgi script to provide an HTTP API. Details of the necessary modifications were provided on the now dead HomeAutomationForGeeks site, but fortunately we can still access the information via archive.org link (be sure to install the JSON version of the script as linked above).

Configuration

To enable it, add the following lines to your configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file. After changing the configuration.yamlThe configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file, restart Home Assistant to apply the changes. The integration is now shown on the integrations page under Settings > Devices & services. Its entities are listed on the integration card itself and on the Entities tab.

# Example configuration.yaml entry
switch:
  platform: kankun
  switches:
    bedroom_heating:
      host: hostname_or_ipaddr

Configuration Variables

switches map Required

The array that contains all Kankun switches.

identifier map Required

Name of the Kankun switch as slug. Multiple entries are possible.

host string Required

Hostname or IP address of the switch on the local network.

name string (Optional)

Friendly name of the switch.

port integer (Optional, default: 80)

HTTP connection port.

path string (Optional, default: /cgi-bin/json.cgi)

Path of CGI script.

username string (Optional)

Username for basic authentication.

password string (Optional)

Password for basic authentication.