This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

New Visualization – Is HTML widget JavaScript / KNX interaction officially supported?
#3
(9 hours ago)admin Wrote: You can't put inline JS into HTML widget, you have to use Custom JS for that. Check the links below.

Basic HTML widget interaction: https://forum.logicmachine.net/showthrea...3#pid42313
Visu JavaScript reference: https://kb.logicmachine.net/misc/visu/

Hello,
Thank you for the clarification regarding the HTML widget and inline JavaScript.
I would like to confirm the next step for the new visualization:
Question
If the HTML widget is used only for the markup and the interaction logic is implemented in Custom JavaScript, what is the official / supported way to trigger KNX writes from that Custom JavaScript?
For example, from a custom RGB interface we need to write:
  • boolean ON/OFF values
  • dimming / percentage values
  • RGB 3-byte values
Could you please clarify which of the following is the recommended method in the new visualization?
  1. A supported JavaScript API / function to write values directly to KNX objects from Custom JavaScript
  2. Using native LM widgets only for the control logic, while Custom JS is used only for the UI behavior
  3. Calling a Lua / HTTP bridge from Custom JavaScript
  4. Another officially supported mechanism
If there is a supported JavaScript API, could you please indicate the relevant documentation or function names for:
  • boolean write
  • numeric / dimming write
  • RGB 3-byte write
I would like to confirm the correct architecture for building a fully custom control page in the new visualization.
Thank you.
Reply


Messages In This Thread
RE: New Visualization – Is HTML widget JavaScript / KNX interaction officially supported? - by Ahmed.K - 8 hours ago

Forum Jump: