# \[Solved\] ValidationError: Invalid device id

**URL:** <https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440>\
**Category:** Help\
**Tags:** particle\
**Created:** [January 12, 2019, 5:20am UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440 "2019-01-12T05:20:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 12, 2019, 5:20am UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/1 "2019-01-12T05:20:23Z")

</div>

Hi  
I’m new at Losant.  
I’m testing with Particle Photon following this link:

> **[How to Integrate Particle with Losant](https://www.losant.com/blog/how-to-integrate-particle-with-losant)**
>
> This is a quick reference on how to connect Particle, a maker of inexpensive IoT hardware, with the Losant IoT Platform.

  
Apparently the integration with Particle works, but I keep getting this error.  
What device id this error refer to? To particle device id ( From particle Web IDE )  
or  
the one you find at Device tab on the top right?  
Thank you.

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [January 12, 2019, 3:16pm UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/2 "2019-01-12T15:16:20Z")

</div>

What is the error you are receiving? I don’t see one in your question. If you provide the error we should be able to help.

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 12, 2019, 3:42pm UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/3 "2019-01-12T15:42:25Z")

</div>

At debug tab, on top of the payload said:

**ValidationError**  
Invalid device id:

```auto
{
  "device_to_update": null,
  "globals": {},
  "applicationName": "Moon",
  "flowName": "Moon Workflow",
  "flowId": "5c396a1deaf910000868d8b5",
  "flowVersion": "develop",
  "relayType": "integration",
  "relayId": "5c3969c5b6722e0007d0af60",
  "triggerType": "integration",
  "triggerId": "5c3969c5b6722e0007d0af60",
  "applicationId": "5c39691aeaf910000868d8b2",
  "data": {
    "temperatureF": "232.109890",
    "voltage": "1.611722",
    "name": "climate_reading",
    "coreid": "3e0039000247363339343638",
    "published_at": "2019-01-12T15:40:26.551Z",
    "ttl": 60,
    "data": "1.611722:232.109890"
  },
  "time": "2019-01-12T15:40:28.880Z"
}

```

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [January 12, 2019, 4:06pm UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/4 "2019-01-12T16:06:17Z")

</div>

I’m assuming the device ID you’re trying to reference is at `device_to_update` on your payload, whose value is `null` in the snippet you provided. This would be the invalid device ID in question.

If you’re following the tutorial from the link you posted, then your “Device: Get” Node must not be returning a Losant device.

Can you paste screenshots of your Device: Get Node’s configuration as well as the tags you have applied to the device as you set it up in Losant?

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 12, 2019, 5:25pm UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/5 "2019-01-12T17:25:30Z")

</div>

Thanks for your help

 ![Device%20Pic](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/e37ad6260c6b87ef44156275ff34d97f3589d97c.png) ![Device%20Pic%202](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/417208e8e19e95230c03fcbd2b2c0c8f2d4ac65b.png) ![Integrations](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/1X/21c1f39c369ef22fa6f6b0ee67715a68bfd2aa50.png) ![WorkFlow|690x194]

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [January 12, 2019, 5:59pm UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/6 "2019-01-12T17:59:21Z")

</div>

It looks like your workflow screenshot didn’t come through; you do have the `particle_device_id` tag on your device, and it does match the value on your payload at `data.coreid`.

So in order to return that device in Losant, your [Device: Get node](https://docs.losant.com/workflows/data/get-device/) should be configured exactly as it is in [this screenshot](https://www.losant.com/hs-fs/hubfs/Blog/how-to-integrate-particle-with-losant/device-get.png?width=1170&height=1650&name=device-get.png) from the article you mentioned in your original post. After that, you should have an object at the `device_to_update` payload path, off of which you can pull the Losant ID to use to update state in your workflow.

Let us know if you’re still having issues.

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 13, 2019, 3:45am UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/7 "2019-01-13T03:45:34Z")

</div>

OK, everything is working fine.  
The problem was that Device:Get node for some reason did not take correctly the settings.  
I went back to edit it and it worked.  
Thank you very much for tour help.

---

<div class="post-metadata">

**Author:** ![Tron7](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@Tron7](https://forums.losant.com/u/Tron7)\
**Post date:** [January 14, 2019, 10:24pm UTC](https://forums.losant.com/t/solved-validationerror-invalid-device-id/1440/8 "2019-01-14T22:24:48Z")

</div>

I just started with this platform.  
I am able to send data to Losant but yet I am struggling to get the slider value on my Electrone code.  
I understand that the slider should send itst value to the Broker but I do not find the way to set a variable  
for the slider.  
Can you give me some tip for do that?  
Thank you in advance.
