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

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 »

Eduard wrote:
Thanx! Was in doubt about the icon too; kodi also does not have an own icon. ;)

Working on notifications now :lol:
I have a .zip with the user icon's, or how it is called in english ("Aangepaste pictogrammen", in dutch :) ) if you want those.


And the nit-picking starts :)
I guess you display the year between "(" and ")" at the end of the song-title.
But if you listen to a radio-station, it says (0) . Can you hide it, when it is "(0)"?

And can it be possible that you show the mp3-field/tag "Composer" , in stead of "Artist"/ "Album Artist" ? :)
https://www.dropbox.com/s/70ye1m1gtdox8 ... 20domo.JPG
https://www.dropbox.com/s/2dwtovr463nbs ... %20LMS.JPG
Last edited by cyberclwn on Monday 21 September 2015 21:40, edited 2 times in total.
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
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 »

Sorry to be a pain but I can't seem to get the update. I tried running the command as shown on the wiki but it doesn't show up. Could you confirm the steps please? Probably me missing an obvious bit. Thank you
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Logitech Media Server

Post by Eduard »

iceman187 wrote:Sorry to be a pain but I can't seem to get the update. I tried running the command as shown on the wiki but it doesn't show up. Could you confirm the steps please? Probably me missing an obvious bit. Thank you
The wiki works alright. You only checkout my testversion instead of the official beta.

If you can make the official beta work, mine will work also. Try that first please...

Use

Code: Select all

git clone -b lms https://github.com/EddyK69/domoticz.git dev-domoticz
Instead of

Code: Select all

git clone https://github.com/domoticz/domoticz.git dev-domoticz
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 »

iceman187 wrote:Sorry to be a pain but I can't seem to get the update. I tried running the command as shown on the wiki but it doesn't show up. Could you confirm the steps please? Probably me missing an obvious bit. Thank you
Which step you mean?

I just went to my home directory

Code: Select all

cd ~
and then did the "git clone... "-command Eduard mentioned in his post.
After that a

Code: Select all

cd dev-domoticz
Then followed the wiki further, with the "cmake -DCMAKE....." and the "make -j 4" commands.
This means you will get a new domoticz-instance in a different folder.
If you want to run this one, you also have to modify the domoticz.sh script, to reflect the different location.

Code: Select all

DAEMON=/home/$USERNAME/domoticz/$NAME
should become

Code: Select all

DAEMON=/home/$USERNAME/dev-domoticz/$NAME
Else it will still start you "normal" domoticz :)
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: And the nit-picking starts :)
I guess you display the year between "(" and ")" at the end of the song-title.
But if you listen to a radio-station, it says (0) . Can you hide it, when it is "(0)"?

And can it be possible that you show the mp3-field/tag "Composer" , in stead of "Artist"/ "Album Artist" ? :)
Suggestions are welcome of course :D

I will add yours tomorrow...
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 »

Eduard wrote:
cyberclwn wrote: And the nit-picking starts :)
I guess you display the year between "(" and ")" at the end of the song-title.
But if you listen to a radio-station, it says (0) . Can you hide it, when it is "(0)"?

And can it be possible that you show the mp3-field/tag "Composer" , in stead of "Artist"/ "Album Artist" ? :)
Suggestions are welcome of course :D

I will add yours tomorrow...
Thanks again for all the work.

And i ment, that it is now showing the composer on the overview, within Domoticz. As you can see on the 2 screenshots i added later to the post.
I'm not sure if it is a LMS-setting or not. But in LMS the (Album')Artist is "Melanie C", but in domoticz it shows "Dee Adam", which is, according to LMS, the composer of the song :)
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:And i ment, that it is now showing the composer on the overview, within Domoticz. As you can see on the 2 screenshots i added later to the post.
I'm not sure if it is a LMS-setting or not. But in LMS the (Album')Artist is "Melanie C", but in domoticz it shows "Dee Adam", which is, according to LMS, the composer of the song :)
Ok tnx, i will look at this
Skippiemanz
Posts: 230
Joined: Sunday 14 July 2013 20:21
Target OS: Linux
Domoticz version: 4.10233
Location: Alkmaar, The Netherlands
Contact:

Re: Logitech Media Server

Post by Skippiemanz »

Looks great! Waiting for a option to implement this on my domoticz system running on my synology Nas
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Logitech Media Server

Post by pepijn »

Max2Play SqueezePlug running on a Raspberry Pi

Code: Select all

{"id":1,"method":"slim.request","params":["",["serverstatus","0","999"]],"result":{"info total genres":0,"info total songs":0,"other player count":0,"info total albums":0,"info total artists":0,"player count":1,"sn player count":0,"players_loop":[{"displaytype":"none","playerid":"b8:27:eb:1a:7f:05","ip":"172.30.0.12:49866","canpoweroff":1,"isplaying":0,"seq_no":0,"connected":1,"power":"1","isplayer":1,"name":"Woonkamer","model":"squeezelite","uuid":null}],"version":"7.9.0","uuid":"7731eb8c-7fe6-47bb-b332-67a26dfa91b3","lastscan":0}}
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 »

pepijn wrote:Max2Play SqueezePlug running on a Raspberry Pi

Code: Select all

......"model":"squeezelite"......
Eduard wrote:.
Can you change the code in LogitechMediaServer.cpp (line 352) and test it with your models (baby & fab4)?
If you change line 352 to

Code: Select all

if (model == "squeezelite") {
then yours should work too.
(Or add another "if", if you feel confident enough :) )

After another "make -j 4" and a restart of domoticz, that is.
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
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Logitech Media Server

Post by pepijn »

Check ... Works fine now
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 »

Eduard wrote:
cyberclwn wrote:And i ment, that it is now showing the composer on the overview, within Domoticz. As you can see on the 2 screenshots i added later to the post.
I'm not sure if it is a LMS-setting or not. But in LMS the (Album')Artist is "Melanie C", but in domoticz it shows "Dee Adam", which is, according to LMS, the composer of the song :)
Ok tnx, i will look at this
Hey,

I was not understanding this (I get annoyed when i don't know what the problem is, sometimes :lol: ) and i just had to look into this more. Since i don't know the C++ language i won't be able to supply you with a fix, sorry. But getting into the JSON with curl (something i am getting to know better by this) i noticed this:

Looking in the source it seems you query the tags "lady":

Code: Select all

{"params":["<player_id>",["status","-",1,"tags:lady"]]
[{"playlist index":18,"id":248130,"title":"Beautiful Mind","album":"The Sea","artist":"Dee Adam","duration":"222.053","year":"2011"}]
But there seems to be a difference (sometimes?) between "a" and "A".

Code: Select all

{"params":["<player_id>",["status","-",1,"tags:lAdy"]]
[{"playlist index":18,"id":248130,"title":"Beautiful Mind","album":"The Sea","albumartist":"Melanie C","composer":"Dee Adam","trackartist":"Melanie C","duration":"222.053","year":"2011"}]
You can query them both, but then it gets more confusing:

Code: Select all

{"params":["<player_id>",["status","-",1,"tags:laAdy"]]
[{"playlist index":18,"id":248130,"title":"Beautiful Mind","album":"The Sea","artist":"Dee Adam","albumartist":"Melanie C","composer":"Dee Adam","trackartist":"Melanie C","duration":"222.053","year":"2011"}]
I think a possible solution will be to query them both, with laAdy. Then if the "trackartist" is found, use that one to display as "Artist". If the "trackartist" is empty, or not found, use the "artist"-field.
Because when i checked a file without the album-/track-artist and composer, i still get the field artist returned.

What's your thought about that ?
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
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 »

pepijn wrote:Check ... Works fine now
Enjoy!
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
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 »

Good job!
For me sometimes the left and right buttons do not work, i can press right but not go back left (in all kind of menus). I'm using a SB3 (classic type by logitech)
(i could not test volume, i have it restricted at 100% to the digital out)

Ready for the next beta :)
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
Eduard
Posts: 139
Joined: Monday 19 January 2015 9:14
Target OS: -
Domoticz version:

Re: Logitech Media Server

Post by Eduard »

cyberclwn wrote:And on a different note, did the "Raspberry's GPIO port" go missing in the dev-build ?
It's not in the hardwarelist when i start the dev-one. When i start the "normal" beta, it's still there.
Same for me here on my test-VM. GPIO is disabled on non-rpi hardware. Are you compiling on rpi?
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 »

Eduard wrote: Are you compiling on rpi?
Hey,
Yes i am compiling on an RPi.
But i found out i had to do this:

Code: Select all

cd wiringPi
make static
sudo make install-static
To make the wiringPi library available to the compiler for Domoticz.
After this i can compile Domoticz with GPIO, which results in having the GPIO-hardware available again.
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 »

Update available!

Changes:
* Supported models now: Squeezebox, squeezebox2, squeezebox3, baby, fab4, squeezelite
* Use trackartist if exists, otherwise use albumartist or artist
* Show year only if present
* Logs if model is unsupported

Known issues:
* Log does not display special characters correctly, device shows correct
* Artists starting with a number (10CC etc.) will display an extra text 'Level xx%' after the titles

How to update:

Code: Select all

cd ~/dev-domoticz
git pull
make
[EDIT]
If you made changes to the code, first do a git reset --hard to roll-back before pull ;)

Thanx for your testing & suggestions :D

Enjoy!!
Last edited by Eduard on Tuesday 22 September 2015 14:22, edited 1 time in total.
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 »

Eduard wrote:Update available!
Oh, can't wait to get to home and try the new one :)
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
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 »

Changes:
* Supported models now: Squeezebox, squeezebox2, squeezebox3, baby, fab4, squeezelite
- Looks like it is detecting ok now

* Use trackartist if exists, otherwise use albumartist or artist
- Looks like it is showing right information now

* Show year only if present
- Uh, no. I think the year is returned/read as "0". You do a check if sYear is "".
So a Radiostation (in my case) is still showing the "(0)" on the line

maybe:

Code: Select all

if ( (sYear = "0") || (sYear = "") )
        sYear = "";
else 
        sYear = " (" + sYear + ")";
(my first attempt in this language, so probably some syntax mistakes :)

* Logs if model is unsupported
- Looks like it is logging it, but i only have supported hardware, so can't check for sure

Known issues:
* Log does not display special characters correctly, device shows correct
* Artists starting with a number (10CC etc.) will display an extra text 'Level xx%' after the titles
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:Uh, no. I think the year is returned/read as "0". You do a check if sYear is "".
So a Radiostation (in my case) is still showing the "(0)" on the line
Fixed in new version!

Note: Also merged with domoticz/master to stay up-to-date, so compile takes a little bit longer ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest