Integration of Raumfeld into Home Assistant
Project description
hassfeld is a module primarily aimed to integrated Teufel Smart Speaker (aka Raumfeld Multiroom) into https://www.home-assistant.io/. However, the design is not tailored to Home Assistant and can be used as a module to any Pyhton program to control the Teufel Smart Speaker. The module also provides corresponding asyncio methods.
Look how it is to use with asyncrhonous I/O:
import asyncio import aiohttp import hassfeld async def main(): host = "teufel-host.example.com" port = 47365 session = aiohttp.ClientSession() raumfeld = hassfeld.RaumfeldHost(host, port, session=session) asyncio.create_task(raumfeld.async_update_all(session)) await raumfeld.async_wait_initial_update() zone = ["Master Bedroom"] media_info = await raumfeld.async_get_media_info(zone) print(f"Media info: {media_info}") await session.close() asyncio.run(main())
The use with blocking I/O was supported too but is currently broken:
import hassfeld raumfeld_host = "teufel-host.example.com" zone = [ "Living room", "Kitchen" ] raumfeld = hassfeld.RaumfeldHost(raumfeld_host) raumfeld.start_update_thread() raumfeld.search_and_zone_play(zone, 'raumfeld:any contains "Like a Rolling Stone"')
Features
Management and snapshot of zones.
Search and play songs.
Install hassfeld by running:
python3 -m pip install hassfeld
Contribute
Issue Tracker: https://github.com/B5r1oJ0A9G/hassfeld/issues
Source Code: https://github.com/B5r1oJ0A9G/hassfeld
License
The project is licensed under the GNU General Public License v3 (GPLv3).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hassfeld-0.3.12a2.tar.gz
.
File metadata
- Download URL: hassfeld-0.3.12a2.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7128d33f49f4ca2659c2901332044606b131f5c6689397580df4899fe503142 |
|
MD5 | d9cb12a6cf7b0c8ffc8f031fc10bc116 |
|
BLAKE2b-256 | a2221fe394fc884fe6cf6fb84f9b5c2fcb0c9ca647e0e1db3bc87c6f78362adb |
File details
Details for the file hassfeld-0.3.12a2-py3-none-any.whl
.
File metadata
- Download URL: hassfeld-0.3.12a2-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b892f399c36f5919036eacff12a862c1485ad3fbfefda8e966345c219db27f5 |
|
MD5 | a4c1ae8924a5956184f31ff5e3df36cc |
|
BLAKE2b-256 | f1af36427aaaf8d77e16433b6dab858985fe9bbfa1d784437874dd8d5e0685e3 |