If what you’re after is using a spreadsheet to add devices to an existing application, then you can use THIS go script. You need to edit init() and specify details. Running this script on server will skip existing lines and just add any new lines - Note: you need to create the application with # specified in 2nd column before running script.
modify init()
populate XLSX specified above:
run script:
I previously wrote that I installed Docker & Docker-container, but those were all lies (sorry). Instead, I installed go-lang as follows:
- I saved brocaar’s script to “official_go_package.go”
- download latest “chirpstack-api-longHEXid.zip”, rename to shorter chirpstack-api & unzip it.
- install go-lang using “sudo snap install go --classic”
- when I tried running brocaar’s script with “go run official_go_package.go” it complained about missing go.mod so I fixed that by moving brocaar’s script to “go” subfolder under api where go.mod is located.
- created devices_spreadsheet XLSX as shown above.
a. You may need to “sudo snap install libreoffice” first, like I did
b. WARNING: be sure to change formatting of columns with device IDs to “text” or Libreoffice will do funky number on any IDs beginning with a number. - edited official_go_package.go and changed init() as shown above.
- installed missing packages:
a. go get github.com/brocaar/lora-app-server/api
b. go get github.com/pkg/errors
c. go get github.com/tealeg/xlsx - ran script with “go run official_go_package.go”
The only thing brocaar’s existing script doesn’t support is setting additional parameters for each device (which I have to do manually) such as “Disable frame-counter validation”, etc.