Page 1 of 1

Dashticz - Logitech Media Server

Posted: Sunday 12 November 2017 20:15
by pvm
Dashticz supports the Logitech Media Players in Domoticz (which can be the popular picoreplayer which I use myself on a raspberry pi with hifiberry amp)

This enables control of the music player(s):
LMSPlayer.png
LMSPlayer.png (52.4 KiB) Viewed 1911 times
(this image includes the CSS change as documented on the Dashticz wiki to increase the button sizes)

To use, add a block with your device id (in my case 107 to config.js)
blocks[107] = {}
blocks[107]['width'] = 12;
blocks[107]['icon'] = 'fa-music';

columns[1]['blocks'] = ['107']

Re: Dashticz - Logitech Media Server

Posted: Sunday 12 November 2017 20:18
by pvm
@Rob Geerts,

Can you extend the LMS block with volume control?
LMSVolume.PNG
LMSVolume.PNG (49.74 KiB) Viewed 1909 times
I replaced your code with the following to get to this result

Code: Select all

else if(device['HardwareType']=='Logitech Media Server'){
									html+=iconORimage(idx,'fa-music','','on icon','',2);
									html+='<div class="col-xs-10 col-data">';
									html+='<strong class="title">'+device['Name']+'</strong><br />';
									html+='<span class="h4">'+device['Data']+'</span>';
									html+='<div>';
										html+='<a href="javascript:controlLogitech('+device['idx']+',\'Rewind\');"><em class="fa fa-arrow-circle-left fa-small"></em></a> ';
										html+='<a href="javascript:controlLogitech('+device['idx']+',\'Stop\');"><em class="fa fa-stop-circle fa-small"></em></a> ';
										if(device['Status']=='Playing') {
												html+='<a href="javascript:controlLogitech('+device['idx']+',\'Pause\');"><em class="fa fa-pause-circle fa-small"></em></a> ';
										}
										else {
											html+='<a href="javascript:controlLogitech('+device['idx']+',\'Play\');"><em class="fa fa-play-circle fa-small"></em></a> ';
										}
										html+='<a href="javascript:controlLogitech('+device['idx']+',\'Forward\');"><em class="fa fa-arrow-circle-right fa-small"></em></a>';
										html+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; 
										html+='<a href="javascript:controlLogitech('+device['idx']+',\'VolumeDown\');"><em class="fa fa-minus-circle fa-small"></em></a>';
										html+='&nbsp;'; 
										html+='<a href="javascript:controlLogitech('+device['idx']+',\'VolumeUp\');"><em class="fa fa-plus-circle fa-small"></em></a>';
									html+='</div>';
									html+='</div>';

									$('div.block_'+idx).addClass('with_controls');
								}

Re: Dashticz - Logitech Media Server

Posted: Monday 13 November 2017 16:17
by robgeerts
Fixed in latest beta! Thanks!

Re: Dashticz - Logitech Media Server

Posted: Wednesday 29 November 2017 11:10
by wino58
Hi all

Just started with dashticz, and it's awesome.
I have a picore player on the dashboard , but after i made the buttons a litle bigger , they doesn't fit in the block.
How can i make this block of the picore player a litle higher , so the buttons fit in it.

Re: Dashticz - Logitech Media Server

Posted: Wednesday 29 November 2017 20:54
by pvm
I solved that by adding some padding:

Code: Select all

.block_107{
    padding-bottom: 80px !important;
}

Re: Dashticz - Logitech Media Server

Posted: Wednesday 29 November 2017 23:17
by wino58
Thanks for quick reply, it works

Re: Dashticz - Logitech Media Server

Posted: Monday 27 July 2020 11:33
by madpatrick
Hi,

Works great, but is it possible to change the buttons to a custom icon ?