GithubHelp home page GithubHelp logo

mvdwetering / huesyncbox Goto Github PK

View Code? Open in Web Editor NEW
101.0 7.0 6.0 322 KB

Custom integration for Home Assistant to control the Philips Hue Play HDMI Sync Box

License: Apache License 2.0

Python 97.63% Shell 2.37%
homeassistant-integration philips-hue huesync hacs hue-entertainment

huesyncbox's People

Contributors

dcsbl avatar florie1706 avatar hwikene avatar mvdwetering avatar stephangr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

huesyncbox's Issues

huesyncbox.set_sync_state gives error on input

huesyncbox.set_sync_state
entity_id: media_player.philips_hue_hdmi_sync_box
input: "hdmi2"

Gives me Failed to call service huesyncbox/set_sync_state. value is not allowed for dictionary value @ data['input']
What am I missing?

IndexError: list index out of range

Just installed this via HACS and after restarting and connecting this shows in the error log. Any ideas?

Traceback (most recent call last):
File "/config/custom_components/huesyncbox/huesyncbox.py", line 34, in async_setup
await self.async_update_registered_device_info() # Info might have changed while HA was not running
File "/config/custom_components/huesyncbox/huesyncbox.py", line 81, in async_update_registered_device_info
devices[0].id,
IndexError: list index out of range

Thanks

Integration work only until container recreation/restart

Describe the bug
Integration stops working after container with home assistant is restarted or is recreated:
image

If it enters that state I have to remove the sync boxes from the integration and readd them pushing the button on them.

To Reproduce
Configure sync box. Restart container.

Expected behavior
Integration should work normally after restart

Diagnostics

2023-12-13 20:35:27.798 DEBUG (MainThread) [aiohuesyncbox.huesyncbox] get, https://_10.0.2.36:443/api/v1, None
2023-12-13 20:35:27.799 DEBUG (MainThread) [aiohuesyncbox.huesyncbox] get, https://_10.0.2.35:443/api/v1, None
2023-12-13 20:35:39.256 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Katarzyna's Sync Box for huesyncbox: Timeout requesting data from 10.0.2.36
Traceback (most recent call last):
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 216, in request
    async with self._clientsession.request(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1187, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 601, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 960, in start
    with self._timer:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 735, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/huesyncbox/__init__.py", line 45, in async_setup_entry
    await api.initialize()
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 163, in initialize
    await self.update()
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 174, in update
    response = await self.request("get", "")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 237, in request
    raise RequestError(
aiohuesyncbox.errors.RequestError: Timeout requesting data from 10.0.2.36

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/huesyncbox/__init__.py", line 50, in async_setup_entry
    raise ConfigEntryError(err) from err
homeassistant.exceptions.ConfigEntryError: Timeout requesting data from 10.0.2.36
2023-12-13 20:35:39.260 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry TV Sync Box for huesyncbox: Timeout requesting data from 10.0.2.35
Traceback (most recent call last):
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 216, in request
    async with self._clientsession.request(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1187, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 601, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 960, in start
    with self._timer:
  File "/usr/local/lib/python3.11/site-packages/aiohttp/helpers.py", line 735, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/huesyncbox/__init__.py", line 45, in async_setup_entry
    await api.initialize()
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 163, in initialize
    await self.update()
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 174, in update
    response = await self.request("get", "")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/deps/lib/python3.11/site-packages/aiohuesyncbox/huesyncbox.py", line 237, in request
    raise RequestError(
aiohuesyncbox.errors.RequestError: Timeout requesting data from 10.0.2.35

Logging
If there are errors in the Home Assistant logs please add them here.

Environment
Provide details about the versions you are using, which helps to reproduce and find the issue quicker.

  • Home Assistant Core version: 2023.12.2
  • Home Assistant operating environment (OS/Container/Supervised/Core): Container
  • Huesyncbox integration version: v2.0.0.0
  • Last working version (if known): Unknown

Additional info
Add any other info about the problem here.

Hue sync box connection

Anyone else notice that after a few hours or maybe half a day when using this integration the hue sync box goes unavailable and becomes totally unable to connect to my WiFi or even be found by the hue app until I totally reset it. I've had to do this for a couple days in a row now

HA warning for breaking change in 2024.8

Logger: homeassistant.data_entry_flow
Source: data_entry_flow.py:765
First occurred: 10:30:35 AM (1 occurrences)
Last logged: 10:30:35 AM

custom_components.huesyncbox.config_flow::ConfigFlow calls async_show_progress without passing a progress task, this is not valid and will break in Home Assistant Core 2024.8. Please report it to the custom integration author

where to add the repository...

I guess I missing something...
can you clarify "Add this repository https://github.com/mvdwetering/huesyncbox to HACS as a "custom repository" with category "integration". This option can be found in the ⋮ menu"

I was thinking it was in Supervisor | Add-ON store and add from the menu but when I'm adding it here... it's bringing no option...

IndexError: list index out of range (Hue Play Gradient)

Just recently the integration stopped working for some unknown reason.

I just recently (FINALLY) installed the new Hue Play Gradient lightstrip. I'm assuming the issue is related to this.

Error log
2021-05-14 01:51:09 ERROR (MainThread) [homeassistant.components.media_player] Error adding entities for domain media_player with platform huesyncbox
Traceback (most recent call last):
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 364, in async_add_entities
    await asyncio.gather(*tasks)
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 558, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 581, in add_to_platform_finish
    self.async_write_ha_state()
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
    self._async_write_ha_state()
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 370, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/components/media_player/__init__.py", line 868, in state_attributes
    value = getattr(self, attr)
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 338, in media_title
    return f"{self.get_mode().capitalize()} - {self.sound_mode.capitalize()}"
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 315, in sound_mode
    attributes = self.device_state_attributes
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 210, in device_state_attributes
    'entertainment_area': self._get_selected_entertainment_area()
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 193, in _get_selected_entertainment_area
    id = parts[1]
IndexError: list index out of range
2021-05-14 01:51:09 ERROR (MainThread) [homeassistant.components.media_player] Error while setting up huesyncbox platform for media_player
Traceback (most recent call last):
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 239, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 364, in async_add_entities
    await asyncio.gather(*tasks)
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 558, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 581, in add_to_platform_finish
    self.async_write_ha_state()
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 334, in async_write_ha_state
    self._async_write_ha_state()
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 370, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/Volumes/HomeAssistant/.venv/lib/python3.9/site-packages/homeassistant/components/media_player/__init__.py", line 868, in state_attributes
    value = getattr(self, attr)
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 338, in media_title
    return f"{self.get_mode().capitalize()} - {self.sound_mode.capitalize()}"
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 315, in sound_mode
    attributes = self.device_state_attributes
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 210, in device_state_attributes
    'entertainment_area': self._get_selected_entertainment_area()
  File "/Volumes/HomeAssistant/custom_components/huesyncbox/media_player.py", line 193, in _get_selected_entertainment_area
    id = parts[1]
IndexError: list index out of range

Unable to register

I am trying to register the Sync Box: I've got the integration installed Home Assistant says that it's discovered the sync box, but when I click configure I get this:

image

If I click submit, I get this:

image

What am I missing?

Devices unavailable after HA restart

Steps to reproduce:

  • Install component
  • Restart HA
  • Configure all discovered Hue Sync devices (in this case, two)
  • Restart HA

All Hue Sync devices are unavailable after restarting and HA logs that this component isn't generating unique IDs:

2020-11-01 18:08:54 ERROR (MainThread) [homeassistant.components.media_player] Platform huesyncbox does not generate unique IDs. ID DEADBEEF0000 already exists - ignoring media_player.hue_sync_1
2020-11-01 18:08:54 ERROR (MainThread) [homeassistant.components.media_player] Platform huesyncbox does not generate unique IDs. ID DEADBEEF0001 already exists - ignoring media_player.hue_sync_2
2020-11-01 18:16:07 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.hue_sync_2
2020-11-01 18:16:56 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities media_player.hue_sync_1

Toggle Power State

Describe the bug
media_player.toggle service call only turns on but not off.

Expected behavior
media_player.toggle should toggle between power states.

Environment
Docker

  • Home Assistant Core version: 2022.08.06
  • Huesyncbox integration version: v1.22.0

Show which input is detecting signal in attributes

Is your feature request related to a problem? Please describe.
I have a chromecast connected to the sync box. The chromecast is always on and always provides HDMI signal to the box. Thus, I the input switching options provided by the Sync Box don't work properly - it'll never switch from Chromecast to something else.

Describe the solution you'd like
I would like to create HA automatons for switching inputs. To do that I would like an option to see which inputs are providing HDMI signal. This Information is available in the app: when the sync box is on, for each input you can see one of three options:

  1. No HDMI input detected
  2. No signal detected.
  3. HDMI Input detected
    I would like to have this information available as the attributes.

Describe alternatives you've considered
An alternative for me is to:

  1. Use HA automation for switching inputs to/from chromecast when I know if the chromecast is playing/idle
  2. Use Sync Box built in automations for other inputs
    It's ugly, complicated and I can't work it out properly (yet).

Old entity still existing after the migration into 2.0.0. version.

Hello.

After the migration to the new version 2.0.0, the new entities seem to be correctly created but the old 'media_player' entity is still existing.

The action on this entity don't work anymore.

How remove the "media_player" entity ?

I have restarted homeassistant twice.

Thanks for your help and your job.

function syncronization is performed

Hello

I am looking for a way to only switch off the lamp in the app mentions this function synchronization is performed and there a button long stop / start? would there be something possible to put this function in the media player? so if you're already doing the intensity? and then eg synchronization is performed as name? under there choices between play or stop, for example? I now do it via the app itself, but are it as handy as this can be done in the home assistant via the media player?

thanks in advance
greetings jrspower

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'ee0a0c4da8e2078287ae04a14dea6f38'

Hi There,

Installed latest Hue Box Integration and when I use the SET option I always get a error , but the SET is working on the Sync Box.

Version v2.0.0b2

2023-08-20 10:53:38.046 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'ee0a0c4da8e2078287ae04a14dea6f38'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/huesyncbox/services.py", line 93, in async_set_sync_state
    coordinator = hass.data[DOMAIN][config_entry_id]
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'ee0a0c4da8e2078287ae04a14dea6f38'
2023-08-20 10:53:49.379 ERROR (MainThread) [homeassistant.helpers.script.websocket_api_script] websocket_api script: Error executing script. Unexpected error for call_service at pos 1: 'ee0a0c4da8e2078287ae04a14dea6f38'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step
    response_data = await self._async_run_long_action(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action
    return long_task.result()
           ^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/huesyncbox/services.py", line 93, in async_set_sync_state
    coordinator = hass.data[DOMAIN][config_entry_id]
                  ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'ee0a0c4da8e2078287ae04a14dea6f38'
service: huesyncbox.set_sync_state
data:
  sync: true
  brightness: 70
  intensity: moderate
  mode: video
  input: input1
  entertainment_area: TV room
target:
  device_id: ca734212663336331243ffd0104937dc

Off-topic: The solution to have this "huesyncbox" set option is great. All in one and everyone can understand this.

Can't make this integration to work

Describe the bug
Even though the installation goes fine, it never starts due to an error

To Reproduce
Steps to reproduce the behavior:

  1. Install HACS method
  2. Check for logs and seeerror

Environment

  • Home Assistant Core version: 2021.9.5
  • Home Assistant operating environment (OS/Container/Supervised/Core): OS
  • Huesyncbox integration version: 1.13.0

Additional info

Logger: homeassistant
Source: custom_components/huesyncbox/huesyncbox.py:125
Integration: Philips Hue Play HDMI Sync Box (documentation, issues)
First occurred: 3:04:18 AM (1 occurrences)
Last logged: 3:04:18 AM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 153, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 171, in _async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 710, in async_create_flow
integration.get_platform("config_flow")
File "/usr/src/homeassistant/homeassistant/loader.py", line 524, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 529, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/config/custom_components/huesyncbox/init.py", line 37, in
from .huesyncbox import PhilipsHuePlayHdmiSyncBox, async_remove_entry_from_huesyncbox
File "/config/custom_components/huesyncbox/huesyncbox.py", line 125, in
async def async_register_aiohuesyncbox(hass, api: aiohuesyncbox.HueSyncBox):
AttributeError: module 'aiohuesyncbox' has no attribute 'HueSyncBox'

Does any see this behavior?

Integration into home assistant maintaining the hue sync app

Hello,

I have a question regarding the integration of the hue sync into home assistant.

I have installed it using HACS but at some point I have to press the button and wait for a green light. If I do this, will my Hue syn app lose the connection to the sync box? My idea is to keep this working (hue sync box + hue sync app) but read some data using the integration to implement some scenes and other stuff.

Thanks in advance.

Trouble with syncing with my actual hue sync box

Hello,

I'm totally new with home assistant and I'm still learning and eager to learn too. I had no trouble to install the huesyncbox addon and he did find my hue sync box and I was able to put to configured it into HA but he don't recognize any of the 4 HDMI config and I was wondering if I had to do this manually of it should sync everything from my box like the phillips hue lights system?

Thanks for all help you can provide,

Ghislain

brightness sensor

hello
I have a question wouldw it be possible for a sensor to make
the brightness so that I can use it to see how much the brightness is ?

thank you in advance !

Home Assistant 0.113.0

Hello,

Any way this can be solved? The integration does not work anymore and I do not know why.

2020-07-23 23:07:51 ERROR (MainThread) [homeassistant.config_entries] Error importing platform config_flow from integration huesyncbox to set up huesyncbox configuration entry: cannot import name 'ConfigType' from 'homeassistant.helpers' (/usr/src/homeassistant/homeassistant/helpers/init.py)
2020-07-23 23:07:51 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration huesyncbox: cannot import name 'ConfigType' from 'homeassistant.helpers' (/usr/src/homeassistant/homeassistant/helpers/init.py)

Dolby Vision compatibility - switch request

Thanks for this great integration
Once a while I need to switch on/off the Dolby Vision compatibility switch in the Hue app. That is a well know issue of the syncbox on some LCD.

Is there the chance you can include also this command in your great integration?
Thanks

HomeKit

Hi,
I would obtain an object to enable syncing light using HomeKit scenes.

I have to create a. Ew switch/services? Which one?

Add Discussion tab

Hi !

Is it possible for you to add the Discussion tab ?

It will be interesting if someone have questions about this project

Thanks

Cannot connect to Hue Sync Box from HA

Describe the bug
I am unable to connect to the Hue Sync Box using the integration in Home Assistant. I get the 'Connection Failed' error. This happens when connecting automatically when suggested through HA and also manually by selecting the integration and entering the details. I have power cycled the sync box, the router, restarted HA numerous times.

To Reproduce
Steps to reproduce the behavior:
I choose the Hue Sync Box Integration
Enter the IP address and Device ID from the Hue app
Click next
The error appears

Expected behavior
Home Assistant should connect to the Hue Sync Box

Diagnostics
No diagnostics as the integration has not yet connected.

Logging
Nothing in HA logs about the integration

Environment
Core
2023.12.0
Supervisor
2023.12.0
Operating System
11.2
Frontend
20231206.0

  • Huesyncbox integration version:
  • v2.0.1
  • Last working version (if known):
  • n/a

Additional info
Initially I thought that it was due to me not using the Hue integration as I bring Hue bulbs in through Smartthings but after adding the Hue Integration, the issue persists.

Cannot Set Brightness via Script/Automation

Describe the bug
Setting the brightness via the included service fails.

To Reproduce
Steps to reproduce the behavior:

  1. Create a script or automation
  2. Add "Call Service" action
  3. Select "Philips Hue Play HDMI Sync Box: Set brightness"
  4. Select brightness in UI or set via YAML

Only 0 and 1 can be selected as values and setting values via YAML does not work either.

Expected behavior
Brightness value of Hue Sync Box updated.

Environment

  • Home Assistant Core version: core-2021.11.0
  • Home Assistant operating environment (OS/Container/Supervised/Core): OS
  • Huesyncbox integration version: 1.14.0

Add ability to set entertainment area used from the integration

As a reminder from: https://community.home-assistant.io/t/philips-hue-hdmi-play-sync-box-integration/204772/17

Any of you clever people figured out how to change the Entertainment zone without using the Hue Sync App?

For example, movies I prefer only certain lights and 25-30% brightness with high intensity, but for DJ sets/music I like a larger entertainment zone with higher brightness.

The brightness levels I can script to various room modes/scenes, but I’m just missing the ability to change the Entertainment zone.

Error connecting to the Philips Hue Play HDMI Sync Box

Describe the bug
I'm successfully able to setup and configure the integration within HA however after setup, I receive the above error.
I've went right back to the beginning and using the a basic python script with aiohuesyncbox, it fails to initialize.
When I look at the code, its attempting to get the current state from the HueSyncBox (as per this comment) and just hangs

To Reproduce

root@server ~ # curl -vvv -k https://192.168.10.12/api/v1/ -H "Accept: application/json" -H "Authorization: Bearer [redacted]"
*   Trying 192.168.10.12...
* TCP_NODELAY set
* Connected to 192.168.10.12 (192.168.10.12) port 443 (#0)
...
* SSL connection using TLSv1.2 / ECDHE-ECDSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=NL; O=Philips Hue; CN=[redacted]
*  start date: Aug 15 10:23:37 2019 GMT
*  expire date: Dec 31 23:59:59 9999 GMT
*  issuer: C=NL; O=Philips Hue; CN=root-hsb
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
> GET /api/v1 HTTP/1.1
> Host: 192.168.10.12
> User-Agent: curl/7.61.1
> Accept: application/json
> Authorization: Bearer [redacted]
> 
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 3694.                                     # hangs here for a good 15mins
* OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
* Closing connection 0
curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

Expected behavior
Connection successful

Environment
hassio

  • Home Assistant Core version: 2022.7.5
  • Home Assistant operating environment (OS/Container/Supervised/Core): Core
  • Huesyncbox integration version: 1.22.0
  • Last working version(if known): none

Additional info
I'm wondering if you've ever seen this behaviour from a HueSyncBox.

To add, it's running the latest firmware version at time of writing (v1.8.3) and I've attempted multiple reboots of the device.

EDIT: All other endpoints respond fine. E.g. /api/v1/hue, /api/v1/device

Any help would be appreciated.

Cheers,
Kev

This custom component will stop working in Home Assistant 2022.6

Hi there, thanks for your work on this custom component.

This custom component uses discovery_info['host'] instead of discovery_info.host.
This will fail in Home Assistant version 2022.6
The Home Assistant core logs asked me to report this issue to the custom component author.
Please see below.

`Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: 9:39:19 am (1 occurrences)
Last logged: 9:39:19 am

Detected integration that accessed discovery_info['host'] instead of discovery_info.host; this will fail in version 2022.6. Please report issue to the custom component author for huesyncbox using this method at custom_components/huesyncbox/config_flow.py, line 65: "host": discovery_info["host"],`

Please let me know if you need any additional information, or I can help at all.
Thanks in advance!

Setup failed for custom integration huesyncbox: Unable to import component: No module named 'aiohuesyncbox'`

Describe the bug
After upgrading to 2022.7.0 on docker, the following message is found in startup logs.

Logger: homeassistant.setup
Source: setup.py:162 

Setup failed for custom integration huesyncbox: Unable to import component: No module named 'aiohuesyncbox'

To Reproduce
Steps to reproduce the behavior:

  1. Have a working HAAS 2202.6.x instance with HACS & huesyncbox configured properly.
  2. Upgrade to 2202.7.0
  3. See error in startup logs.

Expected behavior
A clear and concise description of what you expected to happen.

Expected to continue working without issue.

Environment
Provide details about the versions you are using, which helps to reproduce and find the issue quicker.

  • Home Assistant Core version: 2022.7.0
  • Home Assistant operating environment (OS/Container/Supervised/Core): Container
  • Huesyncbox integration version: 1.22
  • Last working version(if known): 1.22

Additional info
Add any other info about the problem here.

2022-07-06 16:04:14 DEBUG (SyncWorker_0) [homeassistant.util.package] Running pip command: args=['/usr/local/bin/python3', '-m', 'pip', 'install', '--quiet', 'aiohuesyncbox==0.0.21', '--timeout', '60', '--upgrade', '--constraint', '/usr/src/homeassistant/homeassistant/package_constraints.txt', '--find-links', 'https://wheels.home-assistant.io/musllinux/', '--prefer-binary', '--user', '--prefix=']
2022-07-06 16:04:36 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration huesyncbox: Unable to import component: No module named 'aiohuesyncbox'

Looking in https://wheels.home-assistant.io/musllinux/, there does not appear to be an aiohuesyncbox package any longer.

Manual Resolution

I was able to resolve this by manually installing aiohuesyncbox in the container with:

pip install aiohuesyncbox and it used a cached version already existing in a container volume.

Integration installed correctly. However no device found

Hi,
I'm using Home Assistant 0.117.5 and I installed the integration correctly with HACS.

image

[[[ I installed it by clicking on the "+" orange icon and then I selected "add repository " and clicked on the HDMI Sync Box
image ]]]

Everything seemed to work fine. However I'm not able to find the device in the corresponding Home Assistant section and, as far as I understood, the integration should be able to discover the hdmi sync box automatically.

Thanks

ability to switch bridges

Is your feature request related to a problem? Please describe.
The app allows to switch to a different bridge. Can this capability be exposed?

Describe the solution you'd like
The set sync state service should expose which bridge we want the sync box to target or expose two media players, one for each brdige.

Describe alternatives you've considered
No known alternatives.

Additional context
Some large hue setups have multiple bridges

Entity implements device_state_attributes. Please report it to the custom component author.

Hiya, hope you're well. 🎄

I saw the below pop up in my logs and thought I'd let you know.
Thanks!

2021-12-18 18:29:31 WARNING (MainThread) [homeassistant.helpers.entity] Entity media_player.lounge_hue_sync (<class 'custom_components.huesyncbox.media_player.HueSyncBoxMediaPlayerEntity'>) implements device_state_attributes. Please report it to the custom component author.

Implement reauth flow

Is your feature request related to a problem? Please describe.
When for some reason authentication fails on a previously setup device the only way to recover is delete and re-add device.

Describe the solution you'd like
Implement async_step_reauth as it seems to be the right way to do it. However there is no documentation on it so I guess it is quite new so it would require some more investigation.

Describe alternatives you've considered
Just leave as is ;)

Additional context
async_step_reauth was mentioned in the #devs channel in HA discord.

Cannot complete integration

Installed via HACS and restarted Home Assistant (0.117.4). New device automatically discovered just fine. Went to complete integration steps, but upon the step that states to push button on Sync for 3 seconds until light flashes green repeatedly fails with "unexpected error". Have repeated muliple times with the same result.

image

HA log shows the following:

image

And the full log error:

image

Failed to call service media_player/media_play. 16: Invalid State

Hi,
i'm new to HA but i've been through a few installations of HA and a few resets of the hue box. i'm on a PI4 now but, each installation, i've received the following error while trying to turn of the sync setting:
Failed to call service media_player/media_play. 16: Invalid State
i am able to change inputs...
any thoughts would be helpful
thanks

Error "Updating huesyncbox media_player took longer than the scheduled update interval 0:00:02"

Describe the bug
Somtimes when I use my automation (if hue syncbox is idle and tv is on then do hue syncbox sync_on) it does trigger but does not start the sync. In my log i have this

Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:692
Integration: Mediaplayer (documentation, issues)
First occurred: 16. September 2021, 06:51:50 (167 occurrences)
Last logged: 16:24:47

Updating huesyncbox media_player took longer than the scheduled update interval 0:00:02

Expected behavior
Send a sucessfull sync_on to the box

Environment
Official docker image

  • Home Assistant Core version: 2021.9.7
  • Home Assistant operating environment (OS/Container/Supervised/Core): Docker
  • Huesyncbox integration version: 1.14.0

Duplicate entries in automation triggers/conditions/actions

Describe the bug
There are duplicate items in the automation trigger, condition and action dropdowns.

To Reproduce
Steps to reproduce the behavior:

  1. Create a device automation
  2. Select Philips Hue Play HDMI Sync Sox device
  3. Open trigger, condition or action dropdowns
  4. Duplicate actions listed

Expected behavior
No duplicate actions

Environment
Provide details about the versions you are using, which helps to reproduce and find the issue quicker.

  • Home Assistant Core version: 2021.12
  • Home Assistant operating environment (OS/Container/Supervised/Core): OS
  • Huesyncbox integration version: 1.16
  • Last working version(if known):

Additional info
image

HomeKit shows 3 accessories

Hello,

Thank you for this awesome integration. I have it working within Home Assistant and exposed the media_player to HomeKit. I noticed within the Apple Home app there are three accessories that show up. I was curious what the difference was between the "Play-Pause" and "Play-Stop" actions. They both seem to do the same thing and when one is turned on/off the other also does the same.

IMG_0104

problem publishing switches on Homekit bridge

Hi,
I removed media player from my Homekit bridge integration.

this is my old configuration:

 - name : HASSIO Bridge Sync Box
    port: 21065
    mode: accessory
    filter:
      include_entities:
        - media_player.sync_box_2
    entity_config:
      media_player.sync_box_2:
        feature_list:
          - feature: on_off
          - feature: play_stop

I changed it in this new configuration:

  - name : HASSIO Bridge Sync Box
    port: 21065
    mode: accessory
    filter:
      include_entities:
        - switch.sync_box_power
        - switch.sync_box_light_sync

but I see only switch.sync_box_power in Homekit...
why I can't see also switch.sync_box_light_sync?

EDIT: Fix yaml formatting

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.