Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: After WiFi is powered down; sound is muted
#3
(03-22-2025, 01:24 AM)Tim Curtis Wrote: Its undocumented but try these REST API commands for controlling the receiver

Code:
http://HOSTNAME_OR_IPADDRESS/command/?cmd=trx_control -rx Off
http://HOSTNAME_OR_IPADDRESS/command/?cmd=trx_control -rx On

# Maybe a delay between them is needed if running consecutively ?

A cURL version is below - not tested but should work.

Code:
curl -G -S -s --data-urlencode "cmd=trx_control -rx Off" http://HOSTNAME_OR_IPADDRESS/command/

The file that receives them is /var/www/command/index.php
The file that executes them is /var/www/util/trx-control.php

Thanks for the speedy reply Tim. That API does the trick and I didn't need to add a delay between the calls. I run this daily using a systemd timer, here's the code for anyone who finds themselves needing it in the future:

Code:
#!/bin/bash

set -e
set -o pipefail

HALL=192.168.xxx.yyy
LIVING_ROOM=192.168.xxx.yyy
KITCHEN=192.168.xxx.yyy

SERVERS=($HALL $LIVING_ROOM $KITCHEN)

for server in "${SERVERS[@]}"; do
   curl -G -S -s --data-urlencode "cmd=trx_control -rx Off" "http://$server/command/"
   curl -G -S -s --data-urlencode "cmd=trx_control -rx On" "http://$server/command/"
done

exit 0
Reply


Messages In This Thread
RE: After WiFi is powered down; sound is muted - by Jasky - 03-25-2025, 08:26 AM

Forum Jump: