Skip to main content

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. 

Release files for wmul_rivendell_tcp_client 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wmul_rivendell_tcp_client 0.0.3
File Size Uploaded
wmul_rivendell_tcp_client-0.0.3.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wmul_rivendell_tcp_client 0.0.3
File Interpreter ABI Platform
wmul_rivendell_tcp_client-0.0.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 20.0 kB

Release files / wmul_rivendell_tcp_client-0.0.3.tar.gz

Download URL wmul_rivendell_tcp_client-0.0.3.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
718d0f6703cde90c71c89534316ccdf393d5375f41f110171c5b784807387368
BLAKE2b-256 checksum
How to use checksums
c1b571509a549cd23520e2f7d156a04c4663875ffbdf827d5161f40a49428da8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release files / wmul_rivendell_tcp_client-0.0.3-py2.py3-none-any.whl

Download URL wmul_rivendell_tcp_client-0.0.3-py2.py3-none-any.whl
Size 9.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
cb3e38eb63f93aa5dd3cbd5f90e83bad6d195120c5f94e163f0e039118d8568e
BLAKE2b-256 checksum
How to use checksums
e8e581e6da97e58885b1eec616fcb8341d333fcb8dcb7852e0b4c1c451a394fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page