[Solved] Dynamic Dashboards

Hi, Losant is really great IoT platform and I am very happy with all functionality which is providinng. But there is one thing which I miss a lot. Some kind of dynamic dasboards - one dashboard to serve many devices of same type.
Example: I have 50 thermometers and I need to show a some overview dashboard ower all devices to simply visualize errors, alert states, etc. - that is simple and can be easily done. But I also need to have possibility to click in that dashboard to one particular device and open related dashboard with details for that device.
Today I have to clone one dashboard n- times and manually change device in all widgets - nightmare while it is so easy to make mistake and have mixed devices in one dashboard.

I believe I am not only one requesting such feature. At least I would like to have possibility to export dashboard into file and be able to find replace device ids or tags.

Thank you

I would really like to see that as well.

We call this “Dashboard Context” and it’s under construction right now. It’s likely still a month away - there was a decent amount of UX work to get this seamlessly integrated into existing dashboard functionality while not being confusing.

Thank you for feature I like it. I have one question… How I can access device name or tags when context variable is device ID ({{ctx.deviceId-0}})? e.g. for displaying device name in description bar? I have noticed that in your help you are using variable {{ctx.deviceName}} but it doesn’t work for me.
thank you

In the example, deviceName is passed as an additional context variable. The example uses the GPS History block, which provides the device’s name so you can customize the popup’s content. Since you have the device name and device ID there, you can link to a dashboard specific for that device and pass the name and ID as context variables.

At the moment, the device name is not automatically available when a device ID is configured as a context variable. It is something we did think about. It’s not a bad feature idea.

OK, understood. Device name, device description and device tags would be great to be able somehow describe displayed dashboard. I would also appreciate some possibility go from some general dashboard into context one like you doing with tiptool in maps. eg. click on standart widget will open url of context dashboard…

have a nice weekend


Second vote for the features asked for by David. Further device details available within dashboard context.


Please clarify how one extracts device name from the context variables.

Take a look at this dashboard, which displays data from a series of “weather stations” (set up similar to how you’ll find in our walkthrough.

The part you care about is the map and list of stations in the left column, which are a GPS History and Device List block respectively. In each of those cases, when we are querying for the data to display in the block, we are also returned the device name that corresponds to each ID.

Given that the dashboard has context variables “devId” and “devName”, we can then build links to other context states within the rendering config of each block. For the GPS History block, I’ve set my popup template to be:

##### **{{deviceName}}** 

[View Device]({{dashboardUrl ctx=(obj devId=deviceId devName=deviceName)}})


And for the Device List, I’m configuring a custom URL for where the device name should link, and setting it to:

{{dashboardUrl ctx=(obj devId=deviceId devName=deviceName) }}

Please let me know if you need any further clarification!

Thanks. My dashboard is using a similar device list. Based on the weather station dashboard, it is not clear how you are customizing block headers on the right for each weather station name.

If the context variable is devName, I am setting the title of my blocks to be, for example, “{{ctx.devName}} Current Humidity”. That will render the value of that context variable at the front of the block title.

The dashboard context does not allow me to define a context variable as device name.


Sorry, save it as the type “string”. Then you’ll populate it using the method I described earlier.

For the default value, set it to the name of the device you’re using as your default device ID (looks like “Paulina1” based on your screenshot).

Sweet! All better now. Thank you.