Logic Machine Forum
Sample app for LogicMachine - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Application Store (https://forum.logicmachine.net/forumdisplay.php?fid=11)
+--- Thread: Sample app for LogicMachine (/showthread.php?tid=634)



Sample app for LogicMachine - edgars - 21.02.2017

Attached you can find an example of simple application for starting screen of LogicMachine.
It represents a simple button. You can click on the button to control bit object and see current status.

How to install it?
  • Unarchive the ZIP file
  • Enable FTP on your LogicMachine: System config --> Services --> FTP Server
  • Set user 'apps' password in System config --> Services --> FTP Server
  • Connect to LogicMachine via regular FTP client using user 'apps'
  • Copy unarchived folder Sample to LogicMachine's folder Data
  • On LogicMachine enter Admin section on top right corner
  • Then click on + and on the left side click Menu --> Dev apps
  • Click on Sample and set Object (e.g. 1/1/1) and Status (optional; e.g. 1/1/1)
[Image: sample_app_logicMachine.jpg]


RE: Sample app for LogicMachine - Habib - 21.02.2017

Hi edgars,

is that working also in spacelynk?

BR
Habib


RE: Sample app for LogicMachine - Erwin van der Zwart - 21.02.2017

Hi Habib,

Yes it can work in SL but there is no front end to show it on, so without modification it's useless. 

In new FW for SL there will be a front end so you have to wait a bit..

BR,

Erwin


RE: Sample app for LogicMachine - Hippolyte - 23.02.2017

Hello everyone,

Nice widget !
I wanted to have the exact same On/Off button yet not on the widget but on the separate page (the one when you click "Go to app"). I copy paste the <? blablidibla ?> code of the widget.lp script in the info.html but it does not work. I did write the <? require("apps") ?> at the beginning.

Can someone give me a hand on this please ? I think it is pretty simple but I cannot figure out what I misunderstand.
Thank you for your help.


RE: Sample app for LogicMachine - Erwin van der Zwart - 23.02.2017

Hi,

The client side lua can only be started from files with .lp extentions. You can simply rename your info.html file to info.lp

BR,

Erwin


RE: Sample app for LogicMachine - Hippolyte - 28.02.2017

Hi Erwin thank you very much for your help I appreciate.
I did put the <? blablidibla ?> code of the widget.lp script in the info.html then rename to info.lp and updated the link to info.lp in widget.lp
Yet, the on/off icon does not appear in the page...


RE: Sample app for LogicMachine - Erwin van der Zwart - 28.02.2017

Hi Hippolyte,

I checked and the startpage has some extra's already loaded to have localbus available.

I added these missing items into the info.lp and now it's working. (and changed some other items to have the button inserted on the correct position)

See here my modified sample app with button also in the 'go to app' section.

.zip   Sample Modified.zip (Size: 3.55 KB / Downloads: 88)

BR,

Erwin

Hi Edgars,

In the config.html is a function that needs to be improved with a regex if you ask me (;

There is now this:

Code:
// invalid value
if (valueSet.length==0) {

But should that not be done with a regex to make sure it's a valid KNX address notation? Now you can set any value you want as only zero length is not accepted..

Also the value status needs to be checked the same way (;

Even better would be a dropdown selection with all available addresses (:

I also think the css from the config button (div.container.cfg-container-wrap) when changing the value needs to be checked as button is now to small. (30px width)

Code:
.btn-config, .btn-install, .btn-update, .btn-uninstall, .btn-xinfo {
   padding-left: 0;
   padding-right: 0;
   width: 80px;
   display: none;
}

Anyway i think it's a cool feature like this!

BR,

Erwin


RE: Sample app for LogicMachine - Hippolyte - 01.03.2017

Thank you Erwin !
Works like a charm.


RE: Sample app for LogicMachine - Thomas - 01.03.2017

Hi
What is the main screen good for? Or maybe better question is How do you use it? Or which use has it been planned for?
I'm curious because I haven't found any use of this screen.
In reality I would be happy if this page disappears and simple http://<my_lm_IP> starts my visu with auto decision if I'm mobile or standard PC user. Admin tasks should be under /apps subfolder not available from the main page because it's confusing for a user to see it and it looks unprofessional.


RE: Sample app for LogicMachine - Erwin van der Zwart - 01.03.2017

Hi Thomas,

Main screen is base location for all kind of apps, you can decide what apps you want to use and show. There will be more apps allong time, so yes it's very usefull.

You already can select the base location for your direct IP landing in the user settings and bypass this screen. 

There is no device detection but you can login from your mobile with other username and be redirected directly to your mobile visu.

So all your comments are covered already (:

BR,

Erwin


RE: Sample app for LogicMachine - Thomas - 01.03.2017

(01.03.2017, 16:54)Erwin van der Zwart Wrote: You already can select the base location for your direct IP landing in the user settings and bypass this screen. 
It would be perfect. How can I do it?


RE: Sample app for LogicMachine - Erwin van der Zwart - 01.03.2017

Hi Thomas,

Just checked my LM Ambient and i don't see the option we have in our homeLYnk / spaceLYnk .. I was assuming it was also available in the LM firmware...

In our controllers we can set under the user access -> user access settings this:

   
I have no idea if this will be added to LM firmware ..

Sorry for the misunderstanding..

BR,

Erwin


RE: Sample app for LogicMachine - Erwin van der Zwart - 18.10.2017

Hi,

This option is from old version firmware, in the current FW this is changed / removed.

BR,

Erwin