Govee now has a local API for some devices. It’s available via the IP. If the device has a setting to enable local access, then you can use the API. The full documentation is in the app, too – alas, no URL for it, so I did screen captures and turned them into a PDF.
The protocol is a simple UDP messaging
scan - get the devices to report
turn brightness etc., corresponding roughly to the cloud API
devStatus returns local status.
No notification so I need to poll
It’s far from perfect, but a very encouraging start, and I already have it working locally.
How long do you think this will take for HACS or HA integration? I’m new to HA as I’ve been using Alexa for Govee. Due to the quantity of Govee lights throughout my home I run into issues consistently.
@BobFrankston I tried reading through the documentation and I was lost. I don’t have any experience with UDP messaging or anything else that the Developer’s LAN API Interface Guide explains. If you have the time could you provide a step-by-step explanation of the setup or do you have a link for someone else who might have posted one.? Thanks.
I just released a phyton library to communicate with govee devices that support local API.
This is the first step to an integration as integrations require a separate component for the cimmunication with the devices.
I started working on an integration using this library but I have very limited time so its going slow. In the meantime you can give it a try to the library, it has a demo utility that allows you to test it and easily control your devices…
Thought this crowd in here may be interested in the below.
So i have spent the past week or so implementing the entire UDP api into a project to sync from my screen to the hexa lights above my desk. I have really worked on streamlining the code and I have the response time extremely low. Roughly 833 polls of the screen per second, which is pretty crazy. So its not a code problem, the color changes are detected near instant. Demo links and a Github repo are below. The function is pretty straight forward and could be copied and utilized, the only thing I didnt bother to implement is any type of UDP discovery for devices. I only have one device so trying to send out a broadcast and get back a bunch of devices wasnt really relevant to this particular project.
I think its a blend of a few things that cause the minor delay in color transitions:
the devices only support 2.4ghz wifi, would likely transmit faster over 5ghz.
there is no way to turn off the UDP response back from the device, which I personally dont listen for during color changes and dont need, which may be causing some delay.
and most importantly, there is a “fade” effect the device automatically does on its own. You can see it in the video it kind of fades on its own from one color to the next. I would prefer if there was a way to have the device just cylce from one color right to the next. The automatic fade is nice for other applications but when you are optimizing for speed, as i am trying to, it actually gets in the way.
Sadly no, nor can you toggle anything dreamview related, or control sound modes, its very basic support right now.
on\off\color\brightness\color temp in kelvin that is about it.
I am new to this thread. I have five Govee H5051 WiFi/bluetooth temperature/humidity sensors and communicate with them over WiFi. The API you mentioned – would it possibly allow me to access these sensors using Home Assistant? Please direct me to where I would start.
Building off the hard work of others - I’ve forked the existing govee2mqtt project (new fork here) to support the local LAN API (based on the existing python project here).
Essentially, if you’re already running the MQTT integration in home assistant - it will “just work” without any additional integrations. You can just start the docker image and be good to go.
It’s fairly responsive in my testing locally - but it’s subject to the limits of the Local Govee API - which is only power, color and brightness.
Yes unfortunately - the local API is extremely limited in what is exposed. The color is the entirety of the device.
And yes - that’s more or less what I’m doing. Using the local over MQTT for simple automations in HA (presence based on/off type thing) and when the mood strikes using the Govee app for something more exciting.
Still poking at better ways to do this - but also might give up and just “hack” the device (trade it out for an ESP 32) and use WLED
It would be really nice to use the other effects/settings via the local API.
Got this to work easily but I realized that my two light bars are seen as one device. Was hoping that I could at least control them individually even if I didn’t have access to all the zones.
I’m guessing this is just a limitation of the local api. Hopefully we can get better control over the devices via home assistant some time.
Does anybody know if Govee takes any technical requests such as ones to improve the LAN API? I have Permanent Outdoor Lights Pro and they don’t work with WLED. I’d love to program some custom animations.
Wondering if toggle Dreamview on/off is something supported? I believe it is through Alexa as a command to enable synce of TV lights for example to screen content with their Dreamview T1/T2 systems