Logitech Media Server
Moderators: leecollings, remb0
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Logitech Media Server
I have trying to use your script a couple of times. I thought that it must be installed on thesame machine where domoticz was installed.
In my case that was my NAS. But I had trouble with the 'cpan' module and also 'make'. So the second I did was to install it on my pi where
the lms was installed on. The installation was succesfull but when I executed the programme nothing happens.
But how can the script access another computer ? These are all secured by a password and username ?
In my case that was my NAS. But I had trouble with the 'cpan' module and also 'make'. So the second I did was to install it on my pi where
the lms was installed on. The installation was succesfull but when I executed the programme nothing happens.
But how can the script access another computer ? These are all secured by a password and username ?
- capman
- Posts: 153
- Joined: Friday 12 July 2013 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Belgium
- Contact:
Re: Logitech Media Server
I give up for now I tryed your script , but still no luck. Maybe it's because I have not actualy a squeezebox , but some rpi with squeezelite as players.
I set the debug on 1 but no logging in my domoticz. Maybe I must learn perl scripting
I set the debug on 1 but no logging in my domoticz. Maybe I must learn perl scripting
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
The LMS software has a web front-end that you can access from any machine on your network, usually on port 9000. You can click on various buttons and LMS will start/stop players, show you library contents, etc. No passwords required. My script just emulates somebody clicking in a browser by sending JSON RPC commands to LMS from perl. No magic here.
The script as listed in the wiki is a bunch of subroutines and they need to be called from something. Running them on their own will just exit silently. You should create a tiny perl program that calls one of the subroutines using &squeezealert. To test you can just add a call at the end of the file and run it. The wiki even shows 2 examples of this.
Edit: I've now done this - see update a few posts down
The script as listed in the wiki is a bunch of subroutines and they need to be called from something. Running them on their own will just exit silently. You should create a tiny perl program that calls one of the subroutines using &squeezealert. To test you can just add a call at the end of the file and run it. The wiki even shows 2 examples of this.
Edit: I've now done this - see update a few posts down
Last edited by philchillbill on Sunday 25 March 2018 20:22, edited 1 time in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 65
- Joined: Tuesday 13 October 2015 13:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Poland
- Contact:
Re: Logitech Media Server
You can try write easy script in dzVents which in version 2.4 support LMS. see doc
https://www.domoticz.com/wiki/DzVents:_ ... dia_Server
-
- Posts: 12
- Joined: Friday 14 October 2016 10:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Logitech Media Server
Hello All;
I've started using LMS for my audio needs and love that domoticz has the support for it. However I cannot find a away to access the current artist/album/title etc data from dzevents or such. Is this possible with the current module?
Basically I just want to update another device with data from a squeezebox to show whats playing.
I've started using LMS for my audio needs and love that domoticz has the support for it. However I cannot find a away to access the current artist/album/title etc data from dzevents or such. Is this possible with the current module?
Basically I just want to update another device with data from a squeezebox to show whats playing.
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
If you use a json devices call to the idx of the player, the returned data includes what's now playing:
e.g. http://192.168.178.12:8080/json.htm?typ ... es&rid=547
e.g. http://192.168.178.12:8080/json.htm?typ ... es&rid=547
Code: Select all
{
"ActTime" : 1521737888,
"AstrTwilightEnd" : "20:48",
"AstrTwilightStart" : "04:42",
"CivTwilightEnd" : "19:27",
"CivTwilightStart" : "06:03",
"DayLength" : "12:18",
"NautTwilightEnd" : "20:07",
"NautTwilightStart" : "05:23",
"ServerTime" : "2018-03-22 17:58:08",
"SunAtSouth" : "12:05",
"Sunrise" : "06:36",
"Sunset" : "18:54",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "High Noon at Salinas - Priority Pass (Extended Mix) (2017)",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 4,
"HardwareName" : "LMS",
"HardwareType" : "Logitech Media Server",
"HardwareTypeVal" : 60,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "000001F",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2018-03-22 17:58:07",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 15,
"Name" : "SQ-Office",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "Playing",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "AC",
"SwitchType" : "Media Player",
"SwitchTypeVal" : 17,
"Timers" : "false",
"Type" : "Lighting 2",
"TypeImg" : "LogitechMediaServer",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "547"
}
],
"status" : "OK",
"title" : "Devices"
}
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 12
- Joined: Friday 14 October 2016 10:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Logitech Media Server
I am aware of the json data that is available. However the issue I have is that it returns just one string with the artist/track. I would rather have a way to access more of the raw data as separate strings. Obviously I can do this by bypassing domoticz and accessing the data from the LMS directly but would be nice to keep things in one place for me.
Another issue is that the LMS type doesn't seem to return events when the track changes only on play/stop (but that is a much smaller issue for me)
Another issue is that the LMS type doesn't seem to return events when the track changes only on play/stop (but that is a much smaller issue for me)
philchillbill wrote: ↑Thursday 22 March 2018 18:00 If you use a json devices call to the idx of the player, the returned data includes what's now playing:
e.g. http://192.168.178.12:8080/json.htm?typ ... es&rid=547
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
I've rewritten the WIKI entry on alerts to include a full how-to for non-programmers. The perl is now wrapped in bash to make it a standalone script rather than just a library element. I'm curious if the instructions are now clear enough so if not, please PM me so I can modify.
https://www.domoticz.com/wiki/Logitech_ ... ox_Players
While I was at it, I modified the original script to allow playing on multiple players using threads and I stripped the log entries because kicking off a script will make those anyway.
Last edited by philchillbill on Sunday 25 March 2018 20:28, edited 1 time in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
The LMS wiki just got 2 new sections with scripts that can be used to transfer playlists between players and to sync/unsync groups of players at the push of a Domoticz switch
https://www.domoticz.com/wiki/Logitech_ ... ng_Players
and
https://www.domoticz.com/wiki/Logitech_ ... of_Players
https://www.domoticz.com/wiki/Logitech_ ... ng_Players
and
https://www.domoticz.com/wiki/Logitech_ ... of_Players
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- 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
Nice, I especially like the syncing, do you know how to do this on a synology nas without SSH access?philchillbill wrote: ↑Sunday 25 March 2018 20:24 The LMS wiki just got 2 new sections with scripts that can be used to transfer playlists between players and to sync/unsync groups of players at the push of a Domoticz switch
https://www.domoticz.com/wiki/Logitech_ ... ng_Players
and
https://www.domoticz.com/wiki/Logitech_ ... of_Players
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
What exactly do you mean by 'do this on a Synology NAS'? You mean install the perl scripts on Synology? That's a real pain due to CPAN issues. If you have your LMS on Synology (as I do) but run Domoticz on something with Raspbian or Ubuntu, the scripts will still work across your network. Can you clarify your exact question?
Last edited by philchillbill on Monday 26 March 2018 7:37, edited 1 time in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- 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
Clear answer, I'll install it on a raspberry pi and make it a slave of my synology nas/domoticz . The pi remains a nice platform to do these kind of scripts. Thanks again for the effort put into the script, I tried doing this once using browser inspecting calls but did not managephilchillbill wrote:What exactly do you mean by 'do this on a Synology NAS'? You mean install the perl scripts on Synology? That's a real pain due to CPAN issues. If you have your LMS on SYnology (as I do) but run Domoticz on something with Raspbian or Ubuntu, the scripts will still work across your network. Can you clarify your exact question?
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
Thanks. I've just added a Resources section to the wiki that gives an example of doing JSON RPC from bash/curl which would run OK on a Synology (I tested it) without installing anything. If you feel like coding it up, you'd just have to convert the perlish procedure calls to bashish ones in the same way...pvm wrote: ↑Monday 26 March 2018 0:37 Clear answer, I'll install it on a raspberry pi and make it a slave of my synology nas/domoticz . The pi remains a nice platform to do these kind of scripts. Thanks again for the effort put into the script, I tried doing this once using browser inspecting calls but did not manage
https://www.domoticz.com/wiki/Logitech_ ... #Resources
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
For anybody using the Audio Alerts via Squeezebox script, I've just posted a second version of the script in the wiki that assembles temporary syncgroups to play the Alerts on multiple players at the same time without echos around the house. If you don't habitually use your own player groups this is the way to go. If you do then stick with the threaded version of the script as the second version will mess up your groups after an alert.
https://www.domoticz.com/wiki/Logitech_ ... ox_Players
Any issues, let me know.
https://www.domoticz.com/wiki/Logitech_ ... ox_Players
Any issues, let me know.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
I found a way for a script being executed using script:// in Domoticz to kick off a script on a remote machine (using ssh and stored keys). This means that Synology users can keep everything else on their NAS and run only the perl scripts from the wiki on a pi or other perl-friendly machine. The wiki has been modified to explain how it's done.
Let me know if there are any problems or if any of the explanations are unclear.
Phil
Let me know if there are any problems or if any of the explanations are unclear.
Phil
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
OK, here's a really cool script for LMS control. It announces the now-playing title and artist through a squeezebox itself, using the female Amazon Polly English-language voice 'Amy'. It's written up fully in the wiki (link below). There's also a demo youtube video here:
https://youtu.be/NxqP8lu8LnA
Wiki link:
https://www.domoticz.com/wiki/Logitech_ ... _Polly_TTS
Phil
https://youtu.be/NxqP8lu8LnA
Wiki link:
https://www.domoticz.com/wiki/Logitech_ ... _Polly_TTS
Phil
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 251
- Joined: Sunday 11 May 2014 11:09
- Target OS: Windows
- Domoticz version: 2023.1+
- Location: NL
- Contact:
Re: Logitech Media Server
Hi All, I need a little help
I have LMS setup for a while and integrated in domoticz. Worked very well till a couple of days ago.
LMS - Chromcats bridge - 5 Chromecast audio devices --> Domoticz
In hardware the setup reports
So that seems fine.In the log I see messages from LMS comming in.
But on the switches page in domoticz the devices linked to the logitech devices stay off with svalue message unavailable. This does not update anymore.So internally in domoticz the info is retrieved from LMS but not set into the switches svalues ?
Any smart guys over here who know how to solve this ? Probably it is something i am overlooking.
It worked fine for months --> Updated domoticz introduced it, allreayd rolled back to working version but problem stays.
Many thanks
I have LMS setup for a while and integrated in domoticz. Worked very well till a couple of days ago.
LMS - Chromcats bridge - 5 Chromecast audio devices --> Domoticz
In hardware the setup reports
Code: Select all
34 Beneden cc:cc:0d:b1:xx:xx Active
33 Woonkamerr cc:cc:09:f5:xx:xx Active
32 Slaapk 1e achter cc:cc:09:f5:xx:xx Active
31 Slaapk 1e voor cc:cc:09:f5:xx:xx Active
30 Anders cc:cc:09:f5:xx:xx Active
Code: Select all
Logitech Media Server: Worker started...
2018-05-06 10:04:18.852 Logitech Media Server: 9 player-switch(es) found.
2018-05-06 10:04:18.867 Logitech Media Server: No playlists found.
2018-05-06 10:04:19.977 Logitech Media Server: 9 connected player(s) found.
2018-05-06 10:04:20.743 Logitech Media Server: (Woonkamerr) Stopped - 'Lumidee featuring Pitbull - Crazy (2007)'
2018-05-06 10:04:20.868 Logitech Media Server: (Werkkamer) Stopped - '(empty playlist)'
2018-05-06 10:05:55.199 Logitech Media Server: (Woonkamerr) Playing - 'Lumidee featuring Pitbull - Crazy (2007)'
Code: Select all
1509 LMS 0000021 49 Woonkamerr Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:54
1510 LMS 0000022 49 Beneden Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:54
1503 LMS 000001B 49 Werkkamer Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:53
1504 LMS 000001C 49 Boven Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:53
It worked fine for months --> Updated domoticz introduced it, allreayd rolled back to working version but problem stays.
Many thanks
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
-
- Posts: 251
- Joined: Sunday 11 May 2014 11:09
- Target OS: Windows
- Domoticz version: 2023.1+
- Location: NL
- Contact:
Re: Logitech Media Server
Solved by disabling firewall, so remaining question : what port numbers are used. 9000 and apperently some other ports ??zicht wrote: ↑Sunday 06 May 2018 10:09 Hi All, I need a little help
I have LMS setup for a while and integrated in domoticz. Worked very well till a couple of days ago.
LMS - Chromcats bridge - 5 Chromecast audio devices --> Domoticz
In hardware the setup reportsSo that seems fine.In the log I see messages from LMS comming in.Code: Select all
34 Beneden cc:cc:0d:b1:xx:xx Active 33 Woonkamerr cc:cc:09:f5:xx:xx Active 32 Slaapk 1e achter cc:cc:09:f5:xx:xx Active 31 Slaapk 1e voor cc:cc:09:f5:xx:xx Active 30 Anders cc:cc:09:f5:xx:xx Active
But on the switches page in domoticz the devices linked to the logitech devices stay off with svalue message unavailable. This does not update anymore.So internally in domoticz the info is retrieved from LMS but not set into the switches svalues ?Code: Select all
Logitech Media Server: Worker started... 2018-05-06 10:04:18.852 Logitech Media Server: 9 player-switch(es) found. 2018-05-06 10:04:18.867 Logitech Media Server: No playlists found. 2018-05-06 10:04:19.977 Logitech Media Server: 9 connected player(s) found. 2018-05-06 10:04:20.743 Logitech Media Server: (Woonkamerr) Stopped - 'Lumidee featuring Pitbull - Crazy (2007)' 2018-05-06 10:04:20.868 Logitech Media Server: (Werkkamer) Stopped - '(empty playlist)' 2018-05-06 10:05:55.199 Logitech Media Server: (Woonkamerr) Playing - 'Lumidee featuring Pitbull - Crazy (2007)'
Any smart guys over here who know how to solve this ? Probably it is something i am overlooking.Code: Select all
1509 LMS 0000021 49 Woonkamerr Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:54 1510 LMS 0000022 49 Beneden Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:54 1503 LMS 000001B 49 Werkkamer Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:53 1504 LMS 000001C 49 Boven Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:53
It worked fine for months --> Updated domoticz introduced it, allreayd rolled back to working version but problem stays.
Many thanks
Rpi & Win x64. Using : cam's,RFXCom, LaCrosse, RFY, HuE, google, standard Lua, Tasker, Waze traveltime, NLAlert&grip2+,curtains, vacuum, audioreceiver, smart-heating&cooling + many more (= automate all repetitive simple tasks)
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
UDP 3483 is used for server discovery.zicht wrote:Solved by disabling firewall, so remaining question : what port numbers are used. 9000 and apperently some other ports ??zicht wrote: ↑Sunday 06 May 2018 10:09 Hi All, I need a little help
I have LMS setup for a while and integrated in domoticz. Worked very well till a couple of days ago.
LMS - Chromcats bridge - 5 Chromecast audio devices --> Domoticz
In hardware the setup reportsSo that seems fine.In the log I see messages from LMS comming in.Code: Select all
34 Beneden cc:cc:0d:b1:xx:xx Active 33 Woonkamerr cc:cc:09:f5:xx:xx Active 32 Slaapk 1e achter cc:cc:09:f5:xx:xx Active 31 Slaapk 1e voor cc:cc:09:f5:xx:xx Active 30 Anders cc:cc:09:f5:xx:xx Active
But on the switches page in domoticz the devices linked to the logitech devices stay off with svalue message unavailable. This does not update anymore.So internally in domoticz the info is retrieved from LMS but not set into the switches svalues ?Code: Select all
Logitech Media Server: Worker started... 2018-05-06 10:04:18.852 Logitech Media Server: 9 player-switch(es) found. 2018-05-06 10:04:18.867 Logitech Media Server: No playlists found. 2018-05-06 10:04:19.977 Logitech Media Server: 9 connected player(s) found. 2018-05-06 10:04:20.743 Logitech Media Server: (Woonkamerr) Stopped - 'Lumidee featuring Pitbull - Crazy (2007)' 2018-05-06 10:04:20.868 Logitech Media Server: (Werkkamer) Stopped - '(empty playlist)' 2018-05-06 10:05:55.199 Logitech Media Server: (Woonkamerr) Playing - 'Lumidee featuring Pitbull - Crazy (2007)'
Any smart guys over here who know how to solve this ? Probably it is something i am overlooking.Code: Select all
1509 LMS 0000021 49 Woonkamerr Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:54 1510 LMS 0000022 49 Beneden Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:54 1503 LMS 000001B 49 Werkkamer Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:53 1504 LMS 000001C 49 Boven Lighting 2 AC Unavailable - - Lamp/schakelaar toevoegenNaam wijzigen Log 2018-05-05 22:33:53
It worked fine for months --> Updated domoticz introduced it, allreayd rolled back to working version but problem stays.
Many thanks
Sent from my iPhone using Tapatalk
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 7
- Joined: Saturday 03 August 2013 12:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11665
- Location: Germany
- Contact:
Re: Logitech Media Server
I have the same issue
Domoticz is running on raspberry pi, so no firewall there. Noticed it today, so not sure, when it started.But on the switches page in domoticz the devices linked to the logitech devices stay off with svalue message unavailable. This does not update anymore.So internally in domoticz the info is retrieved from LMS but not set into the switches svalues ?
Who is online
Users browsing this forum: No registered users and 1 guest