I am starting to look at javascript for some of the tabs for my devices as I think it might make things a little easier. However, it is unclear to me how you would call an action. For instance, if I had two buttons in javascript, what is the right way to call “myAction1” when the first button is clicked, and “myAction2” when the second is clicked?
As already linked above, I do it with http calls in the plugin variable container. This works realiably, even when connecting through mios.com or ob local lan’s.
But to be honest, I don’t think that’s the proper way. I’d love to hear about a cleaner approach.
I am not sure if I get this right. Are you saying that using “RunLua” requests which are called by http are the best method as for the moment? Or is there another possibility to call “RunLua” request from java without using http?
Yes. The UI communicates with the back-end only through HTTP requests, and the RunLua HTTP request is the easiest for calling actions. The alternatives would be either Ajax requests, or SOAP requests.
Best Home Automation shopping experience. Shop at Ezlo!