assistant-relay icon indicating copy to clipboard operation
assistant-relay copied to clipboard

Please expose more commands provided by the CATT CLI via Assistant Relay.

Open ajayjohn opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. Please expose more commands provided by the CATT CLI, via the /cast endpoint in Assistant Relay.

Describe the solution you'd like It would be great if I could use Assistant Relay to perform operations like...

  • Check if the device is already playing something
  • If not, cast to the device
  • Else, do not interrupt what is playing

Using CATT, this would be possible by the following command...

if  ! catt -d "Living Room display" status | grep 'PLAYING' ; then 
     catt -d "Living Room display" cast_site <url>
fi

Similarly, another CLI argument in CATT that would be helpful, is the ability to set the device volume. It would be great if Assistant Relay could expose this too. catt -d "Living Room display" volume 0

Describe alternatives you've considered The alternative for folks like me who use docker (Hassio) to run Assistant Relay would be to have another container running CATT separately, to issue these commands. This seems redundant since Assistant Relay already uses CATT.

ajayjohn avatar Jul 11 '20 16:07 ajayjohn

In V4 you can call almost any catt command but still response is not returned in body - but it is diplayed in the logs

mcikosos avatar Mar 21 '21 14:03 mcikosos

@ajayjohn I will make PR with changes to V4 branc

mcikosos avatar Mar 22 '21 18:03 mcikosos