? Check if devEUI is already registered in one of my apps

Hi,

Is there any other way then by going through:

ttnctl --app-id app_nr_1 devices list
...
ttnctl --app-id app_nr_12 devices list

and parsing the output to determine if a device is already registered?

I’ld like to omit the need to reinstall a device at its former location after battery change.

By the way: There’s no switch for ttnctl to get a more machine parsable output, isn’t it?

You don’t, if it’s on ABP, then you will need to reset the frame counters. If it’s on OTAA, then it will sort itself out.

There’s an API for that! But it is regularly formatted so can be parseable before JSON was invented - like wot I had to do as a child, working down the data mines for 25 hours a day …

It’s a bunch of 100 sensors which are picked up in the field, reenergized in the lab and afterwards reinstalled. It’s not necessarily the same sensor at the same place.

I’ll take that as meaning device.

So what, the device is now in a different location, so update your database, at best, have a barcode on it. And if it’s got a different config of sensors on it, so what, update your database, at best, have some templates setup.

Regardless, there is no concept of reinstall, if you delete a device it has ramifications that are just far more easily resolved with a backend management system - after all, TTN doesn’t care what sensors are attached, it just passes on the payload, nor does it care where it is, to the extent that it doesn’t provide a way of saying what it’s location is, you can deal with that.