beshelmek / govee_ble_lights Goto Github PK
View Code? Open in Web Editor NEWGovee BLE Lighting Integration for HomeAssistant
License: MIT License
Govee BLE Lighting Integration for HomeAssistant
License: MIT License
First things first awesome work!
Currently there is no option to select the H6127 led strip, when selecting a different one H6137 for example the led strip works (on/off, bightness, color). The only missing option is the control for the white temperature channel, I can provide logs and scans if needed.
This is a great integration and we appreciate you for making it.
I converted several of my govee lights to this integration because I was suffering polling issues with the Http version. However, I am unable to activate the Bluetooth on a few lights, even though I am sure they are compatible:
The only thing I haven't tried is to delete them from the Govee App and re-add them without turning on the Wifi. Thoughts? Am I missing a crucial step?
is it possible to reduce the delay or maintain the BLE connection continuously? I want to use it with a motion sensor with an RPI4 and I experience a delay of about 5-6 seconds, which makes falling down the stairs dangerous. Sorry for the poor English Google Translate
I got these cheap, but did not realize it does not have WiFi, I can make a WLED controller, but this would be a lot easier, for now.
Owner of a Goveed Dreamview T1 (product model H6199).
Firmware version 1.10.04, hardware version 3.02.01.
Integration has been configured to use BLE, not the APIs.
When switching on the dreamview it does correctly switch on but does not restore the previous video mode (the one that uses the camera) but seems to always fall back to some of the color presets.
Latest version. Reinstalled the integration just before filling this issue.
RPI4 via docker. BLE enabled
H6076 Govee light with the latest firmware
I have a problem using this integration with H6076 light. After installing and configuring the integration, the only functions that work are toggling on or off and sometimes brightness control. Color change, scenes and other functionality does not work at all.
The only errors i get in the log are cancelled warnings if I try to control lights too quickly in succession.
File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 459, in establish_connection
_raise_if_needed(name, device.address, exc)
File "/usr/local/lib/python3.11/site-packages/bleak_retry_connector/__init__.py", line 326, in _raise_if_needed
raise BleakConnectionError(msg) from exc
bleak_retry_connector.BleakConnectionError: C93832311A4F - C9:38:32:31:1A:4F: Failed to connect after 4 attempt(s): [org.bluez.Error.Failed] Cancelled
To get color picking on a H613G (and presumably all other H613* strips), I had to use a new color mode 0x0d
- commands.append(self._prepareSinglePacketData(LedCommand.COLOR, [LedMode.MANUAL, red, green, blue]))
+ commands.append(self._prepareSinglePacketData(LedCommand.COLOR, [0x0d, red, green, blue]))
I would describe this color mode as "smooth change"
I thought I would share what I learned.
It seems like the device state is only based on the configuration done via the integration rather than reading the actual state from the light. Would it be possible to read the status so that it reflects the real state for instance when the light is switched off using its physical button ?
Thank you
Just want to say thank you for this custom integration!
Also want to point out that the installation instructions section is missing from the readme. May have been done on purpose, but just pointing it out.
For anyone else wondering, you can add the URL of this project to HACS as a custom repository. Then refresh HACS and you should be able to find & install this integration.
Hey this is great! I added the H617A under H617C and it seems to work great for turning it on and off as well as brightness.
Only thing not working is changing the colors and setting it to music mode (not needed but nice to have). Is there anyway to add full support for this strip? Happy to help with any data.
Could you please add Support for Govee led RGBIC strip H6125?
Thank you in advance.
I can't get the H613G light strip to work with any of the supported models.
Is your feature request related to a problem? Please describe.
H6181 is currently not supported.
Describe the solution you'd like
Support for H6181, but also as there are quite a few different Govee lights, it would be nice to have an option to select a generic light with perhaps just on/off and brightness control ( or whatever controls are related to all the lights if there is such thing )
Additional context
It could also be helpful to have some guide / tool for the users to help to create their own definitions for the lights which are currently not listed.
I've got an H613A light strip and it doesn't appear to work under any of the models in this integration. If someone could give me some pointers about where to find the info needed to add support I'll make a PR, I just don't know where to find the necessary details.
Would you be able to add support for H617A and/or tell me another configuration that would work with H617A?
Govee Bluetooth LED Lights: H617F
Integration: Govee BLE Light Advanced
Entity: GOVEE Light
Hub:GBK_H617F_41DE
I have a basic, fresh out of the box, setup of govee_ble_lights. It detected my H617F LEDs right away, and I am able to turn them of and on from the Entities menu, but I get no response when I try to change the color of the LEDs using either the "Favorite Color" options, or the color wheel. When this Entity was added my LEDs automatically changed from the color they were previously set on to plain Red. The error provided below is brought up when I attempt to change the color using either of the methods available.
This might need to be a separate issue, but the brightness slider is not working how I expect it as well. It will brighten or dim, but seemingly randomly. For example 47% is brighter than 70%, but 48% is dimmer than 47%.
Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:239
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 5:22:24 PM (14 occurrences)
Last logged: 6:58:33 PM
[139669230260032] 'NoneType' object has no attribute 'write_gatt_char'
[139669040286144] 'NoneType' object has no attribute 'write_gatt_char'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/init.py", line 631, in async_handle_light_on_service
await light.async_turn_on(**filter_turn_on_params(light, params))
File "/config/custom_components/govee-ble-lights/light.py", line 277, in async_turn_on
await client.write_gatt_char(UUID_CONTROL_CHARACTERISTIC, command, False)
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'write_gatt_char'
Thank you for the awesome integration. It would be great if you could add support for these two products.
Many thanks
I've got an H6102 LED Strip which paired fine and I can tun it on/off and control the brightness. But the effect list is completely empty.
Have 2 sets of the permanent outdoor lights.
The app lists 81 different effects. The addon gives access to 14. Would like to see the rest added.
2024-07-23 13:33:42.511 INFO (MainThread) [custom_components.hacs] Loading known repositories
2024-07-23 13:33:44.885 INFO (MainThread) [custom_components.hacs] Stage changed: running
2024-07-23 13:33:45.149 INFO (SyncWorker_11) [homeassistant.loader] Loaded nest from homeassistant.components.nest
2024-07-23 13:33:45.406 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to listdir with args (PosixPath('/config/custom_components/govee-ble-lights/jsons'),) inside the event loop by custom integration 'govee-ble-lights' at custom_components/govee-ble-lights/config_flow.py, line 37: for file in jsons_path.iterdir(): (offender: /usr/local/lib/python3.12/pathlib.py, line 1056: for name in os.listdir(self):), please create a bug report at https://github.com/Beshelmek/govee_ble_lights/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#listdir
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module>
sys.exit(main())
File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
exit_code = runner.run(runtime_conf)
File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once
handle._run()
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/runner.py", line 166, in setup_and_run_hass
return await hass.async_run()
File "/usr/src/homeassistant/homeassistant/core.py", line 523, in async_run
await self.async_start()
File "/usr/src/homeassistant/homeassistant/core.py", line 576, in async_start
self.bus.async_fire_internal(EVENT_HOMEASSISTANT_STARTED)
File "/usr/src/homeassistant/homeassistant/core.py", line 1559, in async_fire_internal
self._hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 938, in async_run_hass_job
hassjob.target(*args)
File "/usr/src/homeassistant/homeassistant/core.py", line 1420, in __call__
self.hass.async_run_hass_job(self.listener_job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 941, in async_run_hass_job
return self._async_add_hass_job(hassjob, *args, background=background)
File "/usr/src/homeassistant/homeassistant/core.py", line 756, in _async_add_hass_job
task = create_eager_task(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 108, in _async_start
await gather_with_limited_concurrency(FLOW_INIT_LIMIT, *init_coros)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 106, in gather_with_limited_concurrency
return await gather(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 107, in <genexpr>
*(create_eager_task(sem_task(task)) for task in tasks),
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task
return Task(coro, loop=loop, name=name, eager_start=True)
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 104, in sem_task
return await task
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1267, in async_init
flow, result = await self._async_init(flow_id, handler, context, data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1287, in _async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1429, in async_create_flow
flow = handler()
File "/config/custom_components/govee-ble-lights/config_flow.py", line 37, in __init__
for file in jsons_path.iterdir():
n/q
Getting this error w/ integration
2024-07-23 13:33:45.406 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to listdir with args (PosixPath('/config/custom_components/govee-ble-lights/jsons'),) inside the event loop by custom integration 'govee-ble-lights' at custom_components/govee-ble-lights/config_flow.py, line 37: for file in jsons_path.iterdir(): (offender: /usr/local/lib/python3.12/pathlib.py, line 1056: for name in os.listdir(self):), please create a bug report at https://github.com/Beshelmek/govee_ble_lights/issues
I have two variants of the H6125 Bluetooth strip lights:
Apparently an older variant, with device name starting "ihoment_", this is fixed to firmware v1.08.08
The other has a device name starting "GBK_", which I see you've already accounted from in the manifest.json
I've edited the manifest.json to include "ihoment_" in discovery, so can now see all of my lights to be added.
However, I cannot see an H6125 option to select for my lights.
Will one/two of the existing profiles work?
I highly suspect that each strip variant will require a slightly different setup.
I had previously used timniklas' hacs-govee-bluetooth-lights integration which allowed me to turn on and off all the lights, however it would only allow me to change the colour of the 'ihoment_' lights. The link is here: https://github.com/timniklas/hacs-govee-bluetooth-lights
I have an android device so happy to help troubleshoot this myself if needed
My thanks!
I found a plugin for homebridge that has ble control and also automatically pulls scenes. Not sure if it is through the aws api. It is written in typescript though
Hi
I have the govee strip lights model H6126. Could you add support for these strip lights please?
Thanks
Phill
Please provide support for H6099 TV Backlight.
I have a couple of lights with model number H6008. I see you support H6006 and H6009 so I was hoping you could add H6008.
Please add support for H6181. Thanks
Would be great if you could add support for the H61BA. Happy to help test/diagnose
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.