Hi I tried:
value: 1
value: 2
value: 3
But no reaction.
I think the fieldName ‘workMode’ and the value 1,2 or 3
must be in the valuefield like
value: ‘workMode: 2’ or so
Hi I tried:
value: 1
value: 2
value: 3
But no reaction.
I think the fieldName ‘workMode’ and the value 1,2 or 3
must be in the valuefield like
value: ‘workMode: 2’ or so
Hello,
if i use Postmann with these body-values
{
“requestId”: “uuid”,
“payload”: {
“sku”: “H7140”,
“device”: “1D:XX:D4:XX:XX:XX:XX:XX”,
“capability”: {
“type”: “devices.capabilities.work_mode”,
“instance”: “workMode”,
“value”: {
“workMode”:1, “modeValue”:6
}
}
}
}
i can control the mode.
in homeassistant in the developer-tools with service call i use:
service: rest_command.govee_control
data:
device: 1D:XX:D4:XX:XX:XX:XX:XX
model: H7140
type: devices.capabilities.work_mode
instance: workMode
value: {
“workMode”:1, “modeValue”:7
}
but i can’t control the device.
where is the mistake?
Someone find how to activate\desactivate the swing ?
I put this in my rest.yaml file:
heater_oscillate_onoff:
url: https://openapi.api.govee.com/router/api/v1/device/control
method: POST
headers:
Content-Type: application/json
Govee-API-Key: your-api-key
content_type: "application/json; charset=utf-8"
payload: >-
{
"requestId": "uuid",
"payload": {
"sku": "H7131",
"device": "deviceID",
"capability": {
"type": "devices.capabilities.toggle",
"instance": "oscillationToggle",
"value": {{ onoff }}
}
}
}
If you haven’t divided your config up, it’ll be under the ‘rest_command:’ header
Then, when calling the service, supply either a 1 (for on) or a 0 (for off) in the data header under the “onoff” key.
Let me know if you have any questions
Hi,
I have the same heater, can you please share the configs and script fot it.
Look at here :
Has anyone with a H7130 model heater been able to get the new API to work? I’ve tried a variety of methods, but I always end up getting a 500 error. The old API works flawlessly (other than it being super limited in functionality).
Yes. The rest service I posted yesterday works for me. Have you try it on postman for exemple ?
On and off are working for me (thanks for this thread).
I noticed in their docs they have a “state” API as well. Has anyone got this working? (It’d be nice to be able to check the current state)
My command:
curl --request GET -G -d "device:XXXXX" -d "model:H7130" --header 'Govee-API-Key: XXXXXX' --url https://developer-api.govee.com/v1/devices/state
Is returning:
{“message”:“device, model are required params”,“status”:400}
For the state you have to use the new api.
@Idaho947 that’s working for me now, thanks kindly.
One thing that’s kind of weird to me, let me know if others are seeing this, as well?
Here’s my state of the world:
When I query the state API, here’s what I get. The weird thing to me is that the value of 0 indicates the heater is off, which is sort of true in that it’s not currently heating, but the heater is powered on and set to Auto, meaning it’ll start heating when the temp drops.
Is there any way for me to discern whether the heater is actually fully off vs. just currently off because the temperature isn’t low enough?
Hopefully that made some sense. Appreciate any insight.
{
"requestId": "abc",
"msg": "success",
"code": 200,
"payload": {
"sku": "H7130",
"device": "redacted",
"capabilities": [{
"type": "devices.capabilities.online",
"instance": "online",
"state": {
"value": true
}
}, {
"type": "devices.capabilities.on_off",
"instance": "powerSwitch",
"state": {
"value": 0
}
}, {
"type": "devices.capabilities.toggle",
"instance": "oscillationToggle",
"state": {
"value": 1
}
}, {
"type": "devices.capabilities.toggle",
"instance": "thermostatToggle",
"state": {
"value": ""
}
}, {
"type": "devices.capabilities.temperature_setting",
"instance": "targetTemperature",
"state": {
"value": {
"unit": "Celsius",
"targetTemperature": 20
}
}
}, {
"type": "devices.capabilities.property",
"instance": "sensorTemperature",
"state": {
"value": 67
}
}, {
"type": "devices.capabilities.work_mode",
"instance": "workMode",
"state": {
"value": {
"workMode": 2,
"modeValue": 0
}
}
}]
}
}
Well… if you have it fully off and try to query it what is the result?
Look at my full recipe to support Govee Smart Space Heater H7131 GitHub - wiltodelta/homeassistant-govee-smart-heater-h7131: Govee Smart Heater H7131 Integration for Home Assistant
Why you don t use the new gover api ?
Are you asking me?
everybody should check out the MQTT implementation by wez furlong … wez/govee2mqtt: Govee2MQTT: Connect Govee lights and devices to Home Assistant (github.com)
yes. They have a new api .
Will check and update my recipe
Here ya go!
Note: (For those of you wanting the stuff for the H7130, it should all be very similar!)
This is in my rest.yaml file.
heater_nightlight_onoff:
url: https://openapi.api.govee.com/router/api/v1/device/control
method: POST
headers:
Content-Type: application/json
Govee-API-Key: abc-123-api-key
content_type: "application/json; charset=utf-8"
payload: >-
{
"requestId": "uuid",
"payload": {
"sku": "H7131",
"device": "DE:VI:CE:ID:HE:RE",
"capability": {
"type": "devices.capabilities.toggle",
"instance": "nightlightToggle",
"value": {{ onoff }}
}
}
}
heater_oscillate_onoff:
url: https://openapi.api.govee.com/router/api/v1/device/control
method: POST
headers:
Content-Type: application/json
Govee-API-Key: abc-123-api-key
content_type: "application/json; charset=utf-8"
payload: >-
{
"requestId": "uuid",
"payload": {
"sku": "H7131",
"device": "DE:VI:CE:ID:HE:RE",
"capability": {
"type": "devices.capabilities.toggle",
"instance": "oscillationToggle",
"value": {{ onoff }}
}
}
}
govee_on_off:
url: https://openapi.api.govee.com/router/api/v1/device/control
method: POST
headers:
Content-Type: application/json
Govee-API-Key: abc-123-api-key
content_type: "application/json; charset=utf-8"
payload: >-
{
"requestId": "uuid",
"payload": {
"sku": "{{ sku }}",
"device": "{{ device }}",
"capability": {
"type": "devices.capabilities.on_off",
"instance": "powerSwitch",
"value": {{ onoff }}
}
}
}
govee_working_mode:
url: https://openapi.api.govee.com/router/api/v1/device/control
method: POST
headers:
Content-Type: application/json
Govee-API-Key: abc-123-api-key
content_type: "application/json; charset=utf-8"
payload: >-
{
"requestId": "1",
"payload": {
"sku": "{{ sku }}",
"device": "{{ device }}",
"capability": {
"type": "devices.capabilities.work_mode",
"instance": "workMode",
"value": {
"workMode":{{ mode }},
"modeValue":{{ modevalue }}
}
}
}
}
If you don’t have a split config, you’ll have to make some tweaks.
Then, I made an automation with 6 triggers, all from when an input select is switched to OFF, FAN, LOW, MED, HIGH, and AUTO. In the actions, I have this:
choose:
- conditions:
- condition: trigger
id:
- "OFF"
sequence:
- service: rest_command.govee_on_off
data:
onoff: 0
device: DE:VI:CE:ID:HE:RE
sku: H7131
- conditions:
- condition: trigger
id:
- FAN
sequence:
- service: rest_command.govee_working_mode
data:
mode: 9
modevalue: 0
device: DE:VI:CE:ID:HE:RE
sku: H7131
- conditions:
- condition: trigger
id:
- LOW
sequence:
- service: rest_command.govee_working_mode
data:
mode: 1
modevalue: 1
device:DE:VI:CE:ID:HE:RE
sku: H7131
- conditions:
- condition: trigger
id:
- MED
sequence:
- service: rest_command.govee_working_mode
data:
mode: 1
modevalue: 2
device: DE:VI:CE:ID:HE:RE
sku: H7131
- conditions:
- condition: trigger
id:
- HIGH
sequence:
- service: rest_command.govee_working_mode
data:
mode: 1
modevalue: 3
device: DE:VI:CE:ID:HE:RE
sku: H7131
- conditions:
- condition: trigger
id:
- AUTO
sequence:
- service: rest_command.govee_working_mode
data:
mode: 3
modevalue: 0
device: DE:VI:CE:ID:HE:RE
sku: H7131
The above automation didn’t include anything about the nightlight or oscillation functionality, but those work similarly. Let me know if you have any questions or if I didn’t provide enough detail. I’m writing this kinda quickly so sorry if there’s any typos.
I am having a H713C.
Requesting the more general “list all connected devices topic” ( https://developer-api.govee.com/v1/user/devices
) instead of the individual device state ( https://developer-api.govee.com/v1/devices/state
) I can see that my heater supports different “working modes”
{
"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
}
]
}
}
I am pretty sure your heater shows there something like:
{
"name": "Auto",
"value": 2
}
as your “workMode” value for what showed is “2” and the “modeValue” is “0” (which as of my modeValues would be something like “off”