Page 7 of 21

Re: Logitech Media Server

Posted: Friday 09 October 2015 10:30
by cyberclwn
Eduard wrote:
cyberclwn wrote:btw, it is on purpose the status of the device changes from "Aan" (On) to "Audio" after a 20-30 seconds ?
It's because the plug-in uses an interval to 'pull' the status of the players. By default this interval is 30 seconds. You can change this in rhe hardware-srtting of the LMS.
Right, but i mean, why does it change to "Audio"? I know it is playing Audio, it can't play Video. So it's not adding much new :lol:
If i pause the player, it says "Paused", i can understand that. If i stop the player, it says "Stopped", so following that logic, why not make it say "Play" when it is playing ? :)

Or have it show play-mode. Like "Play (Random)" "Play (Repeat)"

Re: Logitech Media Server

Posted: Friday 09 October 2015 13:17
by qwerk
please let me ask a stupid question,
i have added the media server in the hardware segment, it never shows any clients, I have severall.
the only differences, I use another port and I use a loginname and password ( added those in the remote address line)

please advice

Re: Logitech Media Server

Posted: Friday 09 October 2015 13:24
by Eduard
qwerk wrote:please let me ask a stupid question,
i have added the media server in the hardware segment, it never shows any clients, I have severall.
the only differences, I use another port and I use a loginname and password ( added those in the remote address line)

please advice
What's in the logfile after you start the LMS-hardware?

Re: Logitech Media Server

Posted: Friday 09 October 2015 13:26
by qwerk
Eduard wrote:
qwerk wrote:please let me ask a stupid question,
i have added the media server in the hardware segment, it never shows any clients, I have severall.
the only differences, I use another port and I use a loginname and password ( added those in the remote address line)

please advice
What's in the logfile after you start the LMS-hardware?

2015-10-09 13:25:26.258 Logitech Media Server: Worker stopped...
2015-10-09 13:25:26.259 Logitech Media Server: Worker started...

Re: Logitech Media Server

Posted: Friday 09 October 2015 14:01
by cyberclwn
qwerk wrote:please let me ask a stupid question,
i have added the media server in the hardware segment, it never shows any clients, I have severall.
the only differences, I use another port and I use a loginname and password ( added those in the remote address line)

please advice
Hey,

Just checking, but since you have setup security in the LMS, did you also setup blocking of ip-addresses ?
IN LMS you can setup that only certain ip-addresses can connect to it.

Re: Logitech Media Server

Posted: Friday 09 October 2015 15:04
by Eduard
qwerk wrote:
Eduard wrote:
qwerk wrote:please let me ask a stupid question,
i have added the media server in the hardware segment, it never shows any clients, I have severall.
the only differences, I use another port and I use a loginname and password ( added those in the remote address line)

please advice
What's in the logfile after you start the LMS-hardware?

2015-10-09 13:25:26.258 Logitech Media Server: Worker stopped...
2015-10-09 13:25:26.259 Logitech Media Server: Worker started...
What results do you get with

Code: Select all

curl 'http://<SERVER-IP>:<SERVER-PORT>/jsonrpc.js' --data-binary '{"id":1,"method":"slim.request","params":["",["serverstatus","0","999"]]}'

Re: Logitech Media Server

Posted: Saturday 10 October 2015 10:43
by Eduard
New test version available! (For testers who are able to compile from source)
(Will commit to next beta soon :D )

New:
* Add Blockly support (On/Off/Playing/Pause/Stopped) Both reading & setting are available
* Add Set events in LUA (On/Off/Play/Pause/Stop/Set Volume)
Example:

Code: Select all

commandArray['SqueezeBox']='On'
commandArray['SqueezeBox']='Play'
commandArray['SqueezeBox']='Set Volume 30'
Changes:
* AUDIO state changed to PLAYING

Known issues:
* Switching on/off of player does not update device status immediately, but after the interval-timeout ;(. Worked before so trying to find the bugger...

Now working on:
* Known issue(s)
* Wiki ;)

How to update:

Code: Select all

cd ~/dev-domoticz
git pull
make
For starters: search this thread how to start compiling from source.

Thanx for your testing & suggestions :D

Enjoy!!

Re: Logitech Media Server

Posted: Saturday 10 October 2015 15:20
by qwerk
What's in the logfile after you start the LMS-hardware?[/quote]


2015-10-09 13:25:26.258 Logitech Media Server: Worker stopped...
2015-10-09 13:25:26.259 Logitech Media Server: Worker started...[/quote]

What results do you get with

Code: Select all

curl 'http://<SERVER-IP>:<SERVER-PORT>/jsonrpc.js' --data-binary '{"id":1,"method":"slim.request","params":["",["serverstatus","0","999"]]}'
[/quote]

{"id":1,"result":{"info total artists":17560,"other player count":0,"info total songs":94685,"player count":7,"version":"7.9.0","lastscan":"1444439228","info total genres":279,"sn player count":0,"players_loop":[{"power":"1","ip":"192.168.3.137:46219","seq_no":"8","displaytype":"none","model":"squeezeplay","name":"Badkamer","playerid":"00:8c:2b:36:e6:07","canpoweroff":1,"uuid":"94c2edb8f22cf0fe5b72029660f01ed6","isplayer":1,"connected":1},{"connected":1,"isplayer":1,"uuid":"e88f06399030c78fe4e468a70456e09f","canpoweroff":1,"playerid":"00:04:20:2b:80:72","name":"Box","displaytype":"none","model":"baby","seq_no":"23","ip":"192.168.3.113:42327","power":0},{"displaytype":"none","name":"Box UE","model":"baby","ip":"192.168.3.103:56695","power":"1","seq_no":"3","isplayer":1,"connected":1,"playerid":"00:04:20:2d:6c:5d","uuid":"8021027d69bc4570b22f556ead7d2ec9","canpoweroff":1},{"uuid":"580b335e71a87d9959a945e588ab4005","canpoweroff":1,"playerid":"00:04:20:22:16:1e","isplayer":1,"connected":1,"seq_no":"4","ip":"192.168.3.115:35244","power":"1","model":"fab4","displaytype":"none","name":"Wekker Aren"},{"uuid":"56b89b05a886988ef68c1831bce1dbc3","canpoweroff":1,"playerid":"00:04:20:23:97:2f","connected":1,"isplayer":1,"seq_no":"7","ip":"192.168.3.112:38785","power":0,"displaytype":"none","name":"Touch","model":"fab4"},{"canpoweroff":1,"uuid":"1bae90140478e238c88b3c08979ade91","playerid":"00:04:20:1a:e8:d1","isplayer":1,"connected":1,"seq_no":0,"power":"1","ip":"192.168.3.118:37971","name":"Controller 01","displaytype":"none","model":"controller"},{"connected":1,"isplayer":1,"playerid":"00:04:20:23:67:cb","canpoweroff":1,"uuid":"09946d09f90e6af9a6e74826c997c4a3","name":"reserve touch","displaytype":"none","model":"fab4","power":"1","ip":"192.168.2.69:55939","seq_no":"92"}],"info total albums":6412,"uuid":"c266c443-9783-4323-9b5c-09b9076a7f6b"},"params":["",["serverstatus","0","999"]],"method":"slim.request"}


this looks fine, I guess
can you tell something from this?
I addedd username and password of course

Re: Logitech Media Server

Posted: Saturday 10 October 2015 15:42
by Eduard
qwerk wrote: this looks fine, I guess
can you tell something from this?
I addedd username and password of course
Model 'baby', 'fab4' and 'controller' are surely supported right now, so you should have at least 3 players added to you LMS hardware.
I will do some test with username & pwd to try to replicate your issue and report back to you.

Re: Logitech Media Server

Posted: Saturday 10 October 2015 20:00
by cyberclwn
Eduard wrote:New test version available! (For testers who are able to compile from source)
(Will commit to next beta soon :D )

New:
* Add Blockly support (On/Off/Playing/Pause/Stopped) Both reading & setting are available
* Add Set events in LUA (On/Off/Play/Pause/Stop/Set Volume)
Example:

Code: Select all

commandArray['SqueezeBox']='On'
commandArray['SqueezeBox']='Play'
commandArray['SqueezeBox']='Set Volume 30'
Changes:
* AUDIO state changed to PLAYING

Known issues:
* Switching on/off of player does not update device status immediately, but after the interval-timeout ;(. Worked before so trying to find the bugger...

Enjoy!!
Looking good.
Showing "Playing" now indeed, i like :)
Will test the lua-scripts later on.

Thanks again !

Re: Logitech Media Server

Posted: Saturday 10 October 2015 21:11
by cyberclwn
Eduard wrote: * Add Set events in LUA (On/Off/Play/Pause/Stop/Set Volume)
Example:

Code: Select all

commandArray['SqueezeBox']='On'
commandArray['SqueezeBox']='Play'
commandArray['SqueezeBox']='Set Volume 30'
Btw, what name is put there, i guess the name of the player ?

Re: Logitech Media Server

Posted: Saturday 10 October 2015 22:34
by Eduard
cyberclwn wrote:
Eduard wrote: * Add Set events in LUA (On/Off/Play/Pause/Stop/Set Volume)
Example:

Code: Select all

commandArray['SqueezeBox']='On'
commandArray['SqueezeBox']='Play'
commandArray['SqueezeBox']='Set Volume 30'
Btw, what name is put there, i guess the name of the player ?
Or the device-name (if it is the same as the player-name)

Re: Logitech Media Server

Posted: Sunday 11 October 2015 0:41
by Immo
Would it be possible to add support for Android squeezeplayer?

Thanks :)

Re: Logitech Media Server

Posted: Sunday 11 October 2015 9:05
by Eduard
Immo wrote:Would it be possible to add support for Android squeezeplayer?
Sure!
What model(s) do you see with

Code: Select all

curl 'http://<SERVER-IP>:<SERVER-PORT>/jsonrpc.js' --data-binary '{"id":1,"method":"slim.request","params":["",["serverstatus","0","999"]]}'

Re: Logitech Media Server

Posted: Sunday 11 October 2015 9:37
by Immo
Hi

I get the following response, it's android tablet in the bedroom to control domoticz, I figured it would also be fun to use it to stream audio to it :)

pi@domoticz ~ $ curl 'http://lms.here/jsonrpc.js' --data-binary '{"id":1,"method":"slim.request","params":["",["serverstatus","0","999"]]}'

{"params":["",["serverstatus","0","999"]],"method":"slim.request","id":1,"result":{"other player count":0,"info total albums":1052,"player count":1,"version":"7.9.0","players_loop":[{"seq_no":0,"playerid":"50:01:bb:32:a9:ab","displaytype":"none","connected":1,"ip":"192.168.1.121:49304","model":"squeezeplayer","name":"Bedroom Squeezeplayer","uuid":null,"isplayer":1,"canpoweroff":1,"isplaying":0,"power":"1"}],"uuid":"54cc6d45-3618-4102-a689-302279ee8a73","sn player count":0,"info total artists":4659,"info total songs":11823,"lastscan":"1444255359","info total genres":116}}

Cheers!

Re: Logitech Media Server

Posted: Sunday 11 October 2015 10:26
by Eduard
Immo wrote:{"params":["",["serverstatus","0","999"]],"method":"slim.request","id":1,"result":{"other player count":0,"info total albums":1052,"player count":1,"version":"7.9.0","players_loop":[{"seq_no":0,"playerid":"50:01:bb:32:a9:ab","displaytype":"none","connected":1,"ip":"192.168.1.121:49304","model":"squeezeplayer","name":"Bedroom Squeezeplayer","uuid":null,"isplayer":1,"canpoweroff":1,"isplaying":0,"power":"1"}],"uuid":"54cc6d45-3618-4102-a689-302279ee8a73","sn player count":0,"info total artists":4659,"info total songs":11823,"lastscan":"1444255359","info total genres":116}}
Will add it in next version

Re: Logitech Media Server

Posted: Sunday 11 October 2015 11:45
by Immo
Eduard wrote:
Immo wrote:{"params":["",["serverstatus","0","999"]],"method":"slim.request","id":1,"result":{"other player count":0,"info total albums":1052,"player count":1,"version":"7.9.0","players_loop":[{"seq_no":0,"playerid":"50:01:bb:32:a9:ab","displaytype":"none","connected":1,"ip":"192.168.1.121:49304","model":"squeezeplayer","name":"Bedroom Squeezeplayer","uuid":null,"isplayer":1,"canpoweroff":1,"isplaying":0,"power":"1"}],"uuid":"54cc6d45-3618-4102-a689-302279ee8a73","sn player count":0,"info total artists":4659,"info total songs":11823,"lastscan":"1444255359","info total genres":116}}
Will add it in next version
Great!
Thanks a lot, will report how it works.

Re: Logitech Media Server

Posted: Monday 12 October 2015 18:38
by Eduard
New test version available! (For testers who are able to compile from source)
(Will be available in next beta too :D )

New:
* Up-to-date with Domoticz/master-branche
* Enabled support for models 'squeezeplayer' & iOS App iPeng
* Added state 'Disconnected' when device (or App) is unavailable

Fixed:
* Switching on/off player didn't update device status immediately, but after the interval-timeout


Enjoy!!

Re: Logitech Media Server

Posted: Monday 12 October 2015 20:44
by jumbotroll
Eduard wrote:New test version available! (For testers who are able to compile from source)
(Will be available in next beta too :D )

New:
* Up-to-date with Domoticz/master-branche
* Enabled support for models 'squeezeplayer' & iOS App iPeng
* Added state 'Disconnected' when device (or App) is unavailable

Fixed:
* Switching on/off player didn't update device status immediately, but after the interval-timeout


Enjoy!!
Synology packages Updated to domoticz V2.3338 ;)

Regards
Jumbotroll

Re: Logitech Media Server

Posted: Monday 12 October 2015 21:31
by pvm
Eduard wrote:...
New:
* Add Blockly support (On/Off/Playing/Pause/Stopped) Both reading & setting are available
* Add Set events in LUA (On/Off/Play/Pause/Stop/Set Volume)
...
Nice job, updated and integrated this into my home control
On/off detection works fine! Image
Eduard wrote: Changes:
* Add notifications to LMS players (on/off/play/pause/stop)
* Add LMS-player(s) as notifier (send notifications to your players display :D)
Should this be in the current beta? i do not see this in the notification settings