Author Topic: Attempting to get a file to play with luup..  (Read 1139 times)

Offline mchipser

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +0/-1
Attempting to get a file to play with luup..
« on: July 27, 2016, 09:38:35 pm »
I am probably doing something stupid, but after reading the wiki and trying what was posted I am unable to get a file to play on any of my devices.. I am on UI7 1.7.830


Things i have tried.

192.168.1.40 is the squeezebox server.. Also the normal controls work fine, pause play next etc.., from within the device in the GUI..

Z:\ is mapped on the squeezbox server..
Code: [Select]
socket=require('socket')
local client = socket.connect('192.168.1.40', 9090)
b4:03:20:bd:50:8f playlist play file:///Z:/A%20Great%20Big%20World/Is%20There%20Anybody%20Out%20There/01%20Rockstar.mp3
local result=client:receive()

//Myke-NAS is the media folder on the squeezbox server.
Code: [Select]
socket=require('socket')
local client = socket.connect('192.168.1.40', 9090)
b4:03:20:bd:50:8f playlist play file://///MYK3-NAS/Multimedia/Music/Alan%20Jackson/(1989)%20-%20Here%20in%20the%20real%20world/02%20-%20Here%20in%20the%20Real%20World.mp3
local result=client:receive()


Code: [Select]
socket=require('socket')
local client = socket.connect('192.168.1.40', 9090)
client:send("b4:03:20:bd:50:8f playlist play file:///Z:/A%20Great%20Big%20World/Is%20There%20Anybody%20Out%20There/01%20Rockstar.mp3"
local result=client:receive()
« Last Edit: July 27, 2016, 11:13:19 pm by mchipser »

Offline mchipser

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +0/-1
Re: Attempting to get a file to play with luup..
« Reply #1 on: July 28, 2016, 03:33:03 pm »
So still learning about this whole squeezebox stuff..

I was able to control the player via command line on my machine using putty (telnet) and was hoping to just get the command working properly then move it over to the VERA.. So in saying that the commands above didn't work over the command line, they were close..

This command works fine via command line (telnet) It starts the correct mp3 on my player..
Code: [Select]
b4:03:20:bd:50:8f playlist play //MYK3-NAS/Multimedia/Music/Alan%20Jackson/(1989)%20-%20Here%20in%20the%20real%20world/02%20-%20Here%20in%20the%20Real%20World.mp3

This does not work in Vera though.. I am testing these in the test luup code area..
Code: [Select]
socket=require('socket')

local client = socket.connect(192.168.1.40', 9090)

--Play Playlist
client:send(b4:03:20:bd:50:8f playlist play //MYK3-NAS/Multimedia/Music/Alan%20Jackson/(1989)%20-%20Here%20in%20the%20real%20world/02%20-%20Here%20in%20the%20Real%20World.mp3")
local result=client:receive()


Is there something i am missing, or is this a fault of ui7?
« Last Edit: July 28, 2016, 05:05:23 pm by mchipser »

Offline mchipser

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +0/-1
Re: Attempting to get a file to play with luup..
« Reply #2 on: July 28, 2016, 04:32:38 pm »
So i was going to look in the logs to see if I can figure out what is going on.. I found this..

Code: [Select]
08      07/28/16 15:31:14.964   JobHandler_LuaUPnP::HandleActionRequest argument Code=socket=require('socket')

local client = socket.connect(192.168.1.40', 9090)

--Play Playlist
client:send(b4:03:20:bd:50:8f playlist play //MYK3-NAS/Multimedia/Music/Alan%20Jackson/(1989)%20-%20Here%20in%20the%20real%20world/02%20-%20Here%20in%20the%20Real%20World.mp3")
local result=client:receive() <0x2e12c680>
01      07/28/16 15:31:14.965   LuaInterface::LoadCode: [string "socket=require('socket')..."]:3: malformed number near '192.168.1.40' <0x2e12c680>
01      07/28/16 15:31:14.966   JobHandler_LuaUPnP::RunLua failed: socket=require('socket')

local client = socket.connect(192.168.1.40', 9090)

--Play Playlist
client:send(b4:03:20:bd:50:8f playlist play //MYK3-NAS/Multimedia/Music/Alan%20Jackson/(1989)%20-%20Here%20in%20the%20real%20world/02%20-%20Here%20in%20the%20Real%20World.mp3")
local result=client:receive() <0x2e12c680>
« Last Edit: July 28, 2016, 05:04:53 pm by mchipser »

Offline mchipser

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +0/-1
Re: Attempting to get a file to play with luup..
« Reply #3 on: July 28, 2016, 04:59:45 pm »
So after look at the code I noticed what i was doing wrong.. I was missing a ' and a " and a \n

Thanks for the help!

Code: [Select]
socket=require('socket')

local client = socket.connect('192.168.1.40', 9090)

--Play Playlist
client:send("b4:03:20:bd:50:8f playlist play //MYK3-NAS/Multimedia/Music/Alan%20Jackson/(1989)%20-%20Here%20in%20the%20real%20world/02%20-%20Here%20in%20the%20Real%20World.mp3\n")
local result=client:receive()
« Last Edit: July 28, 2016, 05:04:40 pm by mchipser »