Lora App Server deactivate device?

Is it possible to deactivate a device within the LoRa App Server UI?

Not through the UI (currently), but you can using the API:

hi @brocaar

this API Call deactivates a device, this works for me so far.
but when a device goes back into the join status and starts joining again, it can join and is “active” again.

is there a way to “pause” the device - so after “pausing” the device, even join requests will be ignored?

thanks and regards,

does anyone know about this topic? is there a real “pause” function? not only delete activation?

Were you looking to disable the device on the application server?

You can use grpc to update the is_disabled parameter

With this disabled the application also ignore the Join Request

Thank you for your answer @zul

i tried this, but somehow it does not work:

if __name__ == "__main__":
  # Connect without using TLS.
  channel = grpc.insecure_channel(server)

  # Device-queue API client.
  client = api.DeviceServiceStub(channel)

  # Define the API key meta-data.
  auth_token = [("authorization", "Bearer %s" % api_token)]
  # Construct request.
  req = api.UpdateDeviceRequest ()
  req.device.dev_eui = "HERE IS THE DEV_EUI"
  req.device.is_disabled = True
  req.device.device_profile_id = "HERE-IS-THE-DEVICE-PROFILE-ID"
  req.device.name = "F2"
  req.device.application_id = 11

  resp = client.Update(req, metadata=auth_token)

  # Print the downlink frame-counter value.

The response is emptry - so there is only printed a empty line.

When i then send a join request from the Device, it is still accepted. See the Image bellow:

Any idaes? Maybe one last thing - when i use the GetDeviceRequest to list this device, i see the following:

device {
  dev_eui: "DEV_EUI IS HERE"
  name: "F2"
  application_id: 11
  device_profile_id: "DEVICE_PROFILE IS HERE"
last_seen_at {
  seconds: 1635942528
  nanos: 286322000
device_status_battery: 78
device_status_margin: 7

The Device does not have a is_disabled True/False at the device section.

Any help is very appreciated. Thanks,

You can try getting the device, the disabling it like below:

        req = api.GetDeviceRequest()
        req.dev_eui = dev_eui
        resp = client.Get(req, metadata=auth_token)

        req = resp
        req.device.is_disabled = state
        resp = client.Update(req, metadata=auth_token)

thanks again, here the script:

  # Construct request.
  req = api.GetDeviceRequest ()
  req.dev_eui = dev_eui
  resp = client.Get(req, metadata=auth_token)

  req = resp
  req.device.is_disabled = True
  resp1 = client.Update(req, metadata=auth_token)

output is the same as before (for resp1) - so just a empty line.
and the device still accepts join requests…

i am on a older chirpstack version - Application Server is 3.6.1 while Network Server is 3.6.0.
Could it be related to this?

(i know, i need to update…)

I think so, I see that it is a feature that is added on version 3.11.0


Oh my god, I could have found this myself…
many thanks,