Gateways and peripherals

I’m going to break down your post to respond to somethings individually.

Starting here:

“I’ve been a bit confused about the role of gateways versus devices.”

Gateways are very similar to regular devices. They connect directly to Losant and can report their own state and receive commands. The only difference is that gateways are allowed to report state for other peripheral devices. So, essentially the answer here comes down to, who reports the state data to Losant.

Let’s say you had an ethernet-connected gateway computer connected to your controller, that gateway could be a Losant Gateway (or Losant Edge Compte) device that reports on behalf of all of your industrial controllers (or Peripherals). Here, the Gateway (or Edge Compte) device would make the state call to Losant for the Peripheral devices.

Now here is where your situation is different, all of your data comes in via a Webhook, and you’re reporting state within a Workflow. So, your devices never directly report state to Losant; all the information comes over via HTTP. Since the actual state report happens in a workflow, your devices would most likely be Standalone Devices.

“Currently we use Devices within Losant to correspond to each cellular modem. I’m wondering whether this is the right way to approach it?”

Yeah, here each controller should be its own device. I like to keep my devices closely associated with the thing that’s generating the data. And to your point, it won’t always be a 1-1 mapping to modem-controller. (In terms of IoT, your cellular modem is a “Gateway,” but it’s not a Losant Gateway because it doesn’t report state for itself or behalf of your controllers.)

To sum things up, the Losant Gateway device type is essential if a device with that type is authenticating to Losant and reporting state (for itself or other devices).

I hope this helps :slight_smile: Happy to answer any follow up questions.

1 Like