[SOLVED] Two different Particle Device ID's reporting to all workflows, Need to separate

Good afternoon,
I have set up two different devices with separate device ID’s. Both devices are running the same code and I want to be able to have different workflows and dashboards for each device.

The problem I am having is that no matter which device is on they run through all the workflows. If I turn both on they both report to all the workflows.
I am attaching screenshots as I assume this is a rookie mistake somewhere. Please let me know if you spot the mistake. I am new to Losant so just stared on my second device to make sure I could separate the device data. I still have lots to learn.

Thank you in advance for your time.

Device A

50%20PM

Device B

Workflow GET Settings

Workflow State Settings

Hi Thomas,

I think your issue is that you are looking up a device based on the particle_device_id, but then in the Device State Node, you are selecting a specific device instead of setting the device id from the payload. So under device state, I would select the “Use a Device ID specified on the current payload”. If you want to have two separate workflows that only affect report state to one Losant Device, then you will need to set up two separate particle integrations.

Dashboards can display data from several devices and across applications, so if you are thinking you are required to have one workflow for one dashboard you are not. :smiley: When building your dashboard blocks you will be able to select which devices from which applications you would like to display.

I hope this helps!

Erin

1 Like

Thank you for the quick reply Erin.
I tried changing the device state but I keep getting a Validation Error on the debug saying I have an Invalid Device Id:

What did I do wrong here?

Hi Thomas,

So you are trying to access the id by the path data.device.id, and I can see on your payload that the path does not exist. Hence why you are getting an Invalid Device ID Error, since undefined is not a valid ID. If you open up your Device: Get Node, you set a Result Path which is where the result of that node will be stored on your payload, and my guess would be that is device_to_update. So instead of data.device.id, I believe device_to_update.id will work.

Thanks,
Erin

1 Like

Hi Erin,
Thank you very much. That did clear the error. I was still getting both devices running through each workflow. I went back to your original reply and created a new integration for each device, then selected the specific integration for each workflow. Now they are running independently of each other. My guess is that for each device I add I need to create a new integration to have them report separately. You of course already know all this :grinning:, I am just writing it down in case some other newbie like me, comes across my post with the same question. Also in case, there is a better way and someone wants to point it out to me. :slight_smile:

I really appreciate your support and taking the time to help me. I love the platform and am very excited to see what more I can try and do.

Cheers,
Tom