Register devices using gRPC request with python!

All i want is to create/activate devices using gRPC requests with python (I don’t know why it can’t be REST API !!!). Tried using the documentation examples, but i does not work, certainly i’m doing something wrong. I just need a help to request with this gRPC using python.

  • Chirpstack is set with an AWS EC2 Ubuntu.

OBS: My solution to keep going with my job was to run gRPC UI and created and activated my hundred of devices using selenium kkkkk but i know it is not the right way, please someone help me.

@Gui20 , If you are not familiar with grpc, you can enable the rest api using the external service.

REST API: GitHub - chirpstack/chirpstack-rest-api: ChirpStack gRPC API to REST proxy.

1 Like

@douglaszuqueto Any idea how to compile the chirpstack-rest-api in Ubuntu (not Docker)?
I’m a bit confused.
Thanks a lot.

Building from source
To start the Docker Compose based development environment:

make devshell
Within this development shell, you can use one of the following commands (see also the included Makefile):

# Compile binary
make build

# Create distributable archives and packages.
make dist

# Create snapshot archives and packages.
make snapshot

# Re-generate API definitions (VERSION must be set to the ChirpStack version)
VERSION=v4.0.0 make generate

i solved my problem amd maybe i can help you.
you just need to follow these steps:

  1. git clone the rest-api repository
sudo apt update

sudo apt upgrade

sudo apt install golang-go

check if it worked: 

go version

sudo apt install goreleaser
cd chirpstack-rest-api 
make build
make dist
cd build

./chirpstack-rest-api --server localhost:8080 --bind --insecure

And finally your API go to the adress and works fine!