-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Home assistant hyperion integration is broken #118
Comments
SSDP has been reworked in v17 and may lead to incompatibility with some old Hyperion plugins. |
Oh, that's sad that we've lost api compatibility with existing HA integration. HA integration requires freaking hell of copy-paste work. Anyway, thanks for your great work! |
Hello. Home Assistant integration was working fine with 16.x release but not it is completely broken. I had automation that turned on LED device and USB capture when my TV went on, but this is not working now. Can I use some sort of API call (http rest?) to enable/disable this? Thank you. |
Hi |
Managed to implement this json_rpc using HA rest call. FYI:
And then in my automation:
Now to test how is CPU usage on my RPi Zero W. It was just under 100% when USB grabber was on. I think I need better Raspberry Pi for running HyperHDR. |
I think switching to GET request could make the configuration even simpler, but not using HA so thank you for providing example 👍 It can be done even for Rpi zero for one instance if your grabber has a scaler and its capturing is not limited to 1080p/MJPEG and high frame rate : everything is a matter of the proper configuration beginning with lower resolution, choosing YUV, a 'quarter of frame' mode and 'frame rate decimation' in the grabber, sparse processing and not setting too high values in the 'smoothing' component (or disable it completely): both processing tab. |
My smoothing setting: And USB capture settings: Only smoothing and blackbar detection is enabled. When needed I enable USB capture and LED device. Had much better results with HyperHDR compared to Hyperion NG. Flickering is gone. Colors are more vivid. If you have any more optimisation advice I would be very grateful. This Home Assistant issue was just a little setback. Need to figure our how to use effects. Winter is coming and I would like to have some light effects around the TV when we are not watching it. Maybe HA Hyperion integration will be updated to support also this latest version of HyperHDR. Thank you. |
The problem with HA Hyperion NG plug-in is probably only configuration matter when it reads application configuration from SSDP file described above: some names have changed. You may try setting 'software frame skipping' to 2, but it will reduce your framerate to around 10FPS. But first check in logs 'av. delay' for processing frame: they are refresh every one minute. For smoothing refresh time set it to 50-150ms. it does not effect the performance but only delay. And probably you want to enable 'antiflickering timeout' or at least test it 😉 |
For what it's worth, I set up a new sdcard (rpi4, aarch64) and only had to uncheck "Classic HyperHDR calibration" on the 'Image Processing' & 'Remote Control' pages to get back the standard 'Brightness' percentage (instead of 'Luminance') and now it seems to work perfectly well with the existing HA Hyperion NG integration. Is there any down-side to disabling "Classic" calibration? I had to implement my own toggle for enabling/disabling HDR Tone Mapping but that was pretty easy thanks to the new JSON API playground. Perhaps some day someone will consider making a proper HyperHDR integration for HA... who knows, Hacktoberfest is coming. HyperHDR is really amazing and blows Hyperion out of the water! Thanks! @awawa-dev |
Thanks @mjoshd :) Both calibrations come from Hyperion (old & new). I just remixed them because I don't like new calibration and find the old one much easier, but I want to give a user a choice. It's offtopic but from my experience calibration is useful for tuning up brightness or if the wall behind is not white and we want to balance it. In other cases the effect is limited as you calibrating LED for full color: maximum red, blue green etc but the LED strip behaves differently on darker color and it's not linear. In that case 'classic' calibration saturation could help a bit. For RGBW cold white I use default settings without any modification but for that type of LED strip white channel algorithm is crucial. |
@nurikk @thehijacker @awawa-dev I've done some digging as to why my installation was working while others are unable to get it going and found a workaround until there is a proper HyperHDR HA integration. It was because I had Hyperion.ng set up and running with HA before I installed HyperHDR on my Pi, and I never removed the HA integration during the changeover. I did some tests this morning and found an easy way for anyone to do the same.
With this workaround, the only thing really missing in HA is the ability to toggle HDR Tone Mapping/HDR Global which can easily be done through HA or Node-RED. I think the root of the incompatibilty is that the HA integration has a requirement (in its manifest.json) which defines use of hyperion-py In the hyperion-py library are some constants referring specifically to Hyperion and it looks like HyperHDR's description.xml now no longer has any references to hyperion (as of v17), which is probably for the best and also why it used to 'just work' with v16. I plan to make a fork of the HA integration & hyperion-py library to try and see if I can adapt it and/or create a proper HyperHDR HA integration. I'm pretty familiar with coding but know nothing of python so it could take a while. Hopefully the workaround I described above will help others to get HyperHDR working with the existing HA Hyperion integration until then. |
Hi, I found a fairly easy way to resolve by modifying line 402 of config_flow.py in the usr/src/homeassistant/homeassistant/components/hyperion folder in my docker container: Change: Serial no obtained from description.xml file as described above. Until an update resolves this, it will need changed on every homeassistant installation update though. I'd love to be able to do a HyperHDR integration but I'm just not that experienced, I don't understand most of the code tbh. EDIT: I managed to understand it enough to edit the code to add the switch entity for HDR Mode though! @awawa-dev Thanks for this latest version, managed to get HDR Mode to switch automatically when using Plex :-) |
Slightly off topic but how did you do this? |
@tavalin Hi Daniel, I just used Node-RED, notably the node https://flows.nodered.org/node/node-red-contrib-plex-ws. It has only had limited testing but has worked so far in my case, I'm sure the flow could be improved upon. |
To all concerned, I've found the cause of the issue, it is due to the JSON returned from sysinfo command http://192.168.1.72:8090/json-rpc?request={"command":"sysinfo"}. The key returned for the id is info.hyperhdr.id whereas the HA integration relies on dermotduffy/hyperion-py which looks for info.hyperion.id as can be seen in the code at line 1471 in client.py: It would be great if someone more knowledgable than I could merge dermotduffy's code and the HA Hyperion integration into a new HyperHDR integration, I'd certainly help where I could. |
If people just want a simple switch to turn on or off your lights with Alexa or in a Lovelace dashboard this is a simple solution: Create this switch in your configuration:
And this rest command:
Thanks to @thehijacker for the rest command setup. Works like a charm like this. |
@nurikk @tavalin @bverwijst @thehijacker @deimoszero @awawa-dev
It took a long time but I finally had a chance to sit down and dig into the code. I've tested it at my house and it works well so I thought I'd share! This is my first time working with python and HA custom components so let me know if any parts of it don't work as expected by opening an issue on my repo; no need to clog up the issue tracker here. Cheers! 🎉 |
Awesome work! Thanks, I just installed it here and it's working absolutely fine. Much easier to integrate this with my node-red automations too now. Might be worth posting it on the Home Assistant forum too. |
Great job @mjoshd ! Although I don't use HA I've managed to install it to test the plugin on my backup Rpi and seems it works fine for my basic configuration 👍 I will mention about your project in readme.md and in next release info. |
That's awesome! Very very cool! Thank you :) |
I'm getting an Error, after the token step of the integration installation. Any thoughts? |
Can confirm, after the latest Home Assistant update my button or any automations with HyperHDR stopped working. |
Hi, I can't add hyperhdr to home assistant using default integration.
Bug report, debug log and your config file (FULL LOGS ARE MANDATORY)
HyperHDR logs:
Home assistent logs are empty, ui shows me this message
Steps to reproduce
hyperion
What is expected?
Add hyperhdr integration
What is actually happening?
Nothing, only error message
System
Home assistant
System Health
Home Assistant Community Store
Home Assistant Cloud
Home Assistant Supervisor
Lovelace
The text was updated successfully, but these errors were encountered: