Moode Forum
IP/command/?cmd=pause is not working properly? - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: IP/command/?cmd=pause is not working properly? (/showthread.php?tid=7920)

Pages: 1 2


IP/command/?cmd=pause is not working properly? - rix81 - 07-28-2025

according to this  ,   pause {STATE}    Without the parameter, the pause state is toggled.
but if moode is paused, the pause command is ignoring.  If i manually press play,   then pause starts to toggle until i press pause manually again.  
Need suggestion how to make it work always,  or to find another way how to toggle play/pause via http request .  need to work it exactly the same way as play/pause button in webui, without specify what item to play.  

I'm going to make wireles control screen for moode on esp32.   this is probably the last problem i need to solve
thanks in advance


RE: IP/command/?cmd=pause is not working properly? - Tim Curtis - 07-28-2025

U prolly need to use the "toggle" command


RE: IP/command/?cmd=pause is not working properly? - TheOldPresbyope - 07-28-2025

Hmmm.

Entering "http://moode/command/?cmd=pause" into a browser on my laptop causes my moOde player to toggle properly and gets me the return value "{"0":"OK"}".

Regards,
Kent


RE: IP/command/?cmd=pause is not working properly? - rix81 - 07-28-2025

(07-28-2025, 11:36 AM)Tim Curtis Wrote: U prolly need to use the "toggle" command

unfortunately toggle command is unknown  (     It's present only  on ssh for mpc, but ssh is unavailable for my tasmota esp32 device


RE: IP/command/?cmd=pause is not working properly? - rix81 - 07-28-2025

(07-28-2025, 11:58 AM)TheOldPresbyope Wrote: Hmmm.

Entering "http://moode/command/?cmd=pause" into a browser on my laptop causes my moOde player to toggle properly and gets me the return value "{"0":"OK"}".

Regards,
Kent

the same here, but from time to time it stops working, mostly when playback paused manually.   It outputs {"0":"OK"} , but playback doesn't start on moode.
Or, if to reboot moode,  then pause command never works until you press play manually.


RE: IP/command/?cmd=pause is not working properly? - TheOldPresbyope - 07-28-2025

(07-28-2025, 12:05 PM)rix81 Wrote:
(07-28-2025, 11:58 AM)TheOldPresbyope Wrote: Hmmm.

Entering "http://moode/command/?cmd=pause" into a browser on my laptop causes my moOde player to toggle properly and gets me the return value "{"0":"OK"}".

Regards,
Kent

the same here, but from time to time it stops working, mostly when playback paused manually.   It outputs {"0":"OK"} , but playback doesn't start on moode.
Or, if to reboot moode,  then pause command never works until you press play manually.

Ah. I can repro this behavior.

Browsing the MPD/MPC documentation, there appears to me to be some ambiguity about pause.

I get the same behavior as you if I use the pause command in mpc in a terminal, while, as Tim suggests, the toggle command works consistently. Don't know why.

Regards,
Kent


RE: IP/command/?cmd=pause is not working properly? - Tim Curtis - 07-28-2025

Couple things

1. Looks like "toggle" is not an MPD command but an MPC command so that won't work via the REST API.
2. The play/pause button in the UI sends the following MPD commands
play/stop for radio stations
play/pause for song files
3. When MPD is in the stop state the MPD "pause" command has no effect and won't toggle the play state

I'll add a new REST API in upcoming 9.3.8 to perform the play state toggle.


RE: IP/command/?cmd=pause is not working properly? - rix81 - 07-28-2025

(07-28-2025, 12:55 PM)Tim Curtis Wrote: I'll add a new REST API in upcoming 9.3.8 to perform the play state toggle.

great! thank you.  


Also I'd like to do prev/next commands (both webui and rest api) to cycle trough  favorite radiostations list.   Need idea how to do it, hope for some suggestions,  thanks


RE: IP/command/?cmd=pause is not working properly? - Tim Curtis - 07-28-2025

The commands "previous" and "next" should already work.


RE: IP/command/?cmd=pause is not working properly? - rix81 - 08-23-2025

(07-28-2025, 12:55 PM)Tim Curtis Wrote: I'll add a new REST API in upcoming 9.3.8 to perform the play state toggle.

hi Tim,  don't want to bother you, but could you let me know when new version is planned to release ?       Ive completed all setup for wireless control screen for moode, everything works fine,  just waiting for toggle command.  probably I'll share scripts,  screen itself  cost $13 on ali,  and interface will be looking like this