On_off

devices.capabilities.on_off

In this capability you can control the device power on/off

instanceoverview
powerSwitchpowerSwitch
  • description of this capability

the parameters object defines how to pass parameters to control device

{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
      "type": "devices.capabilities.on_off",
      "instance": "powerSwitch",
      "parameters": {
        "dataType": "ENUM",
        "options": [
          {
            "name": "on",
            "value": 1
          },
          {
            "name": "off",
            "value": 0
          }
        ]
      }
    }
    ...
  ]
}
  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "uuid",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.on_off",
      "instance": "powerSwitch",
      "value": 0
    }
  }
}
  • parameters
fieldtyperequiredoverview
requestIdStringYesunique id in this request, will be carried back in response body
payloadObject--request payload
payload.skuStringYesthe product model
payload.deviceStringYesthe device id
payload.capabilityObject--the device capability to be controlled
capability.typeStringYesthe type of this capability
capability.instanceStringYesthe instance of this capability e.g. powerSwitch,
capability.valueStringYesthe control value of this instance, defin in '/router/api/v1/user/devices', see the parameters

Toggle

devices.capabilities.toggle

In this capability you can control the device small switch like oscillation ,nightlight

instanceoverview
oscillationToggleused for Fan,Heater,Thermostat
nightlightToggleused for appliances with night light
airDeflectorToggleused for Fan Heater Air Condition
gradientToggleused for Light color gradient
thermostatToggleused for Heater
warmMistToggleused for Humidifier
  • description of this capability

provided two command value 0 is off ,1 is on

{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
      "type": "devices.capabilities.toggle",
      "instance": "oscillationToggle",
      "parameters": {
        "dataType": "ENUM",
        "options": [
          {
            "name": "on",
            "value": 1
          },
          {
            "name": "off",
            "value": 0
          }
        ]
      }
    }
    ...
  ]
}
  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "uuid",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.toggle",
      "instance": "oscillationToggle",
      "value": 0
    }
  }
}

Color_setting

devices.capabilities.color_setting

  • list of instance
instanceoverview
colorRgbsetting the light color
colorTemperatureKsetting the color temperature in Kelvin,
{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.color_setting",
        "instance": "colorTemperatureK",
        "parameters": {
          "dataType": "INTEGER",
          "range": {
            "min": 2000,
            "max": 9000,
            "precision": 1
          }
        }
      },
    ...
  ]
}
{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.color_setting",
        "instance": "colorRgb",
        "parameters": {
          "dataType": "INTEGER",
          "range": {
            "min": 0,
            "max": 16777215,
            "precision": 1
          }
        }
    },
    ...
  ]
}



  • example of request

The instance colorRgb can change light color,you can get RGB number follow this formula ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0)

POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "uuid",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.color_setting",
      "instance": "colorRgb",
      "value": 0
    }
  }
}
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "uuid",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.color_setting",
      "instance": "colorTemperatureK",
      "value": 0
    }
  }
}

Mode

devices.capabilities.mode

In this capability you can switch the mode, such as the night light scene

  • list of instance
instanceoverview
nightlightSceneswitch the night scene, used for appliance with night light
presetSceneused for devices.types.aroma_diffuser, preset scenes
  • example description of this capability

provided value options

{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.mode",
        "instance": "nightlightScene",
        "parameters": {
          "dataType": "ENUM",
          "options": [
            {
              "name": "Forest",
              "value": 1
            },
            {
              "name": "Ocean",
              "value": 2
            },
            {
              "name": "Wetland",
              "value": 3
            },
            {
              "name": "Leisurely",
              "value": 4
            },
            {
              "name": "ASleep",
              "value": 5
            }
          ]
        }
      },
    ...
  ]
}



  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H7131",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.mode",
      "instance": "nightlightScene",
      "value": 1
    }
  }
}

Range

devices.capabilities.range

Manage device parameters that have a range. For example, lamp brightness, sound volume, heater temperature, humidifier humidity

  • list of instance
instanceoverview
brightnesssetting the brightness, used for 'devices.types.light'
humiditysetting humidity, used for 'devices.types.humidifier'
  • example description of this capability

parameters object defines how to pass parameters to change adjust the range of brightness

{
  "sku": "H605C",
  "device": "64:09:C5:32:37:36:2D:13",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.range",
        "instance": "brightness",
        "parameters": {
          "dataType": "INTEGER",
          "range": {
            "min": 1,
            "max": 100,
            "precision": 1
          }
        }
      },
    ...
  ]
}

  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.range",
      "instance": "brightness",
      "value": 50
    }
  }
}
POST /router/api/v1/device/control HTTP/1.1
Host: https://test-openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H7143",
    "device": "BA:82:D4:AD:FC:94:A1:D8",
    "capability": {
      "type": "devices.capabilities.range",
      "instance": "humidity",
      "value": 50
    }
  }
}

Work_mode

devices.capabilities.work_mode

In this capability, you can set the working mode of the device and set its working values.

  • list of instance
instanceoverview
workModedevice work mode
  • example of this capability
{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.work_mode",
        "instance": "workMode",
        "parameters": {
          "dataType": "STRUCT",
          "fields": [
            {
              "fieldName": "workMode",
              "dataType": "ENUM",
              "options": [
                {
                  "name": "gearMode",
                  "value": 1
                },
                {
                  "name": "Fan",
                  "value": 9
                },
                {
                  "name": "Auto",
                  "value": 3
                }
              ],
              "required": true
            },
            {
              "fieldName": "modeValue",
              "dataType": "ENUM",
              "options": [
                {
                  "name": "gearMode",
                  "options": [
                    {
                      "name": "Low",
                      "value": 1
                    },
                    {
                      "name": "Medium",
                      "value": 2
                    },
                    {
                      "name": "High",
                      "value": 3
                    }
                  ]
                },
                {
                  "defaultValue": 0,
                  "name": "Fan"
                },
                {
                  "defaultValue": 22,
                  "name": "Auto"
                }
              ],
              "required": true
            }
          ]
        }
      }
    ...
  ]
}
  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H713B",
    "device": "AC:3B:D4:AD:FC:B5:BA:CC",
    "capability": {
      "type": "devices.capabilities.work_mode",
      "instance": "workMode",
      "value": {
      	"workMode":1
        "modeValue":1
      }
    }
  }
}
  • value object parameters
fieldtyperequiredoverview
workModeIntegerYesthe temperature Whether to maintain or auto stop.
1. autoStop,0.maintain ,default 0
modeValueIntegerNothe target temperature to set

Segment_color_setting

devices.capabilities.segment_color_setting

In this capability, you can set color on several segment, when you light strip support segmented color

  • list of instance
instanceoverview
segmentedColorRgbsetting the segmentedColorRgb,
segmentedBrightnesssetting the segmentedBrightness
  • example of this capability
{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.segment_color_setting",
        "instance": "segmentedBrightness",
        "parameters": {
          "dataType": "STRUCT",
          "fields": [
            {
              "fieldName": "segment",
              "size": {
                "min": 1,
                "max": 15
              },
              "dataType": "Array",
              "elementRange": {
                "min": 0,
                "max": 14
              },
              "elementType": "INTEGER",
              "required": true
            },
            {
              "fieldName": "brightness",
              "dataType": "INTEGER",
              "range": {
                "min": 0,
                "max": 100,
                "precision": 1
              },
              "required": true
            }
          ]
        }
      },
    ...
  ]
}
  • example of request

value is a structure, segment is an array, pointing to the segment of the light strip.

POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.segment_color_setting",
      "instance": "segmentedColorRgb",
      "value": {
      	"segment":[0,1,2,3,4,5,6,7,8],
        "rgb":0x0000ff
      }
    }
  }
}
POST /router/api/v1/device/control HTTP/1.1
Host: https://test-openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.segment_color_setting",
      "instance": "segmentedBrightness",
      "value": {
      	"segment":[0,1,2,3,4,5,6,7,8],
        "brightness":50
      }
    }
  }
}
  • parameters
fieldtyperequiredoverview
segmentArrayYesthe segment of the light strip, see govee app
brightnessIntegerNoset brightness when instance is segmentedBrightness
rgbIntegerNoset color when instance is segmentedColorRgb, you can get RGB number follow this formula ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0)

Dynamic_scene

devices.capabilities.dynamic_scene

dynamic_scene means you should edit in govee app such as Scene DIY Snapshot ,then get these options from the interface

  • list of instance
instanceoverview
lightScenelight scene in govee app, used for devices.types.light,if the scene options is empty, you need to get these scene options dynamically, see Get Dynamic Scene /router/api/v1/device/scenes,
diyScenediy in govee app ,used for devices.types.light, if the diy options is empty , you need get these dynamically, see Get Dynamic Scene /router/api/v1/device/diy-scenes
snapshotsnapshot list in govee app,used for devices.types.light,if the diy options is empty, you should create a snapshot first in govee app
{
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "category": "devices.types.light",
    "capabilities": [
			{
        "type": "devices.capabilities.dynamic_scene",
        "instance": "lightScene",
        "parameters": {
          "dataType": "ENUM",
          "options": [
            {
              "name": "Sunrise",
              "value": 0
            },
            {
              "name": "Sunset",
              "value": 1
            },
            {
              "name": "Movie",
              "value": 4
            },
            {
              "name": "Dating",
              "value": 5
            },
            {
              "name": "Romantic",
              "value": 7
            },
            {
              "name": "Flash",
              "value": 8
            },
            {
              "name": "Candle",
              "value": 9
            }
            
          ]
        }
      },
     ]
} you
  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H605C",
    "device": "64:09:C5:32:37:36:2D:13",
    "capability": {
      "type": "devices.capabilities.dynamic_scene",
      "instance": "lightScene",
      "value": 4
    }
  }
}

Music_setting

devices.capabilities.music_setting

You can use this capability to switch music modes,and you can pass sensitivity and autoColor field

  • list of instance
instanceoverview
musicModelight music in govee app
  • example of this capability
{
  "sku": "H605C",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.music_setting",
        "instance": "musicMode",
        "parameters": {
          "dataType": "STRUCT",
          "fields": [
            {
              "fieldName": "musicMode",
              "dataType": "ENUM",
              "options": [
                {
                  "name": "Energic",
                  "value": 5
                },
                {
                  "name": "Rhythm",
                  "value": 3
                },
                {
                  "name": "Spectrum",
                  "value": 4
                },
                {
                  "name": "Rolling",
                  "value": 6
                }
              ],
              "required": true
            },
            {
              "fieldName": "sensitivity",
              "dataType": "INTEGER",
              "range": {
                "min": 0,
                "max": 100,
                "precision": 1
              },
              "required": true
            },
            {
              "fieldName": "autoColor",
              "dataType": "ENUM",
              "options": [
                {
                  "name": "on",
                  "value": 1
                },
                {
                  "name": "off",
                  "value": 0
                }
              ],
              "required": false
            },
            {
              "fieldName": "rgb",
              "dataType": "INTEGER",
              "range": {
                "min": 0,
                "max": 16777215,
                "precision": 1
              },
              "required": true
            }
          ]
        }
      },
    ...
  ]
}
  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H605C",
    "device": "AC:3B:D4:AD:FC:B5:BA:CC",
    "capability": {
      "type": "devices.capabilities.music_setting",
      "instance": "musicMode",
      "value": {
      	"musicMode":25,
        "sensitivity":50
      }
    }
  }
}
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H7175",
    "device": "93:5D:D4:AD:FC:F5:5A:1F",
    "capability": {
      "type": "devices.capabilities.temperature_range",
      "instance": "silderTemperature",
      "value": {
      	"autoStop":1
      	"temperature":25
        "unit":"Celsius"
      }
    }
  }
}
  • parameters
fieldtyperequiredoverview
musicModeIntegerYesthe music code or music number
sensitivityIntegerNothe sensitivity of
autoColorIntegerNoauto color
rgbNothe rgb color ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | ((b & 0xFF) << 0)

Temperature_setting

You can set the temperature and choose whether to stop automatically. In addition, you can also choose the temperature unit.

devices.capabilities.temperature_setting

  • list of instance
instanceoverview
targetTemperaturesetting the thermostat temperature, used for
'devices.types.heater' or 'devices.types.thermostat'
sliderTemperaturesetting temperature , used for 'devices.types.kettle'
  • example of this capability

You will pass an structure type value,which describes the parameters required to set the temperature

{
  "sku": "H713B",
  "device": "AC:3B:D4:AD:FC:B5:BA:CC",
  "capabilities": [
    ...
    {
        "type": "devices.capabilities.temperature_setting",
        "instance": "targetTemperature",
        "parameters": {
          "dataType": "STRUCT",
          "fields": [
            {
              "fieldName": "autoStop",
              "defaultValue": 0,
              "dataType": "ENUM",
              "options": [
                {
                  "name": "Auto Stop",
                  "value": 1
                },
                {
                  "name": "Maintain",
                  "value": 0
                }
              ],
              "required": false
            },
            {
              "fieldName": "temperature",
              "dataType": "INTEGER",
              "range": {
                "min": 5,
                "max": 30,
                "precision": 1
              },
              "required": true
            },
            {
              "fieldName": "unit",
              "defaultValue": "Celsius",
              "dataType": "ENUM",
              "options": [
                {
                  "name": "Celsius",
                  "value": "Celsius"
                },
                {
                  "name": "Fahrenheit",
                  "value": "Fahrenheit"
                }
              ],
              "required": true
            }
          ]
        }
      },
    ...
  ]
}
  • example of request
POST /router/api/v1/device/control HTTP/1.1
Host: https://openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H713B",
    "device": "AC:3B:D4:AD:FC:B5:BA:CC",
    "capability": {
      "type": "devices.capabilities.temperature_setting",
      "instance": "teargetTemperature",
      "value": {
      	"temperature":25
        "unit":"Celsius"
      }
    }
  }
}
POST /router/api/v1/device/control HTTP/1.1
Host: https://test-openapi.api.govee.com
Content-Type: application/json
Govee-API-Key: xxxx

{
  "requestId": "1",
  "payload": {
    "sku": "H7175",
    "device": "93:5D:D4:AD:FC:F5:5A:1F",
    "capability": {
      "type": "devices.capabilities.temperature_range",
      "instance": "silderTemperature",
      "value": {
      	"autoStop":1
      	"temperature":25
        "unit":"Celsius"
      }
    }
  }
}
  • value object parameters
fieldtyperequiredoverview
autoStopIntegerNothe temperature Whether to maintain or auto stop.
1. autoStop,0.maintain ,default 0
temperatureIntegerYesthe target temperature to set
unitStringNothe temperature unit , Celsius or Fahrenheit ,default Celsius

failure response

  • example of response
  • failure reason
codeoverview
400Missing Parameter
400Parameter value cannot be empty
400Invalid parameter format
400Invalid parameter type
400Parameter value out of range
400Parameter length does not meet requirements
400Duplicate parameter value
404Instance Not Fund
404device not found
429too many request ,the limits
  • Friendly Reminder

if the request response 429, means request limits happens, 10000/Account/Day