Neargrid MQTT Driver
The following integration can be used to send site measurements via MQTT, and receive commands for the different device types installed.
Python demo script
Contact Sofar to request a demo script.
The following integration can be used to send site measurements via MQTT, and receive commands for the different device types installed.
Contact Sofar to request a demo script.
The sites will be controlled via a Cloud Controller. Please contact Sofar to set up a new Cloud Controller
Once a Cloud Controller has been created, it will contain a unique serial number (<Controller SN>).
New sites can be generated on the Cloud Controller using unique site filters <site_filter>
These two variables must be used in the MQTT Topics and Body.
Using identical site filters will result in errors.
| Device Type | Supported |
|---|---|
| Solar Inverters | ✅ |
| Storage Devices | |
| Heatpumps | |
| Grid & Consumption Meters | |
| EV Chargers | ❌ |
The devices in a site cannot be edited after creation.
Sofar will supply MQTT credentials. The MQTT username must be entered when generating a new site.
The credentials must only be supplied once. One set of MQTT credentials can be used to control all sites.
To send measurements to the Sofar EMS, the following MQTT topic can be used for publishing: standard1/outbound/neargrid_meas/<site_filter>/<Controller SN>/
Optional fields are mentioned in italics.
The following fields can be sent per device type:
Storage
Solar
Heat Pumps
Meters
The message must be structured as follows:
{
"time": "<Unix Timestamp>",
"data": {
"state": {
"grid": {
"active_power_W": <Grid Active Power in Watts>,
"today_imported_energy_Wh": <Grid Imported Energy in Watt-hours>
When a measurement has been successfully received, an acknowledgement will be sent on the following topic: standard1/rp_one_s/neargrid_ack/<site_filter>/<Controller SN>
This acknowledgement can be used to:
To receive commands from the Sofar EMS, subscribe to the following MQTT topic: standard1/outbound/neargrid_cmd/<site_filter>/<Controller SN>/
The response is structured as follows:
{
"extraTags": {
"nodeId": "<Controller SN>_site_0"
},
"time": "<Unix Timestamp>",
"fields": {
"solar_policy": "<policy>",
"solar_power_setpoint_w": 5000,
"storage_policy": "<policy>",
"storage_power_setpoint_w": -5000
}
}The list of policies than can be received is found here: