Logitech Media Server
Moderators: leecollings, remb0
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
It shouldn't restart the song but should continue from the time index that was playing (it's deliberately saved). Do the line-endings in your script match your operating system? They can be <CR>, <LF> or both. I had this issue myself at some stage while testing the script but forget how I resolved it in the end and what was causing it. It was related to the noplay:0 and noplay:1 somehow. What version of LMS are you running?
Last edited by philchillbill on Thursday 03 August 2017 19:55, edited 1 time in total.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 64
- Joined: Friday 14 April 2017 13:39
- Target OS: NAS (Synology & others)
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Logitech Media Server
I just started using LMS.
I added it to Domoticz succesfully and am able to power player (chromecast) on/off and pause playing via blockly.
The remote in the Domoticz GUI however does not work and looks like this: I tried updating my domoticz but that does not help. I'm on version 3.8434 right now.
Does anyone know how to solve this?
I added it to Domoticz succesfully and am able to power player (chromecast) on/off and pause playing via blockly.
The remote in the Domoticz GUI however does not work and looks like this: I tried updating my domoticz but that does not help. I'm on version 3.8434 right now.
Does anyone know how to solve this?
- 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 updated the alerts-playing perl script in the LMS wiki entry to auto-delete the temporary playlist and to play a pre-chime sound before the actual audio message is played. The overall code is tidier now also.
https://www.domoticz.com/wiki/Logitech_ ... ox_Players
https://www.domoticz.com/wiki/Logitech_ ... ox_Players
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've added a new section to the LMS wiki about reading out the internal light-sensor in the SB Radio and SB Touch with Domoticz. You can find it here:
https://www.domoticz.com/wiki/Logitech_ ... d_SB-Touch
https://www.domoticz.com/wiki/Logitech_ ... d_SB-Touch
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 101
- Joined: Wednesday 25 March 2015 10:46
- Target OS: Linux
- Domoticz version: v4.11307
- Location: France
- Contact:
Re: Logitech Media Server
I have the same issue.freakshock wrote: ↑Thursday 27 July 2017 18:24 I just started using LMS.
I added it to Domoticz succesfully and am able to power player (chromecast) on/off and pause playing via blockly.
The remote in the Domoticz GUI however does not work and looks like this:
domremotegray.jpg
I tried updating my domoticz but that does not help. I'm on version 3.8434 right now.
Does anyone know how to solve this?
-
- Posts: 229
- Joined: Friday 03 April 2015 20:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany (near dutch border)
- Contact:
Re: Logitech Media Server
Me too...
- gijsje
- Posts: 132
- Joined: Saturday 19 August 2017 14:28
- Target OS: NAS (Synology & others)
- Domoticz version: Stable
- Location: Berkel Enschot, NL
- Contact:
Re: Logitech Media Server
Me 3
Any solution for an empty remote??
Any solution for an empty remote??
Synology DS218+ - RFXtrx433 - Aeotec Z-Stick Gen5 - Toon Thermostat - Neo CoolCam plug - Neo CoolCam PIR - FIBARO PIR - Heiman Smart Smoke Senso - Neo CoolCam Leakage Detector - BeNext Tag Reader - P1 and S0 USB - many Mi-Light lights - KAKU switches
-
- Posts: 47
- Joined: Tuesday 14 June 2016 16:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: East Coast, USA
- Contact:
Re: Logitech Media Server
Nicely done!philchillbill wrote: ↑Wednesday 04 October 2017 11:42 I've added a new section to the LMS wiki about reading out the internal light-sensor in the SB Radio and SB Touch with Domoticz. You can find it here:
https://www.domoticz.com/wiki/Logitech_ ... d_SB-Touch
- 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
How can I install this with domoticz running on my synology ? Perl is also installed. It's like I can't install the perl modules with 'cpan'.philchillbill wrote: ↑Thursday 06 July 2017 20:37 For anybody interested in playing alert sounds or TTS messages from Domoticz on a Squeezebox, I've edited the wiki and added a section with a working perl script to do this. Enjoy !
https://www.domoticz.com/wiki/Logitech_ ... ox_Players
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: Logitech Media Server
Since some time I notice that the Logitech Media Server is shown as disconnected on the domoticz tiles. I don't get any song titles or anything at all. When I'm using the Dashticz frontpage, the mediaplayer is shown, and can be used to stop/play/forward music, but still not titles are shown.
When looking at the 'current states': Time and date seems to update.
When looking at the 'current states': Time and date seems to update.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
CPAN on Synology is not easy to configure. I love my Synology (and have a big and fast one), but it's not a great machine to play on because its BusyBox Linux is pretty lame. That's why I run my Domoticz on a NUC under Ubuntu where I have much more flexibility. So sorry, I can't help you on that.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
-
- Posts: 47
- Joined: Tuesday 14 June 2016 16:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: East Coast, USA
- Contact:
Re: Logitech Media Server
Did you end up figuring this out? I'm trying to setup a blockly event to play a playlist as well but can't get it going.
- havnegata
- Posts: 114
- Joined: Wednesday 10 September 2014 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10162
- Location: Norway
- Contact:
Re: Logitech Media Server
I am not sure, but setting volume I think you need LUA for, but playing playlists you should use: This is the url:
http://192.168.1.107:9000/status.html?p ... 2.168.1.15
The first ip-address and port is for your LMS. My playlist is named "test" and yhe last ip-address is for your Squeezebox
This is my LUA for setting volume. It pretty much does the same as the blockly apart from the volume-thing:
Code: Select all
commandArray = {}
time = os.date("*t")
--mellom kl 05 og 10
if (time.hour >= 5) or (time.hour <= 11) then
if ((otherdevices['JUL'] == 'On') and (otherdevices['Squeezebox Radio'] ~= 'On') and (uservariables ['Squeezebox'] == 0) and (devicechanged['StueNord_bevegelse'] == 'Motion')) then
print('Det er julaften!')
commandArray[1]={['Squeezebox Radio']='On'}
print('Radioen er påslått')
commandArray[2]={['OpenURL']='http://192.168.1.107:9000/status.html?p0=playlist&p1=play&p2=jul2&p3=192.168.1.15'}
print('Radioen spiller')
--commandArray[3]={['Squeezebox Radio']='Play'}
commandArray[4]={['Squeezebox Radio']='Set Volume 75'}
print('Høyere volum')
commandArray[5]={['Variable:Squeezebox']='1 AFTER 5'}
end
elseif (devicechanged['SomeoneHome'] == 'Off') then
commandArray['Variable:Squeezebox']='0 AFTER 20'
end
return commandArray
- havnegata
- Posts: 114
- Joined: Wednesday 10 September 2014 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10162
- Location: Norway
- Contact:
Re: Logitech Media Server
@Nautilus, Would you care to share the script for turning the radio off? I have the same problemNautilus wrote: ↑Friday 04 December 2015 9:47This is a great plugin for Domoticz, thank you! I have a situation where a couple of my players get disconnected from LMS and the only way to connect them again to LMS is to power cycle them. I'd like to automate this process with the help of Domoticz and power switches. However, if I look at Blocky, the status of the disconnected player is shown as "Stopped". Do I need to / can I use Lua instead to act on only disconnected players? Having never done anything with Lua, any pointers on where to start? Thanks again!Eduard wrote:* Added state 'Disconnected' when device (or App) is unavailable
edit: that was easy enough (not sure how elegant the solution but it works )I've set on delay of 20 seconds for "SB Radio Power" so it does not turn it back on immeadiately after, I guess even a few seconds would be enough. Furthermore I assumed I cannot execute both Off and On for the same device in same command array, thus calling the script directly first.Code: Select all
commandArray = {} if (devicechanged['Squeezebox Radio'] == 'Disconnected') then print('Squeezebox Radio detected as disconnected - power cycling') os.execute('/home/pi/domoticz/scripts/[script to set "SB Radio Power" off via Telldus Live]') commandArray['SB Radio Power'] = 'On' end return commandArray
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Logitech Media Server
Hi,
the "script" I was pointing to in the text you quoted was for my 433Mhz power plug that at the time I was controlling via Tellstick Net. So that part was to switch the power of completely, not just turn it off. Since then I've gotten RFLink so I can control the plugs directly from Domoticz and also improved the network at our home so actually I don't suffer from the disconnect problems anymore.
But if you clarify a bit more what it is that you want to achieve (as I guess it is not about controlling 433Mhz plugs via Tellstick Net? ) I can try to help...
- philchillbill
- Posts: 396
- Joined: Monday 12 September 2016 13:47
- Target OS: Linux
- Domoticz version: beta
- Location: Eindhoven. NL
- Contact:
Re: Logitech Media Server
You can turn off a player via a HTTP command using this syntax:
http://192.168.1.1:9000/status.html?p0= ... 0:18:e8:3c
power_on /power_toggle will also work in place of power_off.
However, Logitech recommends using the JSON RPC construct instead of HTTP. You can look at the wiki on LMS at my entry on playing alerts to see how this can be done from perl. Should be trivial to rewrite to Lua or Bash.
http://192.168.1.1:9000/status.html?p0= ... 0:18:e8:3c
power_on /power_toggle will also work in place of power_off.
However, Logitech recommends using the JSON RPC construct instead of HTTP. You can look at the wiki on LMS at my entry on playing alerts to see how this can be done from perl. Should be trivial to rewrite to Lua or Bash.
Alexa skills author: EvoControl, Statereport, MediaServer, LMS-lite
- havnegata
- Posts: 114
- Joined: Wednesday 10 September 2014 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10162
- Location: Norway
- Contact:
Re: Logitech Media Server
Thanks!philchillbill wrote:You can turn off a player via a HTTP command using this syntax:
http://192.168.1.1:9000/status.html?p0= ... 0:18:e8:3c
power_on /power_toggle will also work in place of power_off.
However, Logitech recommends using the JSON RPC construct instead of HTTP. You can look at the wiki on LMS at my entry on playing alerts to see how this can be done from perl. Should be trivial to rewrite to Lua or Bash.
-
- Posts: 722
- Joined: Friday 02 October 2015 12:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Finland
- Contact:
Re: Logitech Media Server
A good overview of the http api for LMS: http://tutoriels.domotique-store.fr/con ... -http.htmlhavnegata wrote: ↑Sunday 31 December 2017 17:09Thanks!philchillbill wrote:You can turn off a player via a HTTP command using this syntax:
http://192.168.1.1:9000/status.html?p0= ... 0:18:e8:3c
power_on /power_toggle will also work in place of power_off.
However, Logitech recommends using the JSON RPC construct instead of HTTP. You can look at the wiki on LMS at my entry on playing alerts to see how this can be done from perl. Should be trivial to rewrite to Lua or Bash.
- havnegata
- Posts: 114
- Joined: Wednesday 10 September 2014 11:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10162
- Location: Norway
- Contact:
Re: Logitech Media Server
No coder, but trying to read your perl script, is this portion related to rebooting my Squeezebox somehow?:philchillbill wrote: ↑Sunday 31 December 2017 0:40 ...
However, Logitech recommends using the JSON RPC construct instead of HTTP. You can look at the wiki on LMS at my entry on playing alerts to see how this can be done from perl. Should be trivial to rewrite to Lua or Bash.
sub checkOnOffline {
my ($idx, $checkfor)=@_;
$ua=LWP::UserAgent->new; $ua->timeout(5);
$retrieve=$ua->get($url{domo}.'/json.htm?type=devices&rid='.$idx);
$res=$retrieve->decoded_content;
if ($retrieve->is_success) { $jres = decode_json $res } else { warn "checkOnOffline: ", $retrieve->status_line };
$state=$$jres{result}[0]->{Status}; # 'On', 'Off', 'Open', 'Closed', 'Disconnected' etc
if ($state=~m/\b$checkfor\b/) { $status=1 } else { $status=0 };
return $status;
}
sub squeezeAlert {
my ($player, $prechime, $tts)=@_;
$client=new JSON::RPC::Client;
$playerid=$players{$player}{mac}; $idx=$players{$player}{idx};
$offline=&checkOnOffline($idx, 'Disconnected'); if ($offline) { return };
&logMessage("SQUEEZEALERT: played alert '$tts' on player $player");
# Get current player state so it can be restored when alert is finished
$res = $client->call( $url{lms}, { method => 'slim.request', params => [ $playerid, ['power', '?'] ] });
if ($res->is_error) { warn "squeezeAlert:", $client->status_line; return };
$jres = $res->jsontext; $jdata=decode_json $jres; $power=$$jdata{result}{_power};
Who is online
Users browsing this forum: No registered users and 1 guest