05-10-2024, 04:52 PM
(This post was last modified: 05-10-2024, 04:53 PM by Tim Curtis.)
The REST API is documented in the Setup Guide. There is also the moodeutl cli command. See help below.
There's no command specifically for turning on/off a renderer but you could probably code one. Here are the relevant files:
Code:
pi@hsu:~ $ moodeutl --help
Usage: moodeutl [OPTION]
Moode utility programs
With no OPTION print the help text and exit.
-a Print features availability
-A [add|rm N] Update features availability
-d Dump session file (requires sudo)
-d [-nr] Dump session file, no radio (requires sudo)
-d [-gv var] Dump session file, get value (requires sudo)
-D [var] Delete session variable (requires sudo)
-e [filename] Export settings to [filename] or ~/moodecfg-<timestamp>.ini (requires sudo)
-i Import settings from /boot/moodecfg.ini (requires sudo)
-f Print supported audio formats
-F Print full alsacap info
-l Print moode log
-m Run system monitor
-s Print system info
-c Scan for SMB hosts
-C Scan for SMB shares [host | IP address]
-N Scan for NFS hosts
-M Scan for MPD hosts
-o List audio overlays
-q Query sql database
-r Restart servers
-R Restart renderer [--bluetooth | --airplay | --spotify | --squeezelite | --roonbridge]
-t Print last 10 lines of moode log and wait
-u Check radio station urls for playability
-U Check station urls, list only unplayable
--hwparams Print ALSA hardware params
--btreset Reset Bluetooth to off
--odcclear Clear output device cache
--mpdlog Print MPD log
--updlog Print in-place update log
--mountmonlog Print mount monitor log
--autocfglog Print auto config update log
--sleepint Print daemon sleep intervals
--mooderel Print moOde release
--pirev Print Pi revision
--osinfo Print OS info
--version Print program version
--help Print this help text
pi@hsu:~ $
There's no command specifically for turning on/off a renderer but you could probably code one. Here are the relevant files:
Code:
# REST API
/var/www/command/index.php
# Function lib
/var/www/inc/renderer.php
# Renderer Config
/var/www/ren-config.php
# Worker job processing daemon
/var/www/daemon/worker.php