Thank you for your donation!


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


IP/command/?cmd=pause is not working properly?
#1
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
Reply
#2
U prolly need to use the "toggle" command
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
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
Reply
#4
(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
Reply
#5
(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.
Reply
#6
(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
Reply
#7
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.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
(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
Reply
#9
The commands "previous" and "next" should already work.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#10
(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


Attached Files Thumbnail(s)
   
Reply


Forum Jump: