I don’t understand why
reason=value does not match regex pattern “^a-z0-9{2,}$”
doesn’t get triggered by dev_id field name as dev_id_knd triggers the error.
You could add them via POST request.
v3 doesn’t accept underscores in Attributes names either. So I’ve to change the names in any case. But it would be nice if I could export devices to json and edit the json afterwards to comply with the naming rules.
I thought I knew the v2 API but I wasn’t aware you could add attributes via the CLI. I do know the v3 API pretty well. I’ve not seen any examples with attributes out of v2 or in to v3 but I’ll gladly see what might be possible.
One other potential thing to try is to use the original v2 CLI to get the device info out and process it for import.
I know this thread is a bit old, but I am currently facing the same problem when trying to export V2 devices to V3. Back in the days we used the V2 API to register devices and added custom attributes ‘deviceSN’, ‘registerDate’ and ‘registerFrom’, and the ttn-lw-migrate tool fails on these custom attributes since they do not match the regexp. Is there any way to skip this validation and let ttn-lw-migrate tool create a JSON file without these extra attributes, so that the devices can be imported in V3? Now it just fails and therefore does not produce any JSON…
Or do we need to craft the device JSON by hand in order to import the devices in V3?