[Solved] Edge devices should/could be Gateways for Peripherals



We use raspberry pi’s as Gateways, they currently run python “modbus” agents. We have had as many as 40 pumps (modbus enabled) each with about 20 properties which then feed Losant hanging off a single Pi. These are sampled typically every 3 seconds.

I have another project (Personal) with ESP8266 (will top out at around 20) currently using a Pi as a MQTT bridge, but I need to implement local scheduling (must work if link is down). So am now considering how to use the Edge Agent. So slightly different mix. The pi at the moment isn’t a gateway but could be. At the moment getting Arduino MQTT client to work with Losant via a bridge, means I have to jump through hoops for local control. Instead a Losant EDGE agent, with http being local transport is probably all I need. (I am doing over the air updates, triggered by Losant on the ESP8266, on receipt of command they download new firmware).

Another scenario is PyCOM devices using LoRa. I need a gateway to Losant, but also local control local workflow. This is another example where an Edge Agent is physically a Lora/MQTT gateway, where Edge Agent being classed as a Losant Gateway device for Lora peripherals makes sense.

Hopefully I am building up a compelling argument :wink: Despite all the vague hand waving above :wink:

Without this feature, currently I have to create two devices for the pi.

  1. Losant Edge Agent
  2. Losant Gateway.

In my first example I still have to run our Python Agent, or multiple Docker based Edge Agents and not have the Gateway.

Whilst the Edge Agent is pretty good, I must admit I have my doubts about running 30-40 Docker Edge Agents on a PI :wink:





So this is actually true already! Devices that are Edge Compute are also allowed to act as gateways - i.e., report state for peripheral devices. So Edge Agent workflows can report state for device IDs other than the edge agent’s device ID.



Oh cool.

Didn’t realize, I see it does actually state this in the link you provided. Sorry for the noise.