Skip to main content

LUIS Interface

Loading...

In the Settings project, you learned how to edit your application's settings through the web interface. The caveat is that, in order to access the web interface, you must know your device's IP address first. Sure, you could use Device Explorer to discover the current IP, but you wouldn't expect "regular" users to do it whenever they need to access your device, right?

This is where the Loadable User Interface System (LUIS for short) comes in. The name is a mouthful, but the concept is simple: LUIS allows editing your device's settings over the BLE (Bluetooth Low Energy) connection. You view and edit the settings using the LUIS smartphone app. In a nutshell, this is "HTML over Bluetooth." The LUIS app is a simple "browser" that receives HTML pages from your device and presents them on the screen.

Since the LUIS interface works over BLE connections, your TPS must be fitted with the WA2000 Wi-Fi/BLE add-on module.

Linked Settings

This project is based on the Settings project. The stg_timer_reload_value setting is still present, but you will notice that two new ones have been added: The NETCP (Ethernet DHCP) and NETIP (Ethernet IP) settings. These look like regular settings, but there is something interesting about them: they are linked to the DHCP and IP Address properties of the Ethernet interface.

Many properties of many pages of the Features tab can be linked to settings. To do so, press any of the Link to setting buttons. This will immediately create a linked setting.

linked_setting

Linking a property to a setting allows you to expose it to the outside world, for example, via the web or LUIS interface. No longer hardcoded in your project, it will now be user-editable. To enable the editing of all three settings both via the web and LUIS interfaces, they have been added to the General group of each:

  • Web Dashboard page (Settings sub-page)
  • LUIS page

Testing the LUIS Interface

Open the LUIS app once the application has been uploaded onto your TPS and is running. The app should show your device's name as Here I am! This is defined on the Bluetooth (BLE) page of the Features tab.

Click on this name, and the settings page will load. You can now check the current device IP and even edit your settings from your smartphone!

luis_settings

When your application is simple, you can have the same list of settings exposed through the LUIS and web interfaces. If the application is rather complex, keep the LUIS list to a minimum while providing full editing features in the web interface. There are certain capabilities -- such as working with data tables or viewing event logs -- that only the web interface can handle anyway. The rule of thumb for large projects should be that LUIS shall help users find the device and perform other essential functions. The rest of it should be relegated to the web interface.