Closed austwhite closed 1 year ago
Hey there @dermotduffy, mind taking a look at this issue as it has been labeled with an integration (hyperion
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
hyperion documentation hyperion source (message by IssueLinks)
For me turning the light on just activates a solid colour and turning the light off turns off the colour, I can only turn the LED output on and off via the Hyperion web UI.
@aliekiddo I noticed the same thing with further testing also
This is likely related to the work @Sab44 did on Decoupling and Simplifying the Hyperion integration. I think the described behavior is working as intended -- and you should have a switch (separate from the light) to enable / disable the USB capture. Check the switch entities for Hyperion and see if this is present for you?
@Sab44 I anticipate several user-support type questions like this -- mind keeping an eye open and we'll tackle them together?
I'm seeing switch entities for USB Capture but they're all unavailable.
Nevermind - click on entity, click on cog, toggle enable, update...
Correct, with the 2023.7 release there's been a breaking change. Unfortunately it was missed in the release blog post.
To sum up: to control external effects such as USB capture, enable the disabled-by-default switch entity. The Hyperion light entity will be used to display solid colors and light effects. For more background info check the corresponding PR. The documentation should hopefully also be updated soon, in the meantime I can only link you to the documentation PR .
@dermotduffy I'm currently on vacation but I'll scan the issues regularly and try and help out as much as I can. Do you know who else I can tag to get the breaking changes and documentation updated asap in order to avoid more confusion with users?
Nevermind - click on entity, click on cog, toggle enable, update...
Happy it works for you now. For anyone reading this, make sure to enable the disabled-by-default switch entity as described.
I wish I had known about the breaking change before upgrading to 2023.7. A non-functional Hyperion integration is a deal breaker for me so I tried to restore from a backup back to 2023.6.3 and it seems the restore feature is broken too. I used to use an entity Hyperion.light to toggle the LED lights on and off. It wasn't until seeing this post that I realized there is now a separate disabled switch entity for the LEDs.
@mike1627 I've just changed the switch type back to a light and renamed it to match what I'd previously got configured and now the functionality is the same.
Well the USB capture switch doesn't seem to do the trick reliably. It's quite hit and miss if it will set the device to USB capture.
Also, turning off the Hyperion light entitit does not actually turn off the light. It just stops Home Assistant sending information. If Hyperion has another effect at a lower priority or an idle effect setup, this takes over. The previous behaviour was to turn off the LED output when you turn off the light.
Just to be clear, the separate disabled-by-default switch entity for the LED device was there all along. What has changed is that turning the light entity off only clears HA's input channel in Hyperion, where previously it would turn off the entire LED device preventing other sources from controlling the lighting. If you have e.g. a background light configured in Hyperion this will now be able to show up. That is the intended behavior.
Once the documentation is updated there will be a simple example for an automation if you wish to couple the light to the LED device again. Posting it here in the meantime:
To toggle the LED device together with the light entity in order to turn light output on or off for all sources. In this example both entities are turned on together, create another automation with the values reversed for turning both off:
- alias: "Turn LED device on when Hyperion light is activated"
trigger:
- platform: state
entity_id:
- light.ambilight
from: "off"
to: "on"
condition:
- condition: state
entity_id: switch.[instance]_component_led_device
state: "off"
action:
- service: switch.turn_on
target:
entity_id: switch.[instance]_component_led_device
I am confused. I have been using Hyperion for three days now (seems to be an ideal time to start), because I am trying to sync not only Hue, but three additional WLED instances to my TV. I use the Platform Capture, since my PC is directly hooked up and my only media source. The functionality I want from HA is simple turn the LEDs on/off in capture mode. I have three elements per device which somehow seem to do this: The device itself which is a light and two switches for Component LED Device and Component Platform Capture. If I play around with them I can get it to work. However, I was not able to recognize a pattern so far... Sometimes toggeling the Light Switch enables the LEDs. Sometimes with sync, sometimes not. Sometimes it turns them on, but cant turn them off again. Sometimes I switch off all three and the light stays on regardless?
Is there a certain order in which I should enable the switches to make it work?
@koshisan This is the same issue I face since the USB Capture (I use USB capture) option was removed from the effects list. I find it quite unpredictable and have to always go to the Hyperion interface directly to turn the led output on and off or to select USB Capture
To understand what's happening I advise you to open the "Remote Control" tab on the Hyperion web interface and observe your changes there, including the component switched on the right. With the recent update, HA's entities now reflect Hyperion's control scheme and no longer couple multiple things together. I understand that this takes some time getting used to, so I will explain it here in detail for you and hopefully clear up all confusion.
Going over the HA entities: HA light entity: toggling this on will add a light source on the configured priority in the left tab of that screen and allow you to show colors or color effects. This has nothing to do with USB or Screen grabber sources.
switch.[instance]_component_usb_capture: this corresponds to the "USB Capture" toggle on the right. Turning it on will add a USB capture source as you can see in the screenshot.
switch.[instance]_component_platform_capture: this corresponds to the "Platform Capture" toggle on the right. Turning it on will add a Platform capture source to the active sources.
switch.[instance]_component_led_device: this corresponds to the "LED Device" toggle on the right. Toggling this will turn the entire device on/off independent of any active sources.
So if you only use Hyperion for e.g. USB grabbing you could leave that source active at all times and only toggle the LED device.
If you intend to use HA's light entity to set a light color or show off one of Hyperion's effects you need to make sure you have configured the priorities correctly so it doesn't interfere with any grabber sources you have set up. Again, check the "Remote Control" tab in the Hyperion interface to observe what's going on. Only the source with the lowest priority number will be shown.
@Sab44 I have done that. The LED Device switch stays on all the time , regardless of where the toggle switch for on and off in Home Assistant is. All the switch does is remove the effect from Hyperion. PRevious behavior was toggle the LED Output entity in Hyperion File Light On: Toggle switch on for Hyperion Light
File Light Off: Toggle switch off for Hyperion lLight
The USB Capture switch (I use USB) does toggle the Capture USB-Input entity in Hyperion, but this is overridden by whatever effect is currently set in Home Assistant and will never change to USB-Capture
With the old way of doing it, we could select the capture device as an effect, and it worked well. Also, as noted above, the toggle switch to turn the Hyperion Light on or off previously actually toggled the LED Output, which it doesn't now, leaving the LED's always on unless I go to the Hyperion interface and turn them off from there I hope this helps a bit
@austwhite Like I said, leave the Hyperion light entity turned off and ignore it for your use case. Simply use the switch.[instance]_component_led_device
for your use-case. Or alternatively, the switch for the USB capture.
Be careful not to confuse the light entity with the LED device. The former is just one source for Hyperion, potentially among others. The latter toggles the device state and therefore light output for all sources.
Remember, you need to enable the switch entity for the LED device in the settings first.
@Sab44
It's just very different behaviour to what we had before. The light entity use to actually switch the LED Output on and off. That made more sense as it worked like every other light entity.
I can see the way you are saying to make it work. The light entity is actually more turning the effects on and off, not a proper light entity as previous behaviour was.
It does mean it is a switch instead of a light entity to turn the light on or off, but I guess that can be customised in HA
@austwhite unfortunately the control schemas between HA and Hyperion are too different to be able to perfectly map them to one another. Other users, like myself, were very confused when turning off the light on HA suddenly prevented all other sources from showing up. So there is no perfect solution I'm afraid. The current state of things, while needing some getting used to, removes any coupling between components and allows users to control everything exactly the way they want to. You can recreate the previous behavior if you so wish by creating some simple automations or even a template light.
@Sab44 I mainly use it for the USB Capture, so I will just rename and remap a couple of entities. It's quite different behaviour, but will work around it if no better solution is available. I know they missed it in the breaking changes, the team, as amazing as they are, are also humans. :)
I guess this issue can be closed if this new behaviour is expected. Hopefully it's documented now :).
Thanks
Once the documentation is updated there will be a simple example for an automation if you wish to couple the light to the LED device again. Posting it here in the meantime:
To toggle the LED device together with the light entity in order to turn light output on or off for all sources. In this example both entities are turned on together, create another automation with the values reversed for turning both off:
- alias: "Turn LED device on when Hyperion light is activated" trigger: - platform: state entity_id: - light.ambilight from: "off" to: "on" condition: - condition: state entity_id: switch.[instance]_component_led_device state: "off" action: - service: switch.turn_on target: entity_id: switch.[instance]_component_led_device
Thank you for this! Simple solution but it does the job and resolved my issues
My hyperion leds automatically turn on when I switch on my apple tv, but none of the entities in ha seem to update their state
How not to submit a PR.
No breaking change.
No clear instruction on how to return previous functionality.
What if you use a capture device other than USB?
Honestly this PR should be reverted.
Also the LED Device switch (once enabled) does nothing. It reverts to off after being turned on.
I can toggle the LED switch in the Hyperion dashboard but the Home assistant LED Device switch has no effect.
@tomlut The LED device switch in HA works as expected for me. I just used the switch as light for that one to turn it on and off, and renamed the original light entity to Hyperion Effects, as it only turns effects on and off.
I can understand why people didn't like the old behaviour, as a lot use other sources in Hyperion and not just Home Assistant, but I agree that the new behaviour is completely unintuitive and not consistent with Home Assistant behaviour with other integrations.
Given this integration is an official integration, it should be consistent with other integrations and the light entity that is exposed, should behave like other light entities and turn the light on and off.
The way entities are exposed in Home Assistant should be changed to match behaviour and the LED Device should be a Light Entity as that turns the light on and off and the effects entity should be either integrated as attributes of the LED Device entity or should be renamed by default to be an effects only, even though this is not consistent with other light entities.
These are just my opinions and ultimately it is up to the Home Assistant developers, but so far Nabu Casa have been trying to make Home Assistant consistent with behaviour and I feel these new changes are not consistent to other light entity behaviours.
No disrespect to the developers of this hyperion integration, who I know work on this in free time and are not paid, just my opinions
As far as things go, my original complaint / issue report has been addressed by the developers advising of the changes that have been made, so this issue is technically resolved. A new issue should be raised to create a discussion point on the viability of the changes compared to the previous behavior, so I will close this issue for now. If the developers wish to reopen it to address further concerns, they can do so :).
closing as per my previous comment
Totally agree with your comments regarding this PR.
I will open another issue if I can't get the LED switch to work after a restart.
Happy found this thread been pulling my hair out since update .. I'll review and try to get mine back working
But how to change the brightness through the new switches when i use usb/platform capture?
But how to change the brightness through the new switches when i use usb/platform capture?
Check my comment over here on this similar issue.
@Sab44 is this now going to be permanent change ? Hence I need to make these automations ?
@Sab44 is this now going to be permanent change ? Hence I need to make these automations ?
Yes.
The problem
Since the upgrade of Home Assistant to 2023.7, Hyperion Integration is no longer showing me the USB Capture effect option that allows it to capture the image from the TV Screen to display matching colours.
What version of Home Assistant Core has the issue?
2023.7
What was the last working version of Home Assistant Core?
2023.6.2
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Hyperion
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hyperion/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I have tried an uninstall and reinstall of the Integration with no change. I am running Hyperion NG Version 2.0.15 on a Raspberry Pi 3b+ with latest updates performed. LED's are connected via GPIO18 and a HDMI USB capture device is in use, which has not changed for the past 2 years I have been using this. When entering Hyperion directly, I can select USB Capture and all works fine. I just do not see the option within Home Assistant