I hope some of you will spend a few words helping me out in the right direction here
What I want to achieve is this: I want to create a “LoRa → Modbus TCP bridge”.
Example: An industrial building consists of a PLC that controls ventilation, lighting +++ Now the customer wants to use LoRa sensors like CO2, temp and humidity sensors all around their building (100+ sensors). They do NOT want to use a cloud service for this purpose. Instead they want to integrate the sensors to the PLC over modbus TCP in order to survey and control the building with their own SCADA system thats already in place.
The solution needs to be agnostic, meaning that we should be able to use every sensors and gateways on the market (that is supported of course).
This project is something that I would like to solve for the customer.
So what I will need in this case is:
- A PC/server (maybe rPI) that has Chripstack installed. (I guess would be the best solution using chirpstack?)
- Some kind of interface that can convert the incoming values from the sensors and place them to a modbus TCP registers.
I am not familiar with the chirpstack interface so I’m not quite sure what’s possible or not. I’m therefore aksing for help to get me started. And starting at the right place.
I am familiar with python code, Maybe I could create an application that takes care of this convertion using python?
The interface on the server should be intuituve and simple.
Like an overview over all sensors and their values. Imagine:
Column1 = Sensor name
Coulum2 = Sensor ID
Column3 = Value type (temp, hum, gas etc…)
Column4 = Displayed value
Column5 = Modbus register ( Here you can assign the modbus address )
What should i look into going forward? Appreciate any help
Ok there several parts to this one.
Fist off I would go for a Gateway witch supports Local Chirpstack.
Milesight UG65/UG56 gateways runs V3 of chirpstack and Node-RED (flow based low code)
Node-RED has Modbus TCP support this will allow you to send sensor data.
The UG65/UG56 support LoRaWAN payload decoders or you can write your own in Node-RED.
This will allow you to extract the relevant sensor readings and then write to Modbus Registers.
Also it will allow you to deal with endians swaps if needed by the SCADA system.
BTW you can send Modbus commands back to LoRaWAN class C actuators.
Hope that points you in the right direction.
What region of the world are you in?
Thanks for reply. I really appreciate that.
I live in Norway.
Using the GW from milesight is a good approach. In this case the NS will be placed locally on the GW.
I’m not sure if this is the route I want to go. But maybe?
What I’m picturing is that the gateways will vary on custumer by customer case. What I will solve for the customer is a unit with the Network server installed(like Chirpstack) on a small PC/rPI. This NS will be the link between the different gateways/sensors and the customers SCADA.
In this rPI there should be an interface for adding LoRa GW/Sensors and where to put them in the modbus register.
So i guess I’m asking, what backend/frontend software should I use to make this application on the rPI.
Again, this application will be intefacing the Chirpstack extracting sensor data, and writing to a modbus register.
I am familiar with Python so maybe this could be a feasible route?
I’ve been running full stack on Gateway for over five years initially on Multitech Gateways but they lack processing power. Use cases both industrial and building automation. The other thing the MS gateway supports is BACnet a building automation protocol.
I’ve run CS and application on both bog standard and industrial RPI so more than feasible.
Given your environment would recommend https://revolutionpi.com/