jonkristian / casatunes Goto Github PK
View Code? Open in Web Editor NEWCasaTunes Multi-Room Audio Systems Component for Home Assistant
License: MIT License
CasaTunes Multi-Room Audio Systems Component for Home Assistant
License: MIT License
Would be nice to be able to search media and queue or play directly.
GET: /media/search/{mcId}/searchText
CasaTunes already supports search in their api, we might be limited by Home Assistant here but I've seen some implementation code for this on the Mopidy component.
I've contacted CasaTunes in an attempt for them to include an API endpoint which would allow playing media via URL. If implemented this would allow to play (cast) any local media including TTS generated within HA. I'll update this issue in case of any positive developments.
There shall be a breaking change in version 2025.1 but for now HA is showing following warning on startup:
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1607
First occurred: 21:29:51 (7 occurrences)
Last logged: 21:29:51
Entity None (<class 'custom_components.casatunes.media_player.CasaTunesMediaPlayer'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <MediaPlayerEntityFeature.PAUSE|SEEK|VOLUME_SET|VOLUME_MUTE|PREVIOUS_TRACK|NEXT_TRACK|TURN_ON|TURN_OFF|PLAY_MEDIA|SELECT_SOURCE|STOP|CLEAR_PLAYLIST|PLAY|SHUFFLE_SET|BROWSE_MEDIA|GROUPING: 719807>, please create a bug report at https://github.com/jonkristian/casatunes/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
I using russound thru Casatunes
I cannot get the Text to speak to work. (using TTS Support to send custom text using http: note in casatunes doc)
example: this play doorbell charm
http://xxx.xxx.x.xxx:8735/api/v1/system/doorbell/zones/study?volume=80
Thank you
Greg
In order to support both HTTP and HTTPS for the artwork I suggest checking for it on line 42 as follows:
thumbnail = image_id if image_id.startswith(("http://", "https://")) else await casa_server.data.get_image(image_id)
https://github.com/jonkristian/casatunes/blob/master/custom_components/casatunes/browse_media.py#L42
I don't fully understand how to distinguish between Directory, Track and Playlist via CasaTunes API, however all online radio stations appear to be having QueueType
as NONE
thus media browser considers it as a directory. There is an attribute StationName
which might help but perhaps we could check if MediaItems
exists?
https://github.com/jonkristian/casatunes/blob/master/custom_components/casatunes/browse_media.py#L46
I think there is a bug in clear playlist method.
Following warnings started appearing in 2023.2:
Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for casatunes using this method at custom_components/casatunes/__init__.py, line 57: hass.config_entries.async_setup_platforms(entry, PLATFORMS)
Detected integration that calls media_source.async_resolve_media without passing an entity_id. Please report issue for media_source using this method at homeassistant/components/media_source/__init__.py, line 147: report("calls media_source.async_resolve_media without passing an entity_id")
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.