for the H6104:
We know that this model will not return status so:
ON and Off work (actual actions)
Brightness works now and is accurate and timely.
Color selection works.
Temperature control still does not appear to have any effect (there is no temperature control in the Android app for Govee, so probably not an issue.
I contacted Govee API team requesting that the API response for devices give that available commands as it does for other models but not currently for H6104. I also asked if we can get remote mode selection (currently only via Bluetooth connection and not via wifi on app so probably not possible, but who knows). I got a response:
Iām sorry to tell you that the H6104 could not return available commands from the API becuase it has old protocal version.
Most of my scripts are all in python 2.7; I just donāt like the formatting changes in 3.7 (in my opinion they are less reader friendly) and havenāt even looked at 3.8.
I will āmaybeā move to 3.7 when PIP no longer lets me pull down 2.7 dependencies.
I thought a bit about the brightness issue @Scope666 thankfully sent a video and debug logs so that I can understand it better, tracked here:
I think about a solution which basically should work for all LED strips, and requires no special configuration. Maybe you guys could comment your thougts on it.
Home assistant is always controlling brightness in a range of 1-255. We always need -1.
Theoretically we may have some variants of LED with different properties:
Control:
a) 0-100
b) 0-254
Feedback:
a) no feedback (manage state locally)
b) 0-100
c) 0-254
I think of a small state machine procedure per LED strip:
Not too complicated, and we do not have to know different model variants in code. Usually you just have to use brightness once at max, and all should be set.
Caveats:
where to persist such config details when restarting home assistant?
too low brightness on control 0-100 strips on LEARNING_CONTROL
some delay on first use
If you think thru it - is there a LED strip not supporting that procedure?
edid: did a rewrite as chart and changed some orders
This approach seems very logical to me. As to where to store the data, can it be a part of the integration itself, like how your storing the API key now? That seems to survive reboots just fine. Maybe it can even be configurable once weāve done the āLearningā and know which range our strip(s) support.
Hi firstly I wanted to say thank you for integrating this into home assistant. Really awesome work guys. Secondly I wanted to add that the H6117 strips also do the 40% thing in home assistant when adjusting brightness to 100%. The app shows brightness at 100% though.
Good morning and thank you for testing.
Iām currently working on the inclusion as core component. As soon as this is done I will start a new feature branch and implement this learning algorithm which should fix these issues.
One general question about the integration: The strips I have (H6163) will be controlled with a mixture of Wifi and Bluetooth connection, Wifi for the basic features like on/off and Bluetooth for example changing modes from fixed color to music .
Will it ever be possible to control these from your integration?
IĀ“m asking because because one of my beloved H6163 strips is somehow malfunctioning. The Govee support was so kind to send me an replacement, but canceled it one day later, as they told me the H6163 wonĀ“t be available here in Germany anymore.
A similar RGBIC strip would be the one without Wifi, but then I guess I have to stick to the govee app only?
For now I stick with āwhat the API providesā, which is just basic functionality. So I assume the LED strip needs WIFI and needs connect to this API service Govee provides. I already had and like the idea of controlling them locally, e.g. using a Bluetooth-Adapter, if someone wants to do this we need abstract the library and support different connection variants. This might be done by me or someone else, but not in the near future.
So to give a clear statement: Currently out of scope for me, contributors welcome!
Cleared my browser in Chrome - It wasnāt showing the Integration in Home Assistant.
Logged into Home Assistant via Safari - as the cache was ācleanā it showed this as an Integration in the UI (Configuration > Integrations)
The API key from Govee needs to go in the first box, then I pressed finish, and it recognised my lights
I thought about it again. I dump the idea from above. Itās really simple.
First: the pull request to core is in a state where I hope it will be merged.
This was a lot of work to get all that linters to say yes, now it needs someone to remove the docs-missing label and review the work. That said, we also have a PR for documentation, and another PR for icons and logos, all links here:
These are all open and waiting - so if someone here can review in these repos: give it a go - thank you.
Back to the issue above:
As I do not want to touch the PR above i started a new feature branch on both code projects. Iāll implement it as follows:
When controlling a light, I assume the light can be controlled between 0 - 254.
When I control > 100 AND get this error 400 (Input parameter wrong) Iāll learn 0 - 100 is control range (and will control the light again).
For Feedback I assume 0 - 100 as default.
As soon as I see the first Brightness reported above 100 Iāll learn the feedback range is 0 - 254.
Also, these learned values cann be saved/restored in the library, and the integration will save/store these (most likely as govee_learned.yml)
(when I say āIā i mean my library)
This process is much simpler and less error-prone, needs no locking, and the user shouldnāt recognize it is learning (maybe the first time light is too bright until you get that error 400)
Iāve implemented parts of this, and hope I could do some more coding on weekend. So stay tuned for the next ZIP to test
Iām getting an āunknown Errorā when I try to register the api key for version govee-20200923-pr. Everything is up to date for my HA installation on a PI 4
Once I added a device to the govee home app the error went away - so it appears that at least one device must be configured in govee to complete the HA integration activity.
thanks