Hi,
I’m trying to play music via my squeezebox from a script file using the action squeezeboxPlayUrl, but it seems that the command is not considered and nothing is logged; I’m wondering if I need to qualify the entire reference like the other references since no import is allowed, something like:
Ok found out, beginner typical mistake when I double checked the jar files I noticed the action one was missing, I had forgotten to copy it. Now it works from the script file.
Thank you.
Yes, I modeled my rules somewhat after what’s in the Wiki.
There is a bit of a trick to get the URL for a Pandora station. I’ve never been able to find the URL anywhere on Logitech Media Server UI. Here’s what I do to get the Pandora URL.
Go to the LMS web interface
Bring up the list of Pandora “Your Stations”
Heart (favorite) a station
Go to your list of Favorites
Click on the favorite you just created for your Pandora station
The URL will look something like:
pandora://long-string-of-digits.mp3
Use the above to set p2 in the URL you send to the Squeeze Server.
For example: http://hostname:9000/status.html?p0=playlist&p1=play&p2=pandora%3A%2F%2F72031231602953337.mp3&player=MACaddress
Hello,
I Installed Squeezebox on OH2 and communication and players are recogized well.
Now I would like to write a rule but I don’t understand where I find the ID of the player or If I wrote something wrong:
Is still necessary create an item file with OH2 or is itegrated on OH2 Ecosystem?
Thank you very much
import org.openhab.core.library.types.*
import org.openhab.model.script.actions.*
import org.openhab.action.squeezebox.*
rule Voice control
when
Item VoiceCommand received command
then
var String command = receivedCommand.toString.toLowerCase
if (command.contains("spegni luce") {
Scena.sendCommand(4)
squeezeboxSpeak("00:04:20:29:62:10", "Spegni luce")
}
if (command.contains("accendi radio") {
squeezeboxPower("squeezebox_squeezeboxplayer_D758D8B6_0D7F_490E_BCCF_8BB89A4E9938_000420296210", TRUE)
}
if (command.contains("spegni radio") {
squeezeboxPower("squeezebox_squeezeboxplayer_D758D8B6_0D7F_490E_BCCF_8BB89A4E9938_000420296210", FALSE)
}
end