TCP Client for Receiving 'Now Playing' information from Rivendell.
Project description
wmul_rivendell_tcp_client
A TCP client module to connect to Rivendell Radio Automation and receive Now Playing information. Intended to be run as a module inside your code. A CLI is provided for testing purposes.
Connects to the Rivendell PAD TCP port, usually on 34289. See 15.1.1. The JSON Interface in the Rivendell Operations Guide.
CLI Operation
.venv\Scripts\wmul_now_playing.exe [Rivendell IP Address] 34289 --log_name "E:\Temp\rivendell_tcp_client.log"
The CLI will print the Start Time, Duration (rounded to full seconds), Artist, and Title as each song is received from Rivendell.
Module Operation
import click
import multiprocessing
import wmul_logger
from wmul_rivendell_tcp_client import receiver
_logger = wmul_logger.get_logger()
logging_queue = multiprocessing.Queue()
stop_logger = wmul_logger.run_queue_listener_logger(
logging_queue=logging_queue,
file_name=log_name,
log_level=log_level
)
_logger = wmul_logger.get_queue_handler_logger(logging_queue=logging_queue)
quit_event = multiprocessing.Event()
song_queue = multiprocessing.SimpleQueue()
if host and port:
dss = receiver.DeviceServerSettings(
host=host,
port=port
)
tcp_process = multiprocessing.Process(
target=receiver.connect_to_rivendell_tcp,
name="Rivendell TCP Client",
kwargs={
"device_server_settings": dss,
"quit_event": quit_event,
"song_queue": song_queue,
"loggging_queue": logging_queue
},
daemon=True
)
tcp_process.start()
## Here's where your code consumes the songs from song_queue.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wmul_rivendell_tcp_client-0.0.3.tar.gz.
File metadata
- Download URL: wmul_rivendell_tcp_client-0.0.3.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
718d0f6703cde90c71c89534316ccdf393d5375f41f110171c5b784807387368
|
|
| MD5 |
8904a76e203d9efff5ea09322928b8b0
|
|
| BLAKE2b-256 |
c1b571509a549cd23520e2f7d156a04c4663875ffbdf827d5161f40a49428da8
|
File details
Details for the file wmul_rivendell_tcp_client-0.0.3-py2.py3-none-any.whl.
File metadata
- Download URL: wmul_rivendell_tcp_client-0.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb3e38eb63f93aa5dd3cbd5f90e83bad6d195120c5f94e163f0e039118d8568e
|
|
| MD5 |
b7a1b899c9838d15dfa7dd0cc030906c
|
|
| BLAKE2b-256 |
e8e581e6da97e58885b1eec616fcb8341d333fcb8dcb7852e0b4c1c451a394fb
|