Thank you for your donation!


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


Solved: Issue with Starting Specific Radio Stations via HTTP Command on Moode
#1
Question 
Hi everyone,

I’m encountering a problem with Moode when trying to use HTTP commands to start a specific radio station. Here’s the situation:

I am using the following type of command to start a radio station:

http://192.168.188.30/command/?cmd=play&....com/flacm

When I execute this command, Moode responds with the following JSON output:

{"0":"OK"}

This seems to indicate that the command was received and processed correctly. However:
1. If no station is currently playing, Moode always starts the most recently played station, regardless of the URL provided.
2. If a station is already playing, nothing happens, and the currently playing station continues uninterrupted.

Additional Information:

The play and pause commands work just fine via HTTP, so the issue seems specific to starting playback of a new station with the cmd=play&url= command.

Steps I’ve Tried:
1. Verified that the radio URL is valid and plays correctly when manually added to the playlist.
2. Cleared the playlist to ensure no cached URLs were interfering.
3. Tested with multiple valid radio station URLs, but the issue persists.

My Setup:
• Moode version: up to date
• Hardware: Raspberry Pi 3
• Network: WiFi

Question:

Is this a known issue with Moode, or am I missing something in the command structure? How can I force Moode to play the specified station directly from the HTTP command?

Any advice or troubleshooting tips would be greatly appreciated!

Thank you!
Reply
#2
I have not tried this but I think you need to add the station to the queue then play it.
Reply
#3
Thank you for the suggestion but unfortunately adding the station to the queue first did not resolve my issue.
Reply
#4
(12-10-2024, 08:41 AM)deppert Wrote: Hi everyone,

I’m encountering a problem with Moode when trying to use HTTP commands to start a specific radio station. Here’s the situation:

I am using the following type of command to start a radio station:

http://192.168.188.30/command/?cmd=play&....com/flacm

When I execute this command, Moode responds with the following JSON output:

{"0":"OK"}

This seems to indicate that the command was received and processed correctly. However:
1. If no station is currently playing, Moode always starts the most recently played station, regardless of the URL provided.
2. If a station is already playing, nothing happens, and the currently playing station continues uninterrupted.

Additional Information:

The play and pause commands work just fine via HTTP, so the issue seems specific to starting playback of a new station with the cmd=play&url= command.

Steps I’ve Tried:
1. Verified that the radio URL is valid and plays correctly when manually added to the playlist.
2. Cleared the playlist to ensure no cached URLs were interfering.
3. Tested with multiple valid radio station URLs, but the issue persists.

My Setup:
• Moode version: up to date
• Hardware: Raspberry Pi 3
• Network: WiFi

Question:

Is this a known issue with Moode, or am I missing something in the command structure? How can I force Moode to play the specified station directly from the HTTP command?

Any advice or troubleshooting tips would be greatly appreciated!

Thank you!

Where did you get this syntax?

Code:
cmd=play&url=command
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
This may have been hallucinated by chatGPT. I fed it the relevant information and this is what I got. Reading Moode’s OK response, I didn’t get suspicious.

Do you know how to play a specific station via HTTP command? Would really appreciate being able to configure these as shortcuts on my iPhone.
Reply
#6
In upcoming 9.2.0
- UPD: Add REST API commands: playitem | playitem_next

From the updated setup guide

Code:
#### playitem | playitem_next
Plays the specified item. If the item does not already exists in the Queue it is
added at the end of the Queue for `play_item` and for `play_item_next` after the currently selected
item in the Queue.  
Arguments: URL | URI relative to MPD music root
Returns: "OK"
```
Examples:
play_item RADIO/Soma FM - Fluid.pls
play_item NAS/TRX-FLAC/Yes/The Yes Album/03 Starship Trooper.flac
play_item http://mediaserv38.live-streams.nl:8006/live
```
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
The difference between chatGPT and a liar is chatGPT doesn’t know it’s lying.

That’s not to say I don’t use it too Tongue 

Regards,
Kent
Reply
#8
Awesome, thank you very much, Tim! Cannot wait for 9.2 Smile
Reply


Forum Jump: