Logic Machine Forum
Fastest way to get .lp into Touch vis (skipping editability)? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Fastest way to get .lp into Touch vis (skipping editability)? (/showthread.php?tid=4592)



Fastest way to get .lp into Touch vis (skipping editability)? - temp4 - 21.02.2023

Hi!

I have created a few .lp-files with html/lua/javascript and uploaded via them using ftp to my "/user/" folder. I can view the pages via my browser if I enter the correct url in the address field.

But now I would like to "import" these pages into the Touch visualization framework (in my Wiser for KNX HW 2.8) in the *easiest possible manner*.

The documentation I have found on creating an Application or Widget seems a little fragmented and I can't really figure out how it works.

So I would prefer NOT to create editable/configurable "apps" for each .lp-file (I am the only end-user and prefer to edit/update via a text editor and ftp). It seems to add a lot of complexity to have to create various JSON-files, templates etc and I would like to avoid it since I will not need to use it anyway.

The best thing I have come with is to:

1) Create an empty Widget with the right size in the Touch GUI
2) Use javascript fetch(...).then(...) to inject the html output from the .lp-files into the main DIV of the empty widget.
3) Use localbus.listen('storage',...) to occasionally re-fetch the .lp-file

Does anyone know of a better solution? Or is it not as complicated as I think it is to create an Application/Widget?

Sincerely,
Robert


RE: Fastest way to get .lp into Touch vis (skipping editability)? - Daniel - 21.02.2023

In Mosaic (LM) we have frame widget but SE removed it due to security concerns.