Gateways, Sensors, Machines and Customers: Abstracting the Parts that Customers Don't Care to Focus On


Big Picture

We are a peripheral device manufacturer… we have sensors which get daisy chained together to a single gateway. The number of sensors with each gateway varies and we are trying to automate setup as much as possible while simplifying user experience for our customers.

Our customers might have a single geographic location or they may have locations spread across the world which they’d like to manage from a single location.
Our customers might have multiple gateways per a single machine. They might have multiple machines per a single gateway… at the end of the day what our customers care about are their Machines.

After initial setup, it would be ideal if customers could drill down from a list of machines -> To a list of sensors on that individual machine-> To the data for the specific component of that machine (one of our peripheral devices per component).

With this goal in mind… I’d like to present my progress and questions about the Losant platform’s ability to accommodate this dream with the tools that are available.

Gateway Setup

  1. As the peripheral device manufacturer, we purchase a gateway and log the serial number to a data table.
  2. When the gateway starts and has internet access, a POST request is sent to our experience endpoint to self-register.
  3. An application workflow is kicked off to check that the serial number is listed in our data table.
  4. If it is listed in our data table (meaning it was sold by our company) the workflow returns the deviceid, key, and secret to the requesting gateway and then logs this data into the same data table for record keeping purposes.
  5. After the gateway has its connection information the remainder of the data will be sent via MQTT to losant to report state and other events for itself and its peripherals.

Peripheral Setup

  1. After the gateway sees that it has an MQTT connection to Losant it scans for peripheral devices.
  2. It then will register each peripheral device with Losant using a sensor template.

User Experience

  1. A user creates an account.
  2. The user logs in for the first time are taken to a page that instructs them to do the following:

User Required Action

  1. Go to the gateways page — I am hoping I can show a map of the gateways and a list of the ones claimed/owned by the logged in user (I am wondering if this can be a dashboard similar to the following)

    Question 1: Is there an way to use the device list block to show the gateways which have a device tag set to the logged in userid? I know you can set this manually but is there a way to tell the devices block about the user that is logged in and call up gateways which match the userid? (I’ve used the user as context to display devices owned by the user successfully using a data table block, but it is messy without filtering for certain columns which do not concern the customer… such as the aforementioned deviceids, secret, key. Also it seems there is not a way to have contextualized page/dashboard linking into the data table block as there is with the devices block would be extremely useful for the drill down navigation.)
    Question 2: Same as question 1 but regarding the GPS History Block?

  2. Enter the serial number of their gateway which kicks off a workflow to add the logged in userid as the gatewayOwner. (gatewayOwner is stored as both a device tag as well as a data table column entry)

  3. Go to the machines page — I am hoping I can make one dashboard almost identical to the gateways dashboard but create in a data table an “object” of sorts which a customer could assign peripheral devices to.
    Question 3: Would it be possible to do this?
    Question 4: Is there a way to add a link in a data table block?

  4. Once peripheral devices are assigned to a specific “machine” I would like to list the machines to link to individual machine pages (where linked sensors will be listed) or perhaps have a device list on the machines page which shows links to the selected machine’s associated sensors.
    Question 5: Can anyone see a way to do this?.. even pointing me in the right direction would be much appreciated.


See Sensor Correction strategy for a discussion on similar issues.

Best Regards, Eckehard


Hi @Leo_Bach1,

I am working on some of your questions, and will follow up soon with answers! In the meantime, some resources you can check out are the Losant University Course 4, Chapter 9 video on Context Variables as well as our documentation on Device Tags.


1 Like

Hi @Leo_Bach1,

Let’s dive in!

Question 1 & 2
I think this could be accomplished with Dashboard Context in your Experience. The Device List Block can allow for filtering by tags as well as context variables, but you could also incorporate User Tags to make filtering easier within the Experience. Data about the logged in user can be seen on the payload of an Experience workflow, so comparing user data to gateway data should be quite feasible. Here are some resources for this:

Currently, there is no way to remove columns from the block, but there is a feature request for it!

Question 3
I’m a bit unclear on this question, I am reading it as “can a user have a data table of peripheral devices that can be added to?” I am likely reading it wrong, let me know!

Question 4
Currently, a data table value cannot be a hyperlink, but I will make a feature request for this. You can still store a URL as a string in a data table, but it will not be clickable.

Question 5
I think making use of tags here would be very valuable, then on your experience you would be able to filter and display certain data based on these tags. For example, if you have Machine A, you could tag those peripheral devices with machine=machine_A. You could then have a list of the machines on an experience page that link to a page that only shows devices with that machine tag.

We have a great Multi-Tenant Experience Example I will be inviting you to. The main page can be found here, but I will invite you to the organization so you can check it out further!

Let me know how else I can help!


I will pour through those two resources tomorrow and see how far I can get… My other questions are likely a result of a lack of understanding of the best way to use the context variables and URL handling within the dashboards/blocks. I appreciate your help and will comment back if I hit a wall. If struggling, it’s always good advice to RTFM.