I was wondering if it’s possible to automatically deploy an edge workflow using the device: connect node?
I’ve followed tutorials and other forum posts to create a raspbian image that makes use of the device registration template and node js to write the correct config.toml file and add the device to Losant. I’m hoping I can go one step further and automatically push down a specific workflow based on tags or something when that edge agent connects.
Even if the gateway is not powered on or connected to Losant during that workflow run, the next time the gateway connects to Losant it will deploy the workflow(s) that are intended for that device.
Please let me know if this is what you were looking for!
I’m struggling a little bit with this. I’ve created an Application Workflow with the following nodes:
Device Connect : I’ve selected the specific device for testing
Losant API: Type: Edge Deployment Release; Parameters: JSON template with my flow id and version.
when the edge device connects, the application flow is running with a response.result.success = true, but I don’t see the new edge device in the list of deployments for the edge workflow
Would you be able to tell me more about your use case? Specifically, what you are hoping to accomplish with the Device: Connect trigger?
If you’re looking to deploy specific Edge workflows to a newly created Edge device (and since you are using the Dynamic Registration template), you should set up your workflow deployments right after the device is created.
Doing this will set up the workflow(s) that you want to be deployed to that specific device to be sent to that device once it connects. This, in a way, “marks” the Edge workflow to be included in the initial messages we send to an Edge device when it connects.