Edge device connection status in experience page

Hi,

I’m working through the industrial equipment monitor template to try to get more familiar with the experience side of Losant. I’m looking at the component-device-list part trying to edit it to show what I’m interested in. I’m wondering if there is a way to replace the part that indicates whether the device is “running” or not with if the device is connected or not. the part I’ve been trying to edit is the template line:
“{{#eq this.compositeState.state_description.value ‘Running’}} device-list-status-green{{else}} device-list-status-red{{/eq}”

I’ve been trying things like “this.isConnected”, “this.connectionStatus”, “this.isConnectedToLosant” and I just can’t seem to figure out if this property is available.

I feel like it has to be since there is a device connection log and the device list in the portal shows if the device is connected or not, but I can’t find it.

Hey @Tim_Brennan,

This should be available to you. Have you checked the Render Log to see what the path may be to the connection? Here’s what my IEM Template Render Log looks like for the device list component:

My path to connection status for the first device is: pageData.devices.[0].connectionInfo.connected

I would also make sure that you check the Experience Workflow GET /, and more specifically the Device: Get Node. It should have a configuration similar to this:

Notice the “Include Connection Status” option is selected.

Please let me know if this helps.

Thank you,
Heath

those two things got it handled perfectly.

  1. Get/ Node: checked the box to include Connection Status
  2. updated component-device-list code to be: “{{#eq this.connectionInfo.connected 1}} device-list-status-green{{else}} device-list-status-red{{/eq}}”>"

thank you!

1 Like