demolud2
(Maciek)
July 6, 2024, 6:17pm
1
Hi,
it happened out of nowhere. I can’t even recall if there was any restart of HA - but I assume this must have triggered it.
I am using command line to control Onkyo receiver. Until recently I run a script which would turn on the receiver and dial radio station from TuneIn.
It stopper working. I get error:
[Errno 2] No such file or directory: onkyo
In logs I can see:
File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'onkyo'
My command line is defined in configuration.yaml:
shell_command:
onkyo_command: onkyo --host {{ ip }} {{ cmd }}
when I check for onkyo via terminal I can see:
~ ls -l /usr/bin/on*
-rwxr-xr-x 1 root root 209 Jul 6 17:01 /usr/bin/onkyo
Would you have any idea how do I resolve this?
Regards,
Maciek
Hi there
I’m facing exactly the same issue. It worked for many years and suddenly stopped working since a few a days.
Errno 2] No such file or directory: ‘onkyo’
koying
(Chris B)
July 7, 2024, 11:14am
3
I guess this is due to that change:
home-assistant:dev
← arturpragacz:onkyo/async-push
opened 02:31PM - 20 Jun 24 UTC
## Proposed change
<!--
Describe the big picture of your changes here to com… municate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
Switch to library [pyeiscp](https://github.com/winterscar/python-eiscp/tree/master).
Convert the integration to local_push, making it tremendously more responsive.
### Background
Recently, while fixing bug #119949, I couldn't help but notice that Onkyo integration is in a really rough state.
I did some research and it turns out, that there have been numerous attempts to modernize it over the past several years (the last one being #59518), however they all fizzled out.
The major issue was that they tended to be too ambitious, trying to fix too many things at the same time.
This PR, while based on the previous efforts, tries to be more constrained in its approach, only switching out the library to a more modern one. Everything else should stay compatible and there should be no breaking changes introduced.
Given the scope of the changes required I decided to add myself to codeowners. If that is inappropriate, let me know.
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [x] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [x] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [x] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
A side-effect is likely that you lost the onkyo
command inside HA.
I guess it wasn’t documented as a breaking change because one wasn’t supposed to use that command in the first place
demolud2
(Maciek)
July 7, 2024, 2:16pm
4
Thanks. How do I utilize this now for managing my Onkyo?
koying
(Chris B)
July 7, 2024, 2:27pm
5
My guess is that you can’t beyond what is documented.
If you are desperate, you can create a custom component from an earlier version of the integration
As recent HA releases do removal of integrations not maintained anymore, or just not in-line with the architecture decisions (see architecture/adr at master · home-assistant/architecture · GitHub for the up-to-date list), some users are left wondering what to do about that integration that is working for them, but which is not available anymore.
The response is clear: make a custom component out of the latest available code.
Now, that in itself might comes in 2 flavors:
The happy one: someo…
Any reason you’re not simply using the built-in integration?
demolud2
(Maciek)
July 8, 2024, 10:14am
8
Yes. I was never able to run a station on TuneIn.
As far as I could see in Integration description NET radio is not supported for play_media function.
Unless there is a way I do not know?
Yeah, play_media can currently only be used for normal radio, not NET radio. But if it is possible to send the proper codes manually, then it should also be in principle possible to support it in the integration.
demolud2
(Maciek)
July 9, 2024, 6:18am
10
Would you have an example of how to send follwing sequence of codes using the standard integration:
ZPW01
ZLKV15
SLZ2B
NSV0E0
NLSI00001
NLSI00008
with some delay between them?
Regards,
Maciek
1 Like
Just want to share an alternative method to bring back the now missing onkyo dependency.
By following this advice I was able to re-install the required onkyo-eiscp dependency without the need to create a custom component.
It’s a little complicated, but hey…
You need to add the following repository to your AddOn reps:
After adding it, you will be presented with some AddOns, the one you wan t is custom_deps.
Install it.
After that you can add custom dependencies to your HAos. It is, as the title of the repo suggests, an AddOn for developers to quickly test some deps.
I truely don’t know, if this survives a restart, but I assume. At least I don’t remember adding things after a restart while using …
Fingers crossed the solution will stand the test of time
1 Like