Programatically Creating Devices (Gateways) and Devices (Peripheral)

Is there a way to create Gateways and Peripheral devices programmatically?
Example Application:
One gateway with many vibration sensor connected to that gateway.
The gateway will scan through all possible devices and will return only the ones that respond and publish these values to an MQTT topic.
Once this topic is published, I would create a gateway device and devices for each sensor that responded to the gateway’s polls.
After this dashboards for each sensor would be generated under a dashboard for the gateway they are connected to.

Any suggestions on how to tackle this problem or where to read about potential solutions would be much appreciated.

Best Regards,
Leo

Hi @Leo_Bach,

The workflow engine is pretty powerful. Check out this post:

It is a great article showing how devices can register themselves in Losant.

Overall, you can easily do this using the Device Create Node:

https://docs.losant.com/workflows/data/create-device/

Let me know if you have any more questions, happy to help!

Your videos for on-boarding are awesome. Thanks!

2 Likes

Thanks @Leo_Bach! I really appreciate that :slight_smile:

1 Like