[release] LoRa App Server v3.1

LoRa App Server v3.1.0

Features

Device variables and tags

Device variables and tags are user-defined key/value values that can be assigned to devices. Tags can be used to add additional meta-data to devices and variables can be used for configured integrations (e.g. ThingsBoard requires a per-device Access Token).

PostgreSQL integration

When configured in the lora-app-server.toml configuration file, this integration will write events into a PostgreSQL database. See the PostgreSQL Integration documentation for more information.

ThingsBoard integration

When configured as Application integration, this integration will write attributes and telemetry to the configured ThingsBoard instance. See the ThingsBoard Integration documentation for more information.

Improvements

  • Speedup login with default admin / admin credentials (for low CPU power devices). (#320)
  • Gateway ID, FPGA ID and AES-key widgets have been updated.
  • Always display Class-C timeout field in Device Profile.

Bugfixes

  • Fix Gen Application Key is no longer a mandatory field. (#322)
  • Fix create organization user. (#323)

Upgrading

Before upgrading, you must enable the hstore extension for the LoRa App Server PostgreSQL database. Example commands assuming the database is named loraserver_as:

sudo -u postgres psql

Within the PostgreSQL prompt, enter the following queries:

-- change to loraserver_as database and enable extension
\c loraserver_as
create extension hstore;

-- exit the prompt
\q
3 Likes

Hi @brocaar I just followed your instructions and since than I have lost connection with all gateways.
I only get:

Jul 08 12:16:27 shuttle-server loraserver[1733]: time=“2019-07-08T12:16:27+02:00” level=info msg=“finished unary call with code OK” grpc.code =OK grpc.method=GetGatewayStats grpc.service=ns.NetworkServerService grpc.start_time=“2019-07-08T12:16:27+02:00” grpc.time_ms=0.478 peer.addr ess=“127.0.0.1:50492” span.kind=server system=grpc

I have a gateway-bridge running on a VPS that points inwards to loraserver and I see all gateway data coming in on the MQTT server. so the data is coming in.

Any suggestions?

Could you define “lost connection with all gateways”, since you also mention “I see all gateway data coming in on the MQTT server”, so your gateways are still connected :wink:

Did you only update LoRa App Server, or also updated LoRa Server? Did you confirm that LoRa App Server is still running without any errors (your logs are from the loraserver process, you might want to look at the lora-app-server process too)?

Some aditional information that might answer your questions:

  1. Although I see gateway traffic on MQTT it does not appear in LoRaServer console (currently last seen for 3 hours) and there is no live data in console too.
  2. I updated both loraserver and lora-app-server
  3. I found that config files ware replaced by default after which I reconfigured mqtt credentials.
  4. In logging I see that MQTT is connecetd in both loraserver and lora-app-server

here is the lora-server log:

Jul 08 14:01:14 shuttle-server systemd[1]: Stopped LoRa App Server.
Jul 08 14:01:14 shuttle-server systemd[1]: Started LoRa App Server.
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“starting LoRa App Server” docs=“https://www.loraserver.io/” version=3.1.0-test.1
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“storage: setting up storage package”
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“storage: setting up Redis pool”
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“storage: connecting to PostgreSQL database”
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“storage: applying PostgreSQL data migrations”
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“storage: PostgreSQL data migrations applied” count=0
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“integration/mqtt: TLS config is empty”
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“integration/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“api/as: starting application-server api” bind=“localhost:8001” ca_cert= tls_cert= tls_key=
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“integration/mqtt: connected to mqtt broker”
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“integration/mqtt: subscribing to tx topic” qos=0 topic=application/+/device/+/tx
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“api/external: starting api server” bind=“0.0.0.0:8081” tls-cert=/etc/lora-app-server/certs/http.pem tls-key=/etc/lora-app-server/certs/http-key.pem
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“api/external: registering rest api handler and documentation endpoint” path=/api
Jul 08 14:01:14 shuttle-server lora-app-server[642]: time=“2019-07-08T14:01:14+02:00” level=info msg=“api/js: starting join-server api” bind=“0.0.0.0:8003” ca_cert= tls_cert= tls_key=

Thats all so far. Cu, Remko

Note that you have installed 3.1.0-test.1, I’m not sure if you are using the stable channel, I would recommend that :slight_smile:

Did you also update from v2 to v3? In that case, there has been a change in the MQTT topic configuration, see Upgrading from LoRa Server v2 to LoRa Server v3.

1 Like

After having updated all I am in the following situation:

  1. Loraserver and lora-app-server are connecting to MQTT successfuly, i see incoming connection.
  2. When accessing loraserver at: https://192.168.20.231:8081 (I cannot use 8080 here) I get: ASL_ERROR_RX_RECORD_TOO_LONG

Any help is welcome. Thanks in advance

That looks like a TLS mis-configuration: https://www.google.com/search?client=firefox-b-d&q=ASL_ERROR_RX_RECORD_TOO_LONG.

Yes, to me too. However I have not changed anything from the previous installation.
Can you provide directions on how to install cetrificates in the config file?
I generated certificate and key-file but cannot get it installed in the config file.

It is in this section of lora-app-server.toml (note that historically TLS was required, but this is no longer true).

  # Settings for the "external api"
  #
  # This is the API and web-interface exposed to the end-user.
  [application_server.external_api]
  # ip:port to bind the (user facing) http server to (web-interface and REST / gRPC api)
  bind="0.0.0.0:8080"

  # http server TLS certificate (optional)
  tls_cert=""

  # http server TLS key (optional)
  tls_key=""

Hi,

do you already have a timeline for publishing the docker container?

Thanks!

It was published ~4 days ago: https://hub.docker.com/r/loraserver/lora-app-server/tags

@brocaar Did lora-gateway-os released with latest version of Lora-XXXX releases ? release 3.x.x is not released with Gateway OS ?

Is there any plan to release the LoRa gateway OS with 3.x.x version release ?

Regards
Jayesh

Yes there is. It is not yet out as we also have been testing some Raspberry Pi 3B+ issues (some would not boot without HDMI connected). I believe this has been fixed now and I already updated the recipes at my side to issue a new release :slight_smile: Stay tuned!

I have a working 3.01 server running on a RPi. My Linux foo is not strong, so I am not clear on the steps to upgrading to 3.1 (beyond what was in the original post).

My attempts to upgrade from 2.8x to 3.0 were pitiful and I ended up just redoing from scratch.

Is there an idiot’s guide to upgrading somewhere?

Hi

Compiled windows binaries do not run. (Downloads). Windows gives the message: “lora-app-server.exe is not a win32 application”