Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groups don't work #3

Open
borski opened this issue Oct 26, 2023 · 9 comments
Open

Groups don't work #3

borski opened this issue Oct 26, 2023 · 9 comments

Comments

@borski
Copy link
Collaborator

borski commented Oct 26, 2023

If you make a group of lights, for multiple zones, services like light.turn_on and light.turn_off do not seem to work or cascade down to the individual lights; I haven't diagnosed why yet, I'm just logging this here so that I don't forget about and/or in case you're curious to look into it.

I can, of course, solve this by just repeating the service call 3 times, once for each of my zones.

@theOrakle
Copy link
Owner

Hey man, I only have 1 zone, so I'm stoked that the multi-zone even worked in my initial drop. I tried to recreate the issue, but need some more information.

I created a helper group light (via GUI - not YAML) with one light (my only zone) and then proceeded to try to turn on/off the group light with success. I am assuming that is not what you did, so please let me know what I need to try. In the back of my head I also know that the http calls to the bridge occasionally timeout if stacked too tightly (bridge response is not the fastest kid on the block)

Lastly, if you want to contribute/own/co-own, I'm happy to do whatever. I am a solution architect/enterprise architect by day and I reverse engineer systems that don't have integrations by night, so I am far from a python rock star.

@theOrakle
Copy link
Owner

If you are interested in how bridge works...

curl http://<bridge ip or name>/v1 | jq
curl http://<bridge ip or name>/v1/sequences | jq
curl http://<bridge ip or name>/v1/zones/<zone serial>
curl http://<bridge ip or name>/v1/zones/<zone serial>/sequence

The last one is a get/post... post for setting the light on/color/pattern/etc

@borski
Copy link
Collaborator Author

borski commented Nov 2, 2023

I created a helper group light (via GUI - not YAML) with one light (my only zone) and then proceeded to try to turn on/off the group light with success. I am assuming that is not what you did, so please let me know what I need to try. In the back of my head I also know that the http calls to the bridge occasionally timeout if stacked too tightly (bridge response is not the fastest kid on the block)

That is precisely what I did. It gives me an error if I have more than one zone in the group. I hadn't tried it with one zone, but I just did that now and it works fine with one zone.

Lastly, if you want to contribute/own/co-own, I'm happy to do whatever. I am a solution architect/enterprise architect by day and I reverse engineer systems that don't have integrations by night, so I am far from a python rock star.

Happy to, but I can just make a PR for now if I track it down

@theOrakle
Copy link
Owner

I did a complete rewrite based on ludeeus/integration_blueprint... The new code doesn't beat up the hub at all really. Unfortunately, you need to delete your integration, remove from HACS, re-add to HACS and recreate the integration. Let me know if this fixes the multi-zone issue.

@borski
Copy link
Collaborator Author

borski commented Feb 19, 2024

Hey @theOrakle - the light sensors seem to be going 'unavailable' every minute or so now, before refreshing and becoming available again - any idea?

@borski
Copy link
Collaborator Author

borski commented Feb 19, 2024

image

@borski
Copy link
Collaborator Author

borski commented Feb 19, 2024

It also didn't fix the group issues, for what it's worth.

@theOrakle
Copy link
Owner

Can you turn on debug and send me the logs?

@borski
Copy link
Collaborator Author

borski commented Mar 5, 2024

2024-03-05 05:20:43.303 DEBUG (MainThread) [custom_components.everlights] {'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 8, 'rssi': -85, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1437, 'loopsPerSecond': 496, 'lastResponseDate': '2024-03-05T05:20:36.000Z', 'lastRequestDate': '2024-03-05T05:20:36.000Z', 'pattern': ['FF0000'], 'effects': []}, 'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 4, 'rssi': -79, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1473, 'loopsPerSecond': 25, 'lastResponseDate': '2024-03-05T05:20:38.000Z', 'lastRequestDate': '2024-03-05T05:20:38.000Z', 'pattern': ['01EEFE', '03FCFF', 'FE89FE', 'FB80FE', 'FEFDF7', 'FEFDF7'], 'effects': [{'effectType': 'twinkle', 'value': 127}]}, 'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 4, 'rssi': -76, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1489, 'loopsPerSecond': 25, 'lastResponseDate': '2024-03-05T05:20:39.000Z', 'lastRequestDate': '2024-03-05T05:20:39.000Z', 'pattern': ['01EEFE', '03FCFF', 'FE89FE', 'FB80FE', 'FEFDF7', 'FEFDF7'], 'effects': [{'effectType': 'twinkle', 'value': 127}]}}
2024-03-05 05:20:43.303 DEBUG (MainThread) [custom_components.everlights] Finished fetching everlights data in 1.193 seconds (success: True)
2024-03-05 05:20:58.353 DEBUG (MainThread) [custom_components.everlights] {'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 8, 'rssi': -85, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1438, 'loopsPerSecond': 496, 'lastResponseDate': '2024-03-05T05:20:51.000Z', 'lastRequestDate': '2024-03-05T05:20:51.000Z', 'pattern': [], 'effects': []}, 'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 4, 'rssi': -77, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1450, 'loopsPerSecond': 24, 'lastResponseDate': '2024-03-05T05:20:52.000Z', 'lastRequestDate': '2024-03-05T05:20:52.000Z', 'pattern': ['01EEFE', '03FCFF', 'FE89FE', 'FB80FE', 'FEFDF7', 'FEFDF7'], 'effects': [{'effectType': 'twinkle', 'value': 127}]}, 'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 4, 'rssi': -76, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1479, 'loopsPerSecond': 24, 'lastResponseDate': '2024-03-05T05:20:54.000Z', 'lastRequestDate': '2024-03-05T05:20:53.000Z', 'pattern': ['01EEFE', '03FCFF', 'FE89FE', 'FB80FE', 'FEFDF7', 'FEFDF7'], 'effects': [{'effectType': 'twinkle', 'value': 127}]}}
2024-03-05 05:20:58.353 DEBUG (MainThread) [custom_components.everlights] Finished fetching everlights data in 1.137 seconds (success: True)
2024-03-05 05:20:58.369 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139989843974336] Error fetching information
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 240, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 892, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 639, in async_handle_light_off_service
await light.async_turn_off(**filter_turn_off_params(light, params))
File "/usr/src/homeassistant/homeassistant/components/group/light.py", line 189, in async_turn_off
await self.hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 2279, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2316, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 917, in entity_service_call
raise result from None
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1540, in async_request_call
return await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 962, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 639, in async_handle_light_off_service
await light.async_turn_off(**filter_turn_off_params(light, params))
File "/config/custom_components/everlights/light.py", line 108, in async_turn_off
await self.coordinator.client.async_set_sequence(self.serial, sequence)
File "/config/custom_components/everlights/api.py", line 68, in async_set_sequence
await self._api_wrapper(
File "/config/custom_components/everlights/api.py", line 102, in _api_wrapper
raise EverlightsApiClientCommunicationError(
custom_components.everlights.api.EverlightsApiClientCommunicationError: Error fetching information
2024-03-05 05:21:09.408 DEBUG (MainThread) [custom_components.everlights] {'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 8, 'rssi': -85, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1436, 'loopsPerSecond': 675, 'lastResponseDate': '2024-03-05T05:21:05.000Z', 'lastRequestDate': '2024-03-05T05:21:05.000Z', 'pattern': ['FF0000'], 'effects': []}, 'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 4, 'rssi': -78, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1468, 'loopsPerSecond': 25, 'lastResponseDate': '2024-03-05T05:21:07.000Z', 'lastRequestDate': '2024-03-05T05:21:06.000Z', 'pattern': ['01EEFE', '03FCFF', 'FE89FE', 'FB80FE', 'FEFDF7', 'FEFDF7'], 'effects': [{'effectType': 'twinkle', 'value': 127}]}, 'XXX': {'bridgeSerial': 'XXX', 'firmwareVersion': 'N3057', 'hardwareVersion': 301, 'active': True, 'configuredLength': 1080, 'colorOrder': 'grb', 'colorCorrection': 'ffffff', 'rebootCount': 4, 'rssi': -76, 'snr': -109, 'current': 65520, 'temperature': 2298, 'voltage': 1479, 'loopsPerSecond': 24, 'lastResponseDate': '2024-03-05T05:20:54.000Z', 'lastRequestDate': '2024-03-05T05:20:53.000Z', 'pattern': ['01EEFE', '03FCFF', 'FE89FE', 'FB80FE', 'FEFDF7', 'FEFDF7'], 'effects': [{'effectType': 'twinkle', 'value': 127}]}}
2024-03-05 05:21:09.408 DEBUG (MainThread) [custom_components.everlights] Finished fetching everlights data in 0.910 seconds (success: True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants