I’ve run into a problem, though.
I’m running Debian 4.9.88-1 and installed the required prerequisites (lua5.1, lua-socket, lua-filesystem and lua-sec).
I’ve added an user and installed into ~/cmh-ludl.
vera@debian:~/cmh-ludl$ lua5.1 openLuup_install.lua
openLuup_install 2017.03.28 @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 May 8 00:06:11 2018 device 3 'Alternate UI' requesting reload
openLuup downloaded, installed, and running...
visit http://172.20.1.70:3480 to start using the system
vera@debian:~/cmh-ludl$ Tue May 8 00:06:11 2018 device 2 ' openLuup' requesting reload
Looking at the code (or some version of it), suggests you are missing a json decoder.
The code at the start does this:
local json = require("dkjson")
if (type(json) == "string") then
luup.log("ALTUI warning dkjson missing, falling back to L_ALTUIjson", 2)
json = require("L_ALTUIjson")
end
Note I’m just guessing here but see if the json files exist.
check your ALTUI_SERVICE / “PluginConfig” variable
it must be perfect JSON, otherwise you can get this error
2018-05-10 10:59:36.905 openLuup.servlet:: error in callback [lr_ALTUI_Handler] : [string "L_ALTUI.lua"]:2310: attempt to index local 'tbl' (a nil value)
I think it’s weird because this is a complete clean install (new Debian install and new openLUUP install). No one else has this problem?[/quote]
I think on openluup there are visible in the user_data file are not they ? you may need to check with openluup experts.
the failure in your log file indicates we get a nil value for tbl which can only come from a corrupted PluginConfig variable or a json decode which is not working fine
local result = luup.variable_get(ALTUI_SERVICE, "PluginConfig", deviceID)
local tbl = json.decode(result)
Also try reinstalling AltUI: http://openLuupIP:3480/data_request?id=altui - check the logs during this time to make sure it is fully installed (replace ‘openLuupIP’ appropriately).
Make sure the /tmp/AltAppStore has correct permissions: sudo chmod a+w /tmp
sudo chmod a+w /tmp/AltAppStore
Not sure if any of this will help, but maybe it gives you a lead.
I’m having the same problem – fresh openLuup install on a fresh RedHat/Centos 7.5 system. Currently running it as root, so permissions shouldn’t be an issue. Here’s the end of the log output after reinstalling AltUI:
And do you also see this in the log after it restarts when you try to access AltUI?
2018-05-10 10:59:36.905 openLuup.context_switch:: ERROR: [string "L_ALTUI.lua"]:2310: attempt to index local 'tbl' (a nil value)
2018-05-10 10:59:36.905 openLuup.servlet:: error in callback [lr_ALTUI_Handler] : [string "L_ALTUI.lua"]:2310: attempt to index local 'tbl' (a nil value)
2018-05-16 16:32:36.798 openLuup.server:: GET /data_request?id=lr_ALTUI_Handler&command=home HTTP/1.1 tcp{client}: 0x272c6f8
2018-05-16 16:32:36.799 openLuup.context_switch:: ERROR: [string "L_ALTUI.lua"]:2306: attempt to index local 'tbl' (a nil value)
2018-05-16 16:32:36.799 openLuup.servlet:: error in callback [lr_ALTUI_Handler] : [string "L_ALTUI.lua"]:2306: attempt to index local 'tbl' (a nil value)
Can you try this:http://openLuupIP:3480/data_request?id=status&output_format=xml&DeviceNum=3replace the 3 with your AltUI device ID. If you are not sure, try them consecutively from 2. One of them should give you the full variable set for AltUI. Then look for the PluginConfig that amg0 mentions above. Or take a look directly at the user_data.json to find that variable. The theory is that it isn’t set correctly for some reason.
It has to be valid JSON, but perhaps it can be minimal: “{}”.
You can edit it by stopping openLuup, edit the file (save a copy first!), then start up openLuup.
The bigger question that I’m worried about is why didn’t this get set properly initially and what problems will you hit after this? I’m worried that there are other issues because something went wrong earlier. But I don’t know what that it is, so maybe try this and see what you hit next…
I’m not familiar with the initial installation flow in openLuup with AltUI.
That seems to have done it! System is up and running, and I haven’t gotten any more errors (although I can’t get the bridge plugin to clone my vera, but that’s an issue for another thread). Thanks for your help!
No . I ll have a look but it should be fine now.
To be sure flaquito can you share the whole device variable list and values ( same http call as you used earlier )