Page 3 of 21

Re: Logitech Media Server

Posted: Monday 21 September 2015 21:19
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

Re: Logitech Media Server

Posted: Monday 21 September 2015 21:36
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

Re: Logitech Media Server

Posted: Monday 21 September 2015 21:46
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

Re: Logitech Media Server

Posted: Monday 21 September 2015 21:48
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 :)

Re: Logitech Media Server

Posted: Monday 21 September 2015 21:50
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...

Re: Logitech Media Server

Posted: Monday 21 September 2015 21:53
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 :)

Re: Logitech Media Server

Posted: Monday 21 September 2015 22:13
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

Re: Logitech Media Server

Posted: Monday 21 September 2015 22:40
by Skippiemanz
Looks great! Waiting for a option to implement this on my domoticz system running on my synology Nas

Re: Logitech Media Server

Posted: Monday 21 September 2015 22:51
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}}

Re: Logitech Media Server

Posted: Monday 21 September 2015 23:16
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.

Re: Logitech Media Server

Posted: Monday 21 September 2015 23:31
by pepijn
Check ... Works fine now

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 0:09
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 ?

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 0:17
by cyberclwn
pepijn wrote:Check ... Works fine now
Enjoy!

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 8:24
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 :)

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 9:04
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?

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 9:40
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.

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 11:25
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!!

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 13:28
by cyberclwn
Eduard wrote:Update available!
Oh, can't wait to get to home and try the new one :)

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 17:52
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

Re: Logitech Media Server

Posted: Tuesday 22 September 2015 18:35
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 ;)