There are a few ways to do that but in all my playing I found the following as the most reliable:
- In the Sonos App, search radio.com for the station you want to play
- Click that little arrow next to the station and add it to your Sonos favorites.
- Give it an "easy" name in your favorites. With easy I mean easy from an HTTP perspective (e.g. no blanks or special characters)
- Call the following HTTP endpoint to play the station:
http://[IP]/[ROOM]/favorite/[FAVORITENAME]
e.g.: http://192.168.10.63:5005/Office/favorite/Mix1041
This has been working flawlessly for me for months.
I think you can also call the favorite within the preset with the entry:
"favorite": "my favorite name",
but I have never tried that