Move device to a different v3 app?

Hi,

Having changed our mind about where we want some devices registered in v3, I’m wondering how best to move them from one application to another.

Would the following commands do it without requiring a restart of the device? If not, are there just some extra flags I need to add to the get command to get all the required session infomation?

I tried the --all flag but it came with a warning and in any case I still need to know if the get/create/delete sequence is the correct way of moving a device.

ttn-lw-cli d get oldAppId devId --name --root-keys --session | ttn-lw-cli d create --application-id newAppId
ttn-lw-cli d delete oldAppId devId

Regards, David.

1 Like

I wanted to move a device again yesterday and the following combination of command line and console worked.

ttn-lw-cli ed get --all the-app-id the-dev-id >the-dev-id.json

Then in the console delete the original device in the ‘old’ app, go to the destination app, add an end device, import that json file.

The next message came through without a rejoin.

The --all flag still gives warnings. It would be nice if the set of flags necessary for this operation was easy to determine and specify. As it is there is a huge list of flags and I don’t know which ones I need.

I just looked at my v2-v3 migration utility and see it fed the JSON to ttn-lw-cli via stdin. It would be helpful for either this to be mentioned in the help output for ttn-lw-cli ed create, or an option added to specify a JSON file.

This must have been mentioned in the migration docs because I knew about it back then, but I don’t read those now.

Of course I could have looked at my own source code earlier. I could have used ttn-lw-cli ed delete app-id dev-id too, for anyone else doing it.

Welcome to the TTN community! This is how things happen! But it would be nice if you could lodge your comments as a GitHub issue as they won’'t be actioned from here.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.