Device State Node Error Device Id not found

Hi there, sorry to bother I’m new and I believe this is basics … I have searched for something similar in the forum but have not found … not the best searching though, mom and wife says all the time …

So here is the thing after receiving a payload by webhook I do get node and state node and everything works fine when a specific device is selected in Device State, now I have the same payload incoming for different devices and there is the name of the device in the payload so I try to use the JSON form but I get device ID not found, which make a lot of sense because the deviceid I don’t know from the source so I only have Device Name … is there a way to do this? or I’m doing wrong to update different devices according to a payload attribute??

This is my workflow

Thanks for the help in advance.

Hi @Mario_Romero,

Welcome to the Losant Forums, I’d be happy to help :smile:

I took a look at your workflow and you are so very close! Your Device: Get Node has a Result Path of data.deviceResponse, so the output of the node is placed on the payload at data.deviceResponse:

Opening deviceResponse shows information about the device selected previously, and even includes the Device ID. Thus, your Device State Node would need to look like so:

Let me know if I can assist further!

1 Like

Excellent, thanks a lot, it worked like a charm !!!