MQTT Integration to send events to remote MQTT Server


Maybe a simple question. I’m using a MQTT instanz with running INfluxDB and Grafana to show some measurements from some ESP32 and Raspis via WLAN… No i would like to see the events comming via LoRa on the same machine transmitted via MQTT.

Can i simple change the mqtt config inside " chirpstack-application-server.toml" to direct to my Grafana-MQTT instanz.? Without breaking everthing in chirpstack, because i’ve read that chirpstack is using MQTT for internal connections…

Thanks in advance…


depends what you are “redirecting”. Please refer to the architecture.
The application-server already supports an Influxdb integration, I think the new version even supports v2.
I dont know how your Grafana+MQTT Combo looks like, and if it’s decoding the payload for you and if it can work with application-server Up-Events.

If you are thinking of redirecting/forwarding the gateway traffic there, I’m sorry to disappoint you, but that will not work. You need something like a network-server/app-server or something holding the keys for the communication with the node.

Technically you are correct with “they are coming over LoRa”, but the messages and everything else follows the LoraWAN spec. Which is more like a “protocol” on top of LoRa. So what you are looking for is to integrate after all the LoRaWAN stuff has happen, which is when the app-server publishes to an mqtt broker/integration. That can be a totally different broker as the one used for the gateway-bridge/network-server. It’s just another integration the app-server provides. The communication between app-server and network-server is over gRPC.

My MQTT+Influx+Grafana System is completely independent from the system. It is running on it’s own virt. machine.
The Chirpstack machine is another virt. machine and on the “builtin” MQTT i can see with a MQTT client the application messages and see my sensor data. But i need that data on the MQTT instance on the “grafana… system.” Thats my question. Can i change the MQTT server address in chirpstack-application-server.toml from localhost to the DNS name of my “grafana” system…And will i receive only the application messages and nothing else from the inner system of ChirpStack…?

Yes you can. You will get all the EVENTS that way. Depending which marshaler you are using, you might need to just parse json and subscribe to the right application topic. You can also send downlinks that way too, and the app-server will schedule them.

Very good. Take a look @ my screenshot. The next i’ve to learn, how i can switch contacts via LoRa… Is it that what you mean with downlinks…??

Yes. I’m waiting on Lora Relay 30A Module| Makerfabs for more or less the same use-case.
You can use the mqtt plug-in (websockets) or the http-plug in, you might need to configure CORS on the Chirpstack-side (HTTP) to be able to use a “Button” from the grafana-ui to chirpstack. If it’s over MQTT you just need websockets support from your broker. You then schedule a downlink and with the next uplink (Class A Devices) the device will get your payload and do what you/the sensors is programmed to do.