Problems Installing openLuup on Debian - Beware IceWeasel - try Chrome

I’m finally taking the plung and trying to get openLuup up and running.

I started following the instructions at
https://github.com/akbooer/openLuup/blob/master/Documentation/20160609%20openLuup%20User%20Guide.pdf

but found that the openLuup_install.lua file, in the documentation, threw lots of errors. So I deleted everything in /etc/cmh-ludl and started again, this time using a different openLuup_install.lua file (see below)

-- first-time download and install of openLuup files from GitHub
local lua = "lua5.1" -- change this to "lua" if required
local x = os.execute
local p = print
p "openLuup_install 2016.06.08 @akbooer"
local http = require "socket.http"
local https = require "ssl.https"
local ltn12 = require "ltn12"
local lfs = require "lfs"
p "getting latest openLuup version tar file from GitHub..."
local _, code = https.request{
url = "https://codeload.github.com/akbooer/openLuup/tar.gz/master",
sink = ltn12.sink.file(io.open("latest.tar.gz", "wb"))
}
assert (code == 200, "GitHub download failed with code " .. code)
p "un-zipping download files..."
x "tar -xf latest.tar.gz"
x "mv openLuup-master/openLuup/ ."
x "rm -r openLuup-master/"
p "getting dkjson.lua..."
_, code = http.request{
url = "http://dkolf.de/src/dkjson-lua.fsl/raw/dkjson.lua?
name=16cbc26080996d9da827df42cb0844a25518eeb3",
sink = ltn12.sink.file(io.open("dkjson.lua", "wb"))
}
assert (code == 200, "GitHub download failed with code " .. code)
p "creating required files and folders"
lfs.mkdir "files"
lfs.mkdir "icons"
local vfs = require "openLuup.virtualfilesystem"
local function add_vfs_file (name)
local f = io.open (name, "wb")
f: write (vfs.read (name))
f: close ()
end

add_vfs_file "index.html"
local reload = "openLuup_reload"
local pathSeparator = package.config:sub(1,1)
if pathSeparator ~= '/' then reload = reload .. ".bat" end
add_vfs_file (reload)
p "initialising..."
x "chmod a+x openLuup_reload"
local s= require "openLuup.server"
local ip = s.myIP or "openLuupIP"
p "downloading and installing AltUI..."
x (lua .. " openLuup/init.lua altui")
x "./openLuup_reload &"
p "openLuup downloaded, installed, and running..."
p ("visit http://" .. ip .. ":3480 to start using the system")
-----

This time things seemed to work. When I attempt to open in a browser with http://:3480 - the redirect is to http://:3480/data_request?id=lr_ALTUI_Handler&command=home#.

This seems correct BUT , all that is displayed is “Waiting Initial Data”. It seems this problem has been reported in the past but without a specific cause / remedy.

A look at the log file does not show anything obviously wrong and http://:3480/data_request?id=exit dutifully closes openLuup and starting it again seems to work ok, but still get the same message.

Attached is a copy of the log file and a directory listing. Any suggestions ?

P.S. have cleaned out the directory and tried to install several times – I had to stop else someone think me crazy for expecting a different outcome ::slight_smile:

Sorry about that. It’s always a good idea to use the latest install file from GitHub, but I have updated the User Guide (now in the ‘testing’ branch) and it will work its way through to the next release.

This time things seemed to work. When I attempt to open in a browser with http://:3480 - the redirect is to http://:3480/data_request?id=lr_ALTUI_Handler&command=home#.

This seems correct BUT , all that is displayed is “Waiting Initial Data”. It seems this problem has been reported in the past but without a specific cause / remedy.

A look at the log file does not show anything obviously wrong and http://:3480/data_request?id=exit dutifully closes openLuup and starting it again seems to work ok, but still get the same message.

Indeed, everything seems to look OK from the log. This problem can have many different causes, mostly system-dependent and not specifically an openLuup issue: network, file protection, device parameters, … which doesn’t help you at all. It sounds like you’ve not been able to make any configuration changes to openLuup/AltUI so I’m presuming that everything there is at default settings.

I have used this install procedure literally dozens of times on clean installs, but I will do so again (BeagleBone Black running Debian) and check.

So I have just gone through a new install successfully:

  1. Get the install file from GitHub:
wget https://github.com/akbooer/openLuup/raw/master/Utilities/openLuup_install.lua
  1. Run the file:
lua5.1 openLuup_install
  1. Get the following output:
openLuup_install   2016.06.08   @akbooer
getting latest openLuup version tar file from GitHub...
un-zipping download files...
getting dkjson.lua...
creating required files and folders
initialising...
downloading and installing AltUI...
Tue Nov  8 11:08:32 2016	device 2 ' openLuup' requesting reload
openLuup downloaded, installed, and running...
visit http://172.16.42.131:3480 to start using the system
  1. Go to the URL and AltUI loads.

…so this is how it’s supposed to work. I would suggest you rerun the above steps is a clean directory (specifically getting the latest install file, although maybe you did do this) and send me:

[ol][li]ALL the log files[/li]
[li]the user_data.json file[/li]
[li]a full directory listing of the install[/li][/ol]

If it doesn’t work, though, I doubt that the issue is with openLuup. However, we’ll need to reach out to the community for suggestions. I am no Linux expert.

Here’s a further thought:

I don’t know what browser you’re using, but if you can look at the web console log it would good to see what request AltUI is hanging on.

[quote=“akbooer, post:4, topic:194298”]Here’s a further thought:

I don’t know what browser you’re using, but if you can look at the web console log it would good to see what request AltUI is hanging on.[/quote]

Fateful words … I tried re installing again - using the install script you pointed me to (have not checked to see if it was in any way different to the one I was using). Had exactly the same problem …

On suspicion - installed chrome (had been using IceWeasel aka firefox). Everything is now working !! The problem was the browser …

I changed the thread title …

Phew! … but odd, since I only use Firefox!

[hr]

…but never under Debian, since all my openLuup systems are headless.

Odd indeed. I just opened port 3480 to my debian box and tried to access the web page with firefox (from my windows laptop) — SAME error message as before. Switched to Chrome and it works !

This from the console errors in FF (using firebug)

ReferenceError: drawVisualization is not defined data_re…d=home# (line 102, col 4)
google.setOnLoadCallback(drawVisualization);

TypeError: g_ALTUI is undefined J_ALTUI_uimgr.js (line 14755, col 2)
AltuiDebug.SetDebug( g_ALTUI.g_DeviceTypes.info[“debug”] ) ;

Haven’t got a clue… I don’t do JavaScript. That’s one for @amg0!

I’m sure he is looking at this thread and wondering who broke his code and how :stuck_out_tongue:

If he does not comment - I’ll pass it on under his topic.

[quote=“Stuart, post:9, topic:194298”]I’m sure he is looking at this thread and wondering who broke his code and how :stuck_out_tongue:

If he does not comment - I’ll pass it on under his topic.[/quote]

what version of firefox ?
try 49.0.2. I had some people having problems with older version like 41.0.2 for instance