> For the complete documentation index, see [llms.txt](https://docs.net2grid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.net2grid.com/net2grid-energy-ai-edge-on-ami2/applications/pv/output-messages.md).

# Output Messages

The application sends two types of messages: a heartbeat message used for monitoring and the solar production report which is sent only in premises with PV systems.

### Solar production report mesage

This message is sent every hour and contains 5-minute production estimates for the previous hour and 5-minute forecasting estimates for the next hour. The message payload is a json with the following fields:

```json
{
  "ts":1683813600,
  "tz":-240,
  "cl":"low",
  "prod":[1468,1399,1505,1571,1572,1584,1596,1643,1586,1594,1619,1617],
  "fc":[1521,1534,1542,1542,1543,1528,1521,1533,1529,1519,1533,1537]
}
```

where

* ts \[int]: The UTC timestamp labelling the first production value, i.e. the\
  start of the first 5-minute window.
* tz \[int]: The timezone offset from UTC (in minutes).
* cl \[string]: The consistency of logged 1-minute data for the previous 30 days (low, medium, and high)
* prod \[int array]: The solar production of the past hour. Array of 12 values, one for every 5-minute window, left-aligned. Element i (0-based) is labelled ts + 300i seconds and covers the interval \[ts + 300i, ts + 300(i+1)) seconds. Invalid or missing measurements are set as -1, the rest of the values are measured in Watts.
* fc \[int array]: The solar forecasting of the next hour. Array of 12 values, left-aligned, continuing directly after the last `prod` window. Element i is labelled ts + 3600 + 300i seconds and covers the interval \[ts + 3600 + 300i, ts + 3600 + 300(i+1)) seconds. Windows that cannot be forecasted are set as -1, the rest are measured in Watts.

### Heartbeat message

The application sends a regular message to the upstream system, in order to confirm that it is running and functioning correctly. The message format and a description of each field are presented below:

```json
{
    "ver": "2.1.0",
    "day": 12,
    "rc": 1,
    "tz": -480,
    "tid": 2,
    "dtz": false,
    "mc": 1000,
    "dd": 6,
    "vc": 4
}
```

where

* ver \[str]: The current application version.
* day \[int]: The number of days that the application has been running in total.
* rc \[int]: The number of restarts of the application.
* tz \[int]: The timezone offset from UTC (in minutes).
* tid\[int]: The timezone id, retrieved from the meter (-1 if not found).
* dtz\[bool]: True if the timezone is the default (GMT-8), false if it is read from the meter.
* mc \[int]: The number of power measurements for this day. Range \[0-1440].
* dd \[int]: The number of solar detection days in the past week used during training. Range \[0-7].
* vc \[int, optional]: The minimum number of values per minute used for the calculation of a typical solar profile used internally by the application. Range \[2-28]. Only included if dd >= 2.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.net2grid.com/net2grid-energy-ai-edge-on-ami2/applications/pv/output-messages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
