OpenLuup : Basic UI
-
Creating a separate thread for anyone who is interested in using the basic (vera) smartphone UI with openLuup
The actual
L_sPhoneUI.lua
file needed comes from the ‘ Smartphone Web Interface ’ that’s installed via the mios App Store.Once you’ve got the file and have uploaded it to openLuup, add the following to your Lua Startup
dofile ("L_sPhoneUI.lua")
FYI - all associated js, css and graphic files seem to be hosted at
https://download1.mios.com/L_sPhoneUI_layout
so not sure how long they will remain available there, but theoretically alternative hosting could be done.. -
Yep, I had tried it, and even after a number of luup restarts it still wasn’t working. I was about to give up when..
As I was running OpenLuup via Docker, I had to shut my NAS down to do an upgrade and I can only assume a full reboot did the trick.. it now works ..
-
Hi @akbooer
QQ: where would be a best place in the openLuup folder structure to store local copies of all these associated web files ?
local lfs = require('lfs') lfs.mkdir("/js/") lfs.mkdir("/css/") lfs.mkdir("/images/") lfs.mkdir("/icons/") lfs.mkdir("/buttons/")
Then I can update the
https://download1.mios.com/L_sPhoneUI_layout
location in the Lua file.. -
Thought I’d have a go at creating a script to download all the files, and while it seems to create the file, it does not seem to be right, when I go to open it, it gives anerror, or says image broken. Here’s my code, any ideas ?
local sPhoneFiles = { {"/icons/brightness.gif"}, {"/icons/security.gif"}, {"/icons/camera.gif"}, {"/icons/dimmable.gif"} } for k1,v in pairs(sPhoneFiles) do for _,v1 in pairs(v) do local body, code = https.request("https://download1.mios.com/L_sPhoneUI_layout"..v1) if not body then error(code) end -- save the content to a file local f = assert(io.open("/mnt/nas"..v1, "wb")) -- open in "binary" mode f:write(body) f:close() --print (k1,v1) end end