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
- As the peripheral device manufacturer, we purchase a gateway and log the serial number to a data table.
- When the gateway starts and has internet access, a POST request is sent to our experience endpoint to self-register.
- An application workflow is kicked off to check that the serial number is listed in our data table.
- 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.
- 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
- After the gateway sees that it has an MQTT connection to Losant it scans for peripheral devices.
- It then will register each peripheral device with Losant using a sensor template.
User Experience
- A user creates an account.
- The user logs in for the first time are taken to a page that instructs them to do the following:
User Required Action
-
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? -
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)
-
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? -
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.