07-28-2025, 08:39 AM (This post was last modified: 07-28-2025, 09:00 AM by rix81.)
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
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"}".
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.
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.
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.
07-28-2025, 02:14 PM (This post was last modified: 07-28-2025, 02:29 PM by rix81.)
(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
(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