Integration with Govee API

Originally thought this could be just a cpp file, but upon further working with it, it looks to be well beyond my reach and more of a full integration request. I can help test as needed, but limited python experience.

…as far as I have gotten thus far:

"Ok, so I have figured out the API calls and can control any lan based Govee light from API. I have tested H604D, H619Z, H7065, H7061, and H705B. All that really needs collected is the mac address and device model after API key is retrieved by Govee. What I am not good at is python. I know that Eufy will allow WLED control for their lights, but not sure the interface. If anyone has a template where I can insert the API into the python code, I would be willing to give it a shot.

I know you ‘can’ modify the Govee hardware and interrupt the data line to the govee strings, however, local LAN control would be prfered to avoid wire cutting/splicing as well as support using native govee app OR WLED as options. Any thoughts or assistances would be much appreciated.

Example:

curl --location --request PUT ‘https://developer-api.govee.com/v1/devices/control’
–header ‘Content-Type: application/json’
–header ‘Govee-API-Key: APIKeyfromGovee’
–data '{
“device”: “macaddress”,
“model”: “H6076”,
“cmd”: {
“name”: “turn”,
“value”: “on”
}
}

curl --location --request PUT ‘https://developer-api.govee.com/v1/devices/control’
–header ‘Content-Type: application/json’
–header ‘Govee-API-Key: APIKeyfromGovee’
–data '{
“device”: “macaddress”,
“model”: “H6076”,
“cmd”: {
“name”: “brightness”,
“value”:50
}
}

curl --location --request PUT ‘https://developer-api.govee.com/v1/devices/control’
–header ‘Content-Type: application/json’
–header ‘Govee-API-Key: Youknowthedrill’
–data '{
“device”: “sameasabove”,
“model”: “H6076”,
“cmd”: {
“name”: “color”,
“value”: {
“r”: {{red}},
“g”: {{green}},
“b”: {{blue}}
}
}
}

curl --location --request PUT ‘https://developer-api.govee.com/v1/devices/control’
–header ‘Content-Type: application/json’
–header ‘Govee-API-Key: 123456789’
–data '{
“device”: “10111213”,
“model”: “H6076”,
“cmd”: {
“name”: “colorTem”,
“value”: 7000
}
}

curl --location ‘https://developer-api.govee.com/v1/devices’ \

–header ‘Govee-API-Key: getthosedevicesandcreatevariables’

curl --location ‘https://developer-api.govee.com/v1/devices?device=macaddress&model=H6076’ \

–header ‘Govee-API-Key: thisonegetsdevicestate’

One thing I am also watching is the polling as there is a limit to how many calls can be made."

Please don’t post the same responses/questions in multiple forum sections.
It cause confusion and grief for all.

Kindly delete one them.

Submitted flag for moderation. No worries! I cannot delete myself.

Thanks for the effort!

I have a bit of interest in this as I just want to be able to control 3 govee lights from wled. I applied for a API key, and I super quick looked at the pdf doc. I could also code up some python, but I guess I don’t see how that would link up with wled? I’ll try playing around with it a bit after I get the API key and see if I can code up something quick. I’m going to guess it isn’t something quick though. :smiley:

I pulled the wled code into Visual Studio, and in taking a look I would ‘assume’ that the integration would be similar to the Hue integration(hue.cpp), but I am extremely out of my wheelhouse here. If you need various Govee equipment to test, I am sure we can collaborate. I just think it would be a great value add if done effectively to all of our WLED family.

That’s my conclusion as well when I looked at it last night. I have 2 types of govee lights and I hate the app. The rate throttling thing does make me wonder if you had lights that were changing a lot like for xmas lights. I wish there was some sort of way to interface with these that wasn’t through the API. Definitely going to keep that in mind before I buy any more of these. Anyway, hopefully I can take a look at that some point.

I have a few projects ongoing and I’m honestly not sure how much of a priority it is for me to get my 3 can lights working in sync with everything else. Not saying that I’m not at all interested any more but there sure are a lot of projects piling up for me :stuck_out_tongue:

Anyway, have you seen this thread: Reddit - Dive into anything? I have these exact string lights and instead of going the coding route, I’m thinking just wire up a esp module and replace the existing govee stuff and you got a working wled strip with about 10 minutes of work, no workarounds or coding. Maybe an option for you as well?

I mean if I think about it, I could probably code up a dedicated esp8266 to just spam out API calls for the 3 lights and call it a day. Sorry for being pragmatic for my particular situation, and maybe it isn’t that hard for a integration but I’m just thinking of some options.

I have considered it(cutting the wires), but one note, govee warranty is for 1 year. By integration without hardware mods, you can maintain warranty status. Me personally, I am comfortable cutting wires and waterproofing, but I think the masses would appreciate options. I get heavy workloads, so no worries there. I will take a deeper look as I can. Easy to cut wires and call it a day, and I may end up there, but I am not giving up on it just yet…

1 Like