Single Inverter Dashboard

Represented below is a sample Dashboard for a single inverter, which features several elements - the top-bar buttons that display the live, daily, monthly and total generation for the site; a line graph for solar generation in kWh; select live inverter parameters; a bar graph plotting the AC Power against the DC Power; and a bar graph displaying the generation for each day in the last week.

The following is the code for the Single Inverter Dashboard as represented above, which can be uploaded to your EMS account. This dashboard can be used as is for a single inverter, but is also easily modifiable once it has been loaded onto the EMS, as has been explained in the Dashboard Designer section. However, since it does feature some custom HTML, it will require some adjustment for one particular value, as is explained below the code.

inverter-dashboard.json
[
    {
        "widget_type_id": "57",
        "width": "12",
        "icon": "none",
        "title": "Site Name",
        "status": "1",
        "widget_order": "-1",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "Custom HTML",
        "widget_description": "Add Custom HTML Code",
        "content": "custom_html",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "12",
        "parameters": {
            "css_style": "",
            "custom_html": "<h1>{{user_device.description}}<\/h1> <h3> Plant Size: {{ajaxData.device_variables[2].value}} Inverters: {{ajaxData.device_variables[1].value}} <\/h3> RMS installed on {{ajaxData.device_variables[0].value}}",
            "has_panel": "0"
        }
    },
    {
        "widget_type_id": "60",
        "width": "6",
        "icon": "none",
        "title": "Last Update",
        "status": "1",
        "widget_order": "0",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "Last Update",
        "widget_description": "Display the latest updated time for a device",
        "content": "widget_lastupdate",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "6",
        "parameters": []
    },
    {
        "widget_type_id": "54",
        "width": "12",
        "icon": "none",
        "title": "Date Range",
        "status": "1",
        "widget_order": "1",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "DateRange",
        "widget_description": "",
        "content": "widget_daterange",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "6",
        "parameters": {
            "counter": "2273",
            "counter2": "2273",
            "show_day_buttons": "1",
            "show_month_buttons": "0"
        }
    },
    {
        "widget_type_id": "59",
        "width": "12",
        "icon": "none",
        "title": "Buttons",
        "status": "1",
        "widget_order": "2",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "Topbar Buttons",
        "widget_description": "Buttons with Icons and Variable Values",
        "content": "topbar_buttons",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "12",
        "parameters": {
            "num_variables": "4",
            "variable0": "{\"vartype\":2,\"bgcolor\":\"#FFFFFF\",\"varcolor\":\"#73879c\",\"format\":2,\"title\":\"Live\",\"icon\":\"fa-flash\",\"subtitle\":\"Live Solar Generation\",\"varname\":\"\",\"text\":\"MAX('inverter1_AC_Active_Power')\",\"variable_id\":0,\"func\":0,\"scale\":0.001,\"ignore_neg\":1,\"unit\":\"kW\"}",
            "variable1": "{\"vartype\":2,\"bgcolor\":\"#FFFFFF\",\"varcolor\":\"#73879c\",\"format\":3,\"title\":\"Daily\",\"icon\":\"fa-cubes\",\"subtitle\":\"Today's Solar Generation\",\"varname\":\"\",\"text\":\"DIFF('inverter1_kWh_Day_Active',5)\",\"variable_id\":0,\"func\":7,\"scale\":1,\"ignore_neg\":1,\"unit\":\"kWh\"}",
            "variable2": "{\"vartype\":2,\"bgcolor\":\"#FFFFFF\",\"varcolor\":\"#73879c\",\"format\":3,\"title\":\"Monthly\",\"icon\":\"fa-cubes\",\"subtitle\":\"Monthly Solar Generation\",\"varname\":\"\",\"text\":\"DIFF('inverter1_kWh_Total_Active',3)\",\"variable_id\":0,\"func\":7,\"scale\":1,\"ignore_neg\":1,\"unit\":\"kWh\"}",
            "variable3": "{\"vartype\":1,\"bgcolor\":\"#FFFFFF\",\"varcolor\":\"#73879c\",\"format\":3,\"title\":\"Lifetime\",\"icon\":\"fa-certificate\",\"subtitle\":\"Total Solar Generation\",\"varname\":\"inverter1_kWh_Total_Active\",\"text\":\"VALUE('inverter1_kWh_Total_Active')\",\"variable_id\":0,\"func\":7,\"scale\":1,\"ignore_neg\":1,\"unit\":\"kWh\"}"
        }
    },
    {
        "widget_type_id": "55",
        "width": "12",
        "icon": "none",
        "title": "Solar Generation",
        "status": "1",
        "widget_order": "3",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "Graph",
        "widget_description": "Graph View of Variables",
        "content": "widget_graph",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "12",
        "parameters": {
            "graph_type": "4",
            "has_panel": "1",
            "height": "0",
            "interval": "30",
            "num_variables": "1",
            "opacity": "0.2",
            "period": "0",
            "variable0": "{\"vartype\":2,\"varcolor\":\"#EBD831\",\"title\":\"Inverter 1\",\"varname\":\"\",\"text\":\"DIFF('inverter1_kWh_Total_Active',5)\",\"variable_id\":0,\"type\":0,\"func\":0,\"scale\":1,\"maxval\":500,\"minval\":0,\"unit\":\"kWh\"}",
            "zero_offset": "1"
        }
    },
    {
        "widget_type_id": "57",
        "width": "12",
        "icon": "none",
        "title": "Inverter Data",
        "status": "1",
        "widget_order": "4",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "Custom HTML",
        "widget_description": "Add Custom HTML Code",
        "content": "custom_html",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "6",
        "parameters": {
            "css_style": "",
            "custom_html": "<h2>Inverter Data<\/h2>\n<table class='table table-striped'>\n<tr><td>Total kWh<\/td><td><strong>{{ajaxData.latest_data['inverter1_kWh_Total_Active']}} kWh<\/strong><\/td><\/tr>\n<tr><td>Daily kWh<\/td><td>{{ajaxData.latest_data['inverter1_kWh_Day_Active']}} kWh<\/td><\/tr>\n<tr><td>AC Active Power<\/td><td>{{ajaxData.latest_data['inverter1_AC_Active_Power']|number:1}} W<\/td><\/tr>\n<tr><td>AC Voltage Phase AN<\/td><td>{{ajaxData.latest_data['inverter1_AC_Voltage_AN']|number:1}} V<\/td><\/tr>\n<tr><td>AC Voltage Phase BN<\/td><td>{{ajaxData.latest_data['inverter1_AC_Voltage_BN']|number:1}} V<\/td><\/tr>\n<tr><td>AC Voltage Phase CN<\/td><td>{{ajaxData.latest_data['inverter1_AC_Voltage_CN']|number:1}} V<\/td><\/tr>\n<tr><td>AC Current Phase A<\/td><td>{{ajaxData.latest_data['inverter1_AC_Current_A']|number:1}} A<\/td><\/tr>\n<tr><td>AC Current Phase B<\/td><td>{{ajaxData.latest_data['inverter1_AC_Current_B']|number:1}} A<\/td><\/tr>\n<tr><td>AC Current Phase C<\/td><td>{{ajaxData.latest_data['inverter1_AC_Current_C']|number:1}} A<\/td><\/tr>\n<tr><td>AC Frequency<\/td><td>{{ajaxData.latest_data['inverter1_AC_Frequency']|number:1}} Hz<\/td><\/tr>\n<tr><td>DC Voltage 1 <\/td><td>{{ajaxData.latest_data['inverter1_DC_Voltage_1']|number:1}} V<\/td><\/tr>\n<tr><td>DC Voltage 2<\/td><td>{{ajaxData.latest_data['inverter1_DC_Voltage_2']|number:1}} V<\/td><\/tr>\n<tr><td>DC Voltage 3<\/td><td>{{ajaxData.latest_data['inverter1_DC_Voltage_3']|number:1}} V<\/td><\/tr>\n<tr><td>DC Current 1 <\/td><td>{{ajaxData.latest_data['inverter1_DC_Current_1']|number:1}} A<\/td><\/tr>\n<tr><td>DC Current 2<\/td><td>{{ajaxData.latest_data['inverter1_DC_Current_2']|number:1}} A<\/td><\/tr>\n<tr><td>DC Current 3<\/td><td>{{ajaxData.latest_data['inverter1_DC_Current_3']|number:1}} A<\/td><\/tr>\n<tr><td>Status Code<\/td><td><span ng-show=\"ajaxData.latest_data['inverter1_Status_Code']==2\" class='label label-success'>Operating Normally<\/span>\n<span ng-show=\"ajaxData.latest_data['inverter1_Status_Code']==4\" class='label label-danger'>Error<\/span>\n<span ng-show=\"ajaxData.latest_data['inverter1_Status_Code']==1\">Starting<\/span>\n<\/td><\/tr>\n<\/table>",
            "has_panel": "1"
        }
    },
    {
        "widget_type_id": "55",
        "width": "12",
        "icon": "none",
        "title": "Inverter Power",
        "status": "1",
        "widget_order": "5",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "Graph",
        "widget_description": "Graph View of Variables",
        "content": "widget_graph",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "6",
        "parameters": {
            "graph_type": "2",
            "has_panel": "1",
            "height": "0",
            "interval": "20",
            "num_variables": "2",
            "opacity": "0.2",
            "period": "0",
            "variable0": "{\"vartype\":2,\"varcolor\":\"#EBD831\",\"title\":\"AC Power\",\"varname\":\"\",\"text\":\"MAX('inverter1_AC_Active_Power')\",\"variable_id\":0,\"type\":0,\"func\":4,\"scale\":0.001,\"maxval\":100,\"minval\":0,\"unit\":\"kW\"}",
            "variable1": "{\"vartype\":2,\"varcolor\":\"#47372D\",\"title\":\"DC Power\",\"varname\":\"\",\"text\":\"MAX('inverter1_DC_Power_1')+MAX('inverter1_DC_Power_2')+MAX('inverter1_DC_Power_3')\",\"variable_id\":0,\"type\":0,\"func\":4,\"scale\":0.001,\"maxval\":100,\"minval\":0,\"unit\":\"kW\"}",
            "zero_offset": "1"
        }
    },
    {
        "widget_type_id": "55",
        "width": "12",
        "icon": "none",
        "title": "Weekly Solar Generation",
        "status": "1",
        "widget_order": "10",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "Graph",
        "widget_description": "Graph View of Variables",
        "content": "widget_graph",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "12",
        "parameters": {
            "graph_type": "2",
            "has_panel": "1",
            "height": "0",
            "interval": "0",
            "num_variables": "1",
            "opacity": "0.2",
            "period": "3",
            "variable0": "{\"vartype\":2,\"varcolor\":\"#FABF73\",\"title\":\"Solar Generation\",\"varname\":\"\",\"text\":\"DIFF('inverter1_kWh_Total_Active',5)+DIFF('inverter2_kWh_Total_Active',5)+DIFF('inverter3_kWh_Total_Active',5)\",\"variable_id\":0,\"type\":0,\"func\":2,\"scale\":1,\"maxval\":1000,\"minval\":-1000,\"unit\":\"kWh\"}",
            "zero_offset": "1"
        }
    }
]

In the sample code above, the Inverter Data widget features HTML, which allows for the scaling of values, adding units, and in the case of the Status Codes, converting a numeric value to an actual status symbol. While all the other values will work across all inverter brands, the Status Code values differ between models, and therefore will need to be adjusted based on the details shared by the manufacturer.

The Status Codes above are currently set to match that of the Delta RPI inverter. To be made compatible with a different inverter, you will need to modify the status code as per the inverter manual and enter those in lieu of the 0 below :

<tr><td>Status Code</td><td><span ng-show="ajaxData.latest_data['inverter1_Status_Code']==0" class='label label-success'>Operating Normally</span>
<span ng-show="ajaxData.latest_data['inverter1_Status_Code']==0" class='label label-danger'>Error</span>
<span ng-show="ajaxData.latest_data['inverter1_Status_Code']==0">Starting</span>
</td></tr>