Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON device reference does not mention session.keys.session_key_id #1256

Open
dajtxx opened this issue Jan 29, 2024 · 5 comments
Open

JSON device reference does not mention session.keys.session_key_id #1256

dajtxx opened this issue Jan 29, 2024 · 5 comments

Comments

@dajtxx
Copy link

dajtxx commented Jan 29, 2024

I have been moving devices between applications by exporting the device JSON via the CLI and then feeding that JSON back to the CLI dev create command. I am trying to keep the device session alive.

I removed all the fields not mentioned on the JSON file reference page and received an error mentioning the session.keys.session_key_id field. When I put that field back the device creation worked.

I think this field needs to be added to the JSON reference table.

@github-actions github-actions bot added the needs/triage We still need to triage this label Jan 29, 2024
@KrishnaIyer
Copy link
Contributor

I have a PR coming that documents this. Will get back here when that's merged.

@dajtxx
Copy link
Author

dajtxx commented Jan 31, 2024

More experimentation shows some fields not mentioned on the reference page are ignored so can be left in the JSON, and others are accepted.

For example, I left in things like the servers and created time at the top level and they were ignored which is fine.

I also left the formatters object in and the new device had those formatters carried over despite the JSON ref not mentioning this field/object. Using the whole formatters object during dev create a lot easier than using the 4 different flags to the dev set command so if this is intended behaviour it is worth mentioning.

@dajtxx
Copy link
Author

dajtxx commented Feb 1, 2024

I think the page should also mention that locations and formatters are accepted. It might even be better to say what should not be included in the JSON.

@dajtxx
Copy link
Author

dajtxx commented Feb 5, 2024

Further to my comment above, I have found that exporting with --all and then removing the application id, dev_addr (from the ids object) - both neccessary, and I also removed recent uplinks and downlinks although I don't know if this is required, worked much better.

I moved 2 devices between apps following the JSON reference and the devices do uplink, but very sporadically. I moved another 2 devices (all the same type) using the method described in this comment and these two devices missed 1 uplink but then carried on with regular uplinks.

So following the JSON reference to the letter does not seem to work for all devices. It also means you lose device-specific formatters.

@KrishnaIyer
Copy link
Contributor

Please check the API section of our docs for information on fields.

@KrishnaIyer KrishnaIyer removed the needs/triage We still need to triage this label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants