Logitech Media Server

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Chiel
Posts: 6
Joined: Wednesday 02 September 2015 0:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Logitech Media Server

Post 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
iceman187
Posts: 3
Joined: Tuesday 25 November 2014 9:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Logitech Media Server

Post 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.
Chiel
Posts: 6
Joined: Wednesday 02 September 2015 0:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Logitech Media Server

Post 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?
Chiel
Posts: 6
Joined: Wednesday 02 September 2015 0:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Logitech Media Server

Post 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??
Chiel
Posts: 6
Joined: Wednesday 02 September 2015 0:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Logitech Media Server

Post 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!
iceman187
Posts: 3
Joined: Tuesday 25 November 2014 9:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Logitech Media Server

Post by iceman187 »

Glad you got it working. I shall make note of this for future reference. Thanks.
stuffer
Posts: 12
Joined: Sunday 07 June 2015 9:36
Target OS: Linux
Domoticz version: 3.6367
Location: Utrecht
Contact:

Re: Logitech Media Server

Post 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
User avatar
cyberclwn
Posts: 103
Joined: Thursday 20 August 2015 22:53
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Logitech Media Server

Post 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.
3xPi 2B (Domoticz "live", Domoticz "sandbox", PhotoFrame)
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Logitech Media Server

Post 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
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
User avatar
cyberclwn
Posts: 103
Joined: Thursday 20 August 2015 22:53
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Logitech Media Server

Post 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
3xPi 2B (Domoticz "live", Domoticz "sandbox", PhotoFrame)
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Logitech Media Server

Post 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...
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Logitech Media Server

Post 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
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
User avatar
cyberclwn
Posts: 103
Joined: Thursday 20 August 2015 22:53
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: The Netherlands
Contact:

Re: Logitech Media Server

Post by cyberclwn »

Oh, sounds good indeed.

You know where to find me if you need some testing :)
3xPi 2B (Domoticz "live", Domoticz "sandbox", PhotoFrame)
RFXCom433(E), KaKu, Oregon Scientific, Keyes 2-relay, Logitech Media Server, MiLight, Smartwares heating controller(2x), IR Send/Receive, Keyes PIR, XH-M131 DuskSensor, DHT22/11
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Logitech Media Server

Post 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!
Chiel
Posts: 6
Joined: Wednesday 02 September 2015 0:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Logitech Media Server

Post by Chiel »

I'm also want to test! Sounds great
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: Logitech Media Server

Post by pvm »

Another interested user here... I only check the power on state now
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
rron
Posts: 223
Joined: Sunday 30 March 2014 15:24
Target OS: Linux
Domoticz version: Beta
Location: Waterland
Contact:

Re: Logitech Media Server

Post by rron »

Count me in :D
Rpi, RFXcom, klikaan klikuit switch,thermosmart, z-wave, espeasy, smartevse
User avatar
thecosmicgate
Posts: 188
Joined: Monday 06 April 2015 14:37
Target OS: Linux
Domoticz version: newest
Location: The Netherlands / Hoeven
Contact:

Re: Logitech Media Server

Post by thecosmicgate »

Count me in also
It's nice to be important, but it's more important to be nice
Scooter ;)
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Logitech Media Server

Post by Eduard »

I expect it will be ready at the end of next week :D
stimpy
Posts: 7
Joined: Friday 16 January 2015 13:55
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Logitech Media Server

Post 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
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests