willholdoway / hifiberry Goto Github PK
View Code? Open in Web Editor NEWThis is a custom component to allow control of HifiberryOS devices in Home Assistant using the audiocontrol2 REST API.
License: Creative Commons Zero v1.0 Universal
This is a custom component to allow control of HifiberryOS devices in Home Assistant using the audiocontrol2 REST API.
License: Creative Commons Zero v1.0 Universal
As of yesterday the integration fails to initiate and I'm seeing this in the log:
2023-05-05 13:48:40.837 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry 192.168.1.110 for hifiberry
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hifiberry/__init__.py", line 31, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'
I verified that nothing has changed on the HifiBerry itself, the OS version is on 20230404
.
I also verified that /etc/audiocontrol2.conf
hasn't changed and that it still has the relevant lines:
[webserver]
enable = yes
port = 81
authtoken={foobar}
socketio_enabled=True
The device plays fine and shows up in Roon as an endpoint as usual. The Roon HA integration also sees the device, so that part is fine. But the "standard" media_player
entity provided by this integration is missing, as it fails to initiate.
Anyone else seeing this? Any ideas what I can check?
Is there a was to enable/disable Bluetooth Sound source (Players?) via this Integration?
the api seems to allow at least listing and enabling a player…
/api/player/status
/api/player/activate/
My use case would be mostly to enable/disable Bluetooth which connects to a transmitter connected to my (quite old) TV…
But I can not quickly control audio settings for output on the TV, so my idea was to control it via HA - this enable/disable works with the hifiberry os web interface.
Hi,
Was checking my HA logs and noted the following message:
Entity None (<class 'custom_components.hifiberry.media_player.HifiberryMediaPlayer'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.PAUSE|VOLUME_SET|VOLUME_MUTE|PREVIOUS_TRACK|NEXT_TRACK|TURN_OFF|VOLUME_STEP|STOP|PLAY: 21821>, please report it to the author of the 'hifiberry' custom integration and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
Is this something easy to fix?
With the new version released, I can still not add a new integration. Getting this error:
`
Logger: homeassistant
Source: runner.py:96
First occurred: 13:31:24 (1 occurrences)
Last logged: 13:31:24
Error doing job: Unclosed client session
`
I'm trying to use the services PLAY_MEDIA and Grouping on my hifiberry speakers, but i see they are not added in the supported services. Also the speakers aren't visible in the media sources list. Is there a fix for this?
No 'version' key in the manifest file for custom integration 'hifiberry'.
This will not be allowed in a future version of Home Assistant.
Please report this to the maintainer of 'hifiberry'
See https://www.home-assistant.io/blog/2021/03/03/release-20213#breaking-changes
Under Custom integrations: Version warning
I just migrated my 3 devices from Balena-Sound to HiFiBerry OS. I can't believe I held out as long as I did as this platform is exactly what I've wanted.
My suggestion is based around two different use-case scenarios. One would be for users that are simply using DHCP for addressing of the HFB. Given that the address is subject to change, it isn't a viable UID.
The second use-case is the one I fall into. I have static addresses assigned for my devices, but I also utilize both wired and wireless. In both Balena-Sound and HiFiBerry OS, the devices seem to connect to wireless even when the wired is connected. This results in the device pulling two IP addresses.
As such, I end up having 6 different devices with single entities for 3 physical units. It would be nice if each unit was tracked as a single device with a data table consisting of the relevant MAC addresses. IP would be populated dynamically via ARP. Then we'd just need the media player entity to track whichever MAC is actively in use for the device.
Logger: homeassistant.helpers.frame
Source: helpers/frame.py:103
First occurred: 20:20:18 (1 occurrences)
Last logged: 20:20:18
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 hifiberry using this method at custom_components/hifiberry/config_flow.py, line 61: await self.async_set_unique_id(discovery_info['host'])
Hello,
I’m using Digi+ card on RPi 0W with HiFiBerryOS 20201213 installed.
I wanted to install this integration via HACS.
Everything went successfuly, but now I’m struggling with configuiring that.
Should I paste HiFiBarry’s IP in the “host” section?
What should I type in authtoken field?
After latest update the component stopped working and throws following error in the log:
Error occurred loading configuration flow for integration hifiberry: No module named 'pyhifiberry.audiocontrol2sio'.
I tried reinstalling it but the problem persists. Can you please take a look or provide a solution on how to fix this error?
Installed via HACS
Not sure why I'm getting these:
home-assistant | 2021-01-30 18:53:20 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-30 19:03:52 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-30 22:40:04 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-30 22:40:14 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-30 22:50:36 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 01:00:10 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 01:05:28 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 01:24:47 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 01:42:01 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 01:55:12 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 03:19:18 WARNING (Thread-7) [pychromecast.socket_client] [Second bedroom TV(192.168.0.150):8009] Heartbeat timeout, resetting connection
home-assistant | 2021-01-31 03:45:53 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 06:33:35 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 06:45:00 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.bedroom_led
home-assistant | 2021-01-31 06:47:00 WARNING (MainThread) [homeassistant.components.automation.morning_alarm_rollers] morning alarm rollers: Already running
home-assistant | 2021-01-31 06:47:00 WARNING (MainThread) [homeassistant.components.automation.morning_alarm_bedroom_led_lights] morning alarm bedroom LED lights: Already running
home-assistant | 2021-01-31 07:22:13 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 07:30:15 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
home-assistant | 2021-01-31 07:49:13 WARNING (MainThread) [homeassistant.components.media_player] Updating hifiberry media_player took longer than the scheduled update interval 0:00:02
Title says it all. I installed it through HACS and when I went to configure the integration, it tells me it can't find it.
Heya!
So this may be a weird behavior, and I'm not even sure if it's the cause of this integration or HiFiBerryOS itself, but when I set the Volume via Home Assistant it only updates it on the Web GUI of HiFiBerryOS, but the actual audio output is unaffected by it and stays at the same volume as it was before. If I use the slider on the Web GUI it works without any issues.
That said, if I use the slider on the Web GUI it doesn't update the slider on Home Assistant, so it seems to only be One-Way so far.
Hi
I noticed that while media_player.pause
works to stop playing music from the Radio source on my HiFiBerry, media_player.start
doesn't restart the stream.
Therefore, I want to use media_player.volume_mute
(true
/false
) instead via the turn_on_action
and turn_off_action
most mediaplayers usually support.
However, it seems that this integration doesn't support these options.
Invalid config for [media_player.hifiberry]: [turn_on_action] is an invalid option for [media_player.hifiberry]. Check: media_player.hifiberry->turn_on_action. (See ?, line ?).
Would you (or someone else) be willing to add support for these options to this integration?
Kr
TGZ
Getting this error:
Logger: custom_components.hifiberry.config_flow
Source: custom_components/hifiberry/config_flow.py:23
Integration: hifiberry (documentation)
First occurred: 00:15:29 (3 occurrences)
Last logged: 00:53:34
Unexpected exception
Traceback (most recent call last):
File "/config/custom_components/hifiberry/config_flow.py", line 69, in async_step_user
await validate_input(self.hass, user_input)
File "/config/custom_components/hifiberry/config_flow.py", line 23, in validate_input
await Audiocontrol2SIO.connect(host=data["host"], port=data["port"])
File "/usr/local/lib/python3.9/site-packages/pyhifiberry/audiocontrol2sio.py", line 38, in connect
await sio.connect(f'http://{host}:{port}', wait_timeout=wait_timeout)
TypeError: connect() got an unexpected keyword argument 'wait_timeout'
See title: Hifiberry 64Bit Alpha won't boot into UI with SocketIO enabled.
I've upgraded to latest version and can't add HifiBerry integration.
Browsing to 'Add Integration', I search for HifiBerry and click it. The list of available integrations reloads, nothing happens.
The log file records:
ERROR (MainThread) [homeassistant.config_entries] Error occurred loading configuration flow for integration hifiberry: cannot import name 'FlowResult' from 'homeassistant.data_entry_flow' (/srv/homeassistant/lib/python3.8/site-packages/homeassistant/data_entry_flow.py)
Any help greatly appreciated
This error originated from a custom integration.
Logger: homeassistant.config_entries
Source: custom_components/hifiberry/init.py:31
Integration: HiFiBerry (documentation)
First occurred: 13:38:56 (2 occurrences)
Last logged: 13:49:25
Error setting up entry 192.168.10.42 for hifiberry
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hifiberry/init.py", line 31, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'
I get this error on the intergration
Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.