Skip to main content

Step 3: Start listening to the advices (MQTT)

Activate Your Site

Once a site has been created, and measurements and transactions are being sent (via MQTT or HTTP), you must ensure that there are no validation errors. Once validated, the site can be activated for optimization.

To activate your site, update its configuration as follows:

curl -X POST "https://api.pleevi.ai/v1/sites/<SITE_ID>/activate" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"

Subscribing to MQTT topics

The optimized charging schedules will be send via MQTT. So setup a MQTT client that listens to the dedicated MQTT topic. We currently only support advices to be received via MQTT or fetched by REST API

info

You can find the MQTT topics on the payload of the Site. View API Docs.

Subscribe to MQTT topic

Every 15 minutes the optimized charging schema's are send via MQTT. The only thing you need to do is rely on an MQTT client for your language of choice and subscribe to the dedicated topic of that site.

info

It's also possible to retrieve the latest optimisations via API. For this please refer to our API docs: View API Docs

Here is an example of the messages you'll be receiving in this case:

{
"assetId": "CHARGING_STATION_34",
"timestamp": "2023-02-23T09: 59: 06+00: 00",
"adviceId": "advice_2023-02-23T10:00:00+00:00",
"status": "OptimizationFound",
"profile": [
{
"timestamp": "2023-02-23T10: 00: 00+00: 00",
"powerValue": 5644
},
{
"timestamp": "2023-02-23T10:15:00+00:00",
"powerValue": 5644
},
{
"timestamp": "2023-02-23T10: 30: 00+00:00",
"powerValue": 5644
},
{
"timestamp": "2023-02-23T10:45:00+00:00",
"powerValue": 5644
},
{
"timestamp": "2023-02-23T11:00:00+00:00",
"powerValue": 0
},
{
"timestamp": "2023-02-23T11:15:00+00:00",
"powerValue": 0
},
{
"timestamp": "2023-02-23T11:30:00+00:00",
"powerValue": 3500
},
{
"timestamp": "2023-02-23T11:45:00+00:00",
"powerValue": 3500
}
...
]
}

Done!

Congratulations! Your charging station is now being optimized!

note

Take into account that it takes some time for our models to be fully optimized. Depending on your configuration we will be tracking the uncontrollable load and PV efficiency. Nonetheless, from the moment the configuration is done you should already see significant improvements.