Page 1 of 21

Logitech Media Server

Posted: Thursday 03 September 2015 23:39
by Chiel
Hi, I've just started with Domoticz and right now I'm controlling my Milight's in the livingroom, just perfect!

I've got several RPi's with the Picoreplayer (squeezeplayer) running true the all house and I've created an event to try to stream a playlist to one off the RPi's.
for example: http://192.168.1.250:9000/status.html?p ... 2.168.1.59.
Does anyone knows How I can start a favoriet list that's stored in LSM wit a http commando?

Any help would be create!

Michiel

Re: Logitech Media Server

Posted: Friday 04 September 2015 18:46
by iceman187
Hi I use the following to start a playlist. You need to edit your ip address and mac address. Also change the name of your playlist under playlist

http://192.168.0.7:9000/status.html?p0= ... 0:00:00:00

Let me know if this works.

Re: Logitech Media Server

Posted: Saturday 05 September 2015 10:27
by Chiel
Hi Iceman, thanks for the quick reply! Works great, do you also now a way to play a favorite instead of a playlist?

Re: Logitech Media Server

Posted: Sunday 06 September 2015 15:01
by Chiel
Hi, this one works!

http://192.168.1.250:9000/status.txt?p0 ... 6:a5:03:d3

but, it puts all my favorites in a new playlist.. :?

Anyone knows how I can control and identify the favorite items??

Re: Logitech Media Server

Posted: Sunday 06 September 2015 16:19
by Chiel
I've got it!

Start the favorite that I want with this:
http://LMS-SERVER:9000/status.txt?p0=fa ... MAC-PLAYER

Stop playing and clear the current playlist with this:
http://LMS-SERVER:9000/status.txt?p0=pa ... MAC-PLAYER

thanks for the help!

Re: Logitech Media Server

Posted: Sunday 06 September 2015 16:41
by iceman187
Glad you got it working. I shall make note of this for future reference. Thanks.

Re: Logitech Media Server

Posted: Wednesday 09 September 2015 20:24
by stuffer
Thanx,

Just what I needed (after lollipop upgrade the apps are not working anymore)

PLaying around gives me this value's:

http://LMSSERVER:9000/status.txt?p0=fav ... RES_PLAYER

Where id:1 is the second favorite (count from 0) and you can create a lot of new switches with your favorites.

I figured out that stopping the music is:

http://LMSSERVER:9000/status.txt?p0=sto ... RES_PLAYER

Thanx again!! :D


BTW I found this post:
http://tutoriels.domotique-store.fr/con ... -http.html

Re: Logitech Media Server

Posted: Wednesday 16 September 2015 11:22
by cyberclwn
Hey,

Do you control the players with Domoticz also ?
I can turn my players on/off with Domoticz, and have them all synced. And I use the web-interface of the LMS to select stuff to play.

Also i uploaded the icon for the switch, so you have a LMS-logo for it :)
Even have a script that changes the state of the switches in domoticz if i turn on a device with the use of the powerbutton on the device itself, or the webinterface.

It's really simple.

Did you make a scene to start play your favorite/playlist ?

Seems interesting to look into that also. Altho the webinterface of the LMS is doing good for me now.

Re: Logitech Media Server

Posted: Wednesday 16 September 2015 12:27
by rron
cyberclwn wrote:Hey,

Do you control the players with Domoticz also ?
I can turn my players on/off with Domoticz, and have them all synced. And I use the web-interface of the LMS to select stuff to play.

Also i uploaded the icon for the switch, so you have a LMS-logo for it :)
Even have a script that changes the state of the switches in domoticz if i turn on a device with the use of the powerbutton on the device itself, or the webinterface.

It's really simple.

Did you make a scene to start play your favorite/playlist ?

Seems interesting to look into that also. Altho the webinterface of the LMS is doing good for me now.
Can you explain it little more because I'm als interested in intergrating my lms in domoticz.
Thx

Re: Logitech Media Server

Posted: Wednesday 16 September 2015 13:09
by cyberclwn
Hey,

I have a script called "script_device_squeeze.lua" which contains these lines, per player:

Code: Select all

if (devicechanged['SqWoonkamer'] == 'On') then
        os.execute ('echo "Woonkamer power 1" | nc <LMS_IP> <LMS_PORT>')
        os.execute ('echo "Woonkamer play" | nc <LMS_IP> <LMS_PORT>')
end

if (devicechanged['SqWoonkamer'] == 'Off') then
        os.execute ('echo "Woonkamer power 0" | nc <LMS_IP> <LMS_PORT>')
end
Where "SqWoonkamer" is the virtual switch in domoticz, and "Woonkamer" is the name of the player in the LMS. Also the <LMS_IP> and <LMS_PORT> need to be replaced with the according IP and Port (port is probably 9090). The script send a power on and a play command, or an off command.

To detect the status of the players i use this script, which is run in the crontab, every 5 minutes:

Code: Select all

#!/bin/bash
SB_SERVER=<LMS_IP>
SB_PORT=<LMS_PORT>
DOMO_SERVER="http://<domo_ip>"
DOMO_PORT="<domo_port>"

for SB_NAME in Woonkamer <LMS_player> <LMS_player>
do

SB_STATUS=`echo "$SB_NAME power ?" | nc -q 2 $SB_SERVER $SB_PORT | cut -d " " -f 3`
if [ $SB_STATUS == "%3F" ]
then
        SB_STATUS=0
fi
DOMO_STATUS_TXT=`curl -s "$DOMO_SERVER:$DOMO_PORT/json.htm?type=devices&filter=all&used=true&order=Name" | grep Sq$SB_NAME -A 20 | grep Status | cut -d '"' -f 4`
DOMO_STATUS_IDX=`curl -s "$DOMO_SERVER:$DOMO_PORT/json.htm?type=devices&filter=all&used=true&order=Name" | grep Sq$SB_NAME -A 20 | grep idx | cut -d '"' -f 4`
case $DOMO_STATUS_TXT in
        On)
                DOMO_STATUS=1
                ;;
        Off)
                DOMO_STATUS=0
                ;;
esac
if [ $SB_STATUS -ne $DOMO_STATUS ]
then
        case $SB_STATUS in
                0)
                        DOMO_MOD=`curl -s "$DOMO_SERVER:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$DOMO_STATUS_IDX&switchcmd=Off"`
                        ;;
                1)
                        DOMO_MOD=`curl -s "$DOMO_SERVER:$DOMO_PORT/json.htm?type=command&param=switchlight&idx=$DOMO_STATUS_IDX&switchcmd=On"`
                        ;;
        esac
fi
done
This way the script compares every 5 min the status of the players between LMS and DOMO, and adjusts DOMO accordingly.

At the moment i am trying a script, used in a scene, to start play a favorite. So if press the scene "Q-Music", the players start to play Q-music :)
It's working now, but need to test it a bit more

Re: Logitech Media Server

Posted: Wednesday 16 September 2015 15:50
by Eduard
I'm building a Logitech Media Server plugin for Domoticz. I got it working with basic player controls. I'm planning to add timers in the future. I hope to get it ready in a couple off days so i can add it to a beta relaase of Domoticz...

Re: Logitech Media Server

Posted: Wednesday 16 September 2015 16:44
by rron
Eduard wrote:I'm building a Logitech Media Server plugin for Domoticz. I got it working with basic player controls. I'm planning to add timers in the future. I hope to get it ready in a couple off days so i can add it to a beta relaase of Domoticz...
That is looking very promosing. I will try both sollutions.
Thx :D

Re: Logitech Media Server

Posted: Wednesday 16 September 2015 17:11
by cyberclwn
Oh, sounds good indeed.

You know where to find me if you need some testing :)

Re: Logitech Media Server

Posted: Wednesday 16 September 2015 21:08
by Eduard
cyberclwn wrote:Oh, sounds good indeed.

You know where to find me if you need some testing :)
When it's 'test-ready' i will get in contact ;D thnx!

Re: Logitech Media Server

Posted: Thursday 17 September 2015 19:57
by Chiel
I'm also want to test! Sounds great

Re: Logitech Media Server

Posted: Thursday 17 September 2015 20:52
by pvm
Another interested user here... I only check the power on state now

Re: Logitech Media Server

Posted: Thursday 17 September 2015 21:38
by rron
Count me in :D

Re: Logitech Media Server

Posted: Thursday 17 September 2015 21:41
by thecosmicgate
Count me in also

Re: Logitech Media Server

Posted: Friday 18 September 2015 6:57
by Eduard
I expect it will be ready at the end of next week :D

Re: Logitech Media Server

Posted: Friday 18 September 2015 13:59
by stimpy
thanks cyberclwn, will try the script later, just what I was looking for.

Eduard - i would be very interested in this too.

currently i have set up a few virtual switches to play specific favourites/albums, pause, power on/off (covered elsewhere in this thread). also I have set up BBC Radio switches so i have one-click access to radio (probably UK only).

Radio 1
http://IP:PORT/status?p0=playlist&p1=play&p2=iplayer://live?hls=http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_one.m3u8&radiovis=fm/ce1/c201/09880&player=MAC

Radio 2
http://IP:PORT/status?p0=playlist&p1=play&p2=iplayer://live?hls=http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_two.m3u8&radiovis=fm/ce1/c202/08880&player=MAC

Radio 4
http://IP:PORT/status?p0=playlist&p1=play&p2=iplayer://live?hls=http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_fourfm.m3u8&radiovis=fm/ce1/c204/09320&player=MAC

Radio 5
http://IP:PORT/status?p0=playlist&p1=play&p2=iplayer://live?hls=http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_five_live.m3u8&radiovis=dab/ce1/ce15/c225/0&player=MAC