Back to Smartcitizen.me

Update Device id via API

Hi, I hope all is well. I had to reinstalling my SCK2.1 and when doing so the device received a new device id = 12588. However, we are running a script to GET sensor values from the device on regular intervals.

Is it possible to revert the device id back to it original id = 10855.

I have tried to update the device id using the PATCH function as described in https://developer.smartcitizen.me/?shell#update-a-device

to no avail. I have an authentication token and am able to update the device name etc. but not the device id. Am I doing something wrong?

Thank you.

No, that’s not possible.

Whenever reinstalling our upgrading better you writedown the device key so you could use the same one the next time. There’s no need to go over the start.smartcitizen.me process if you want to change something on the hardware.

https://docs.smartcitizen.me/Guides/Update%20the%20firmware/

That way, even if you reinstall, upgrade, change your device, it will always appear the same in the platform.

Right, what we can do is to set the device key of 12588 to device 10855, so your Kit will start posting again as the old device. However, you will lose the data published on 12588 during the last few days.

Hi Thank you for the reply. Yes, could you please set the device key of 12588 to device 10855, so that my Kit will start posting again as the old device. The lost data is not a problem.

Thank you and best regards!

Hi!

It looks like the device doesn’t exist. Maybe you typed the wrong number, or you delete it some days ago. The platform keeps a 72 archiving period before it entirely removes a device. Do you have your original device key (token) written somewhere?