Device data / receive local to steer GPIOs


I have the Chirpstack (full os) running on RPI/iC880A and it is working good.

Now I would like to be able to control the local GPIO pins (thus on the RPi on which the Chirpstack is running) based on device data the Chirpstack receives. E.g. device data sending payload with information saying - turn GPIO x, y and z to “1”.

For this I guess integration of the Application Server with a local process is the best way forward. I am pretty sure others already investigated this and hope somebody can give me some suggestions.

Thanks in advance!

Is it possible to install RPi sw (like Python, influx etc) on the ChirpStack OS?

Yes, but it might require you to build your own image. E.g. this recipe defines what is included in the base image. This is a good starting point to learn more about Yocto and BitBake:

1 Like

Thanks Orne. I will read up on Yocto.

For the time being I am wondering what the best way forward is. Use the full Chirpstack OS and find ways to add additional software (eventually use Yocto)


Install the separate Chirpstack components and configure them individually onto a e.g. RPi OS. This later option makes it easier for me to install additional software (like the Chirpstack API).

Started to work to integrate gRPC thru Python to set up streaming device information

  1. Use the rpc StreamEventLogs(StreamDeviceEventLogsRequest)
  2. Can wildcards be used in order to stream all device events ?
  3. I have no Python experience and am desparately :roll_eyes: looking for ChirpStack gRPC examples. Can anybody share how to retrieve basic info from the application server?

Below my initial Python (token retrieved well and starting StreamEventLogs fails)

import grpc
import os
import sys
from chirpstack_api.as_pb.external import api
from chirpstack_api.as_pb.external.api import device_pb2
from chirpstack_api.as_pb.external.api import device_pb2_grpc
if __name__ == ‘__main__’:
  channel = grpc.insecure_channel(‘’)
  stub = api.InternalServiceStub(channel)

  loginRequest = api.LoginRequest()
  loginRequest.password = ‘admin’
  loginRequest.username = ‘admin’

  token = stub.Login(loginRequest)
  metadata= [(‘authorization’, token.jwt)]

  as_stub = device_pb2_grpc.DeviceServiceStub(channel)

Examples and hints to use gRPC with Python Chirpstack would be helpful to me and speed it up for me.

I plan to work on this topic again now. I am still looking for examples (see above).

When anybody of you have alternatives to be able to receive uplink messages from the LoRa node and steer GPIOs -> would be great!