User Tools

Site Tools


custom_dashboards:inverters

Multiple Inverters Dashboard

Represented below is a sample Dashboard for multiple inverters, not necessarily of the same make, which features several elements - the top-bar buttons that display the live, daily and total generation for the site along with the financial savings; a bar graph for solar generation in kWh; select live inverter parameters for both inverters; a bar graph plotting the AC Power production from each inverter.

The following is the code for the Multiple Inverters Dashboard as represented above, which can be uploaded to your EMS account. This dashboard can be used as is for two inverters, but is also easily modifiable for more inverters 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 (in the inverter data widget), it will require some adjustment for one particular value, as is explained below the code.

inverters-dashboard.json
[
    {
        "widget_type_id": "57",
        "width": "12",
        "icon": "none",
        "title": "Information",
        "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": "white-space:nowrap;overflow:hidden;",
            "custom_html": "<div style='margin:0 auto;width:100px;display:table'><h1 style='font-size:50px;font-weight:semibold'>{{user_device.description}}<\/h1>\n<\/div>",
            "has_panel": "1"
        }
    },
    {
        "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": "12",
        "parameters": []
    },
 
    {
        "widget_type_id": "54",
        "width": "12",
        "icon": "none",
        "title": "Date Range",
        "status": "1",
        "widget_order": "2",
        "access_level": "0",
        "show_border": "0",
        "show_title": "0",
        "widget_name": "DateRange",
        "widget_description": "",
        "content": "widget_daterange",
        "company_id": "0",
        "has_controller": "1",
        "userwidth": "8",
        "parameters": {
            "counter": "86",
            "counter2": "86",
            "show_day_buttons": "1",
            "show_month_buttons": "1"
        }
    },
    {
        "widget_type_id": "59",
        "width": "12",
        "icon": "none",
        "title": "Buttons",
        "status": "1",
        "widget_order": "3",
        "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\":3,\"title\":\"Power\",\"icon\":\"fa-flash\",\"subtitle\":\"Live Power Now\",\"varname\":\"\",\"text\":\"VALUE('inverter1_AC_Active_Power')\/1000+VALUE('inverter2_AC_Active_Power')\/1000\",\"variable_id\":0,\"func\":0,\"scale\":1,\"unit\":\"kW\"}",
            "variable1": "{\"vartype\":2,\"bgcolor\":\"#FFFFFF\",\"varcolor\":\"#73879c\",\"format\":2,\"title\":\"Solar Generation\",\"icon\":\"fa-certificate\",\"subtitle\":\"Solar Generation (kWh) Today\",\"varname\":\"\",\"text\":\"DIFF('inverter1_kWh_Total_Active',5)+DIFF('inverter2_kWh_Total_Active',5)\",\"variable_id\":0,\"func\":7,\"scale\":1,\"unit\":\"kWh\"}",
            "variable2": "{\"vartype\":2,\"bgcolor\":\"#FFFFFF\",\"varcolor\":\"#73879c\",\"format\":3,\"title\":\"Lifetime\",\"icon\":\"fa-cubes\",\"subtitle\":\"Lifetime generation\",\"varname\":\"\",\"text\":\"VALUE('inverter1_kWh_Total_Active')+VALUE('inverter2_kWh_Total_Active')\",\"variable_id\":0,\"func\":0,\"scale\":0.001,\"unit\":\"MWh\"}",
            "variable3": "{\"vartype\":2,\"bgcolor\":\"#FFFFFF\",\"varcolor\":\"#73879c\",\"format\":1,\"title\":\"Total Saving\",\"icon\":\"fa-money\",\"subtitle\":\"Money saved in INR\",\"varname\":\"\",\"text\":\"(VALUE('inverter1_kWh_Total_Active')+VALUE('inverter2_kWh_Total_Active'))*VALUE('user_field1')\",\"variable_id\":0,\"func\":0,\"scale\":1,\"unit\":\"INR\"}"
        }
    },
    {
        "widget_type_id": "55",
        "width": "12",
        "icon": "none",
        "title": "SOLAR GENERATION",
        "status": "1",
        "widget_order": "4",
        "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": "0",
            "has_panel": "1",
            "height": "0",
            "interval": "0",
            "num_variables": "1",
            "opacity": "0.2",
            "period": "0",
            "variable0": "{\"vartype\":2,\"varcolor\":\"#FFBB00\",\"title\":\"FOR SELECTED PERIOD\",\"varname\":\"\",\"text\":\"DIFF('inverter1_kWh_Total_Active',5)+DIFF('inverter2_kWh_Total_Active',5)\",\"variable_id\":0,\"type\":0,\"func\":2,\"scale\":1,\"maxval\":0,\"minval\":0,\"unit\":\"kWh\"}",
            "zero_offset": "1"
        }
    },
    {
        "widget_type_id": "57",
        "width": "12",
        "icon": "none",
        "title": "Inverter Status",
        "status": "1",
        "widget_order": "5",
        "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 1 Data<\/h2>\n<table class='table table-striped'>\n<tr><td>Total kWh<\/td><td>{{ajaxData.latest_data['inverter1_kWh_Total_Active']}} kWh<\/td><\/tr>\n<tr><td>Power (AC)<\/td><td>{{ajaxData.latest_data['inverter1_AC_Active_Power']\/1000|number:1}} kW<\/td><\/tr>\n<tr><td>Power (DC)<\/td><td>{{ajaxData.latest_data['inverter1_DC_Active_Power']\/1000|number:1}} kW<\/td><\/tr>\n<tr><td>Voltage Phase 1<\/td><td>{{ajaxData.latest_data['inverter1_AC_Voltage_AN']|number:1}} V<\/td><\/tr>\n<tr><td>Voltage Phase 2<\/td><td>{{ajaxData.latest_data['inverter1_AC_Voltage_BN']|number:1}} V<\/td><\/tr>\n<tr><td>Voltage Phase 3<\/td><td>{{ajaxData.latest_data['inverter1_AC_Voltage_CN']|number:1}} V<\/td><\/tr>\n<tr><td>Frequency<\/td><td>{{ajaxData.latest_data['inverter1_AC_Frequency_A']|number:1}} Hz<\/td><\/tr>\n<tr><td>Array 1 DC Voltage<\/td><td>{{ajaxData.latest_data['inverter1_DC_Voltage_1']|number:1}} V<\/td><\/tr>\n<tr><td>Array 2 DC Voltage<\/td><td>{{ajaxData.latest_data['inverter1_DC_Voltage_2']|number:1}} V<\/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>{{ajaxData.latest_data['inverter1_Status_Code']}}\n<\/td><\/tr>\n<\/table>\n\n",
            "has_panel": "1"
        }
    },
    {
        "widget_type_id": "55",
        "width": "12",
        "icon": "none",
        "title": "SOLAR GENERATION BY INDIVIDUAL INVERTER",
        "status": "1",
        "widget_order": "6",
        "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": "30",
            "num_variables": "2",
            "opacity": "0.2",
            "period": "0",
            "variable0": "{\"vartype\":1,\"varcolor\":\"#41C400\",\"title\":\"Inverter 1\",\"varname\":\"inverter1_AC_Active_Power\",\"text\":\"\",\"variable_id\":0,\"type\":0,\"func\":0,\"maxval\":0,\"minval\":0,\"scale\":0.001,\"unit\":\"kW\"}",
            "variable1": "{\"vartype\":1,\"varcolor\":\"#006CBF\",\"title\":\"Inverter 2\",\"varname\":\"inverter2_AC_Active_Power\",\"text\":\"\",\"variable_id\":0,\"type\":0,\"func\":0,\"maxval\":0,\"minval\":0,\"scale\":0.001,\"unit\":\"kW\"}",
            "zero_offset": "1"
        }
    },
    {
        "widget_type_id": "57",
        "width": "12",
        "icon": "none",
        "title": "Inverter 2 Data",
        "status": "1",
        "widget_order": "6",
        "access_level": "0",
        "show_border": "1",
        "show_title": "1",
        "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 2 Data<\/h2><table class='table table-striped'>\n<tr><td>Total kWh<\/td><td>{{ajaxData.latest_data['inverter2_kWh_Total_Active']}} kWh<\/td><\/tr>\n<tr><td>Power (AC)<\/td><td>{{ajaxData.latest_data['inverter2_AC_Active_Power']\/1000|number:1}} kW<\/td><\/tr>\n<tr><td>Power (DC)<\/td><td>{{ajaxData.latest_data['inverter2_DC_Active_Power']\/1000|number:1}} kW<\/td><\/tr>\n<tr><td>Array 1 DC Voltage<\/td><td>{{ajaxData.latest_data['inverter2_DC_Voltage_1']|number:1}} V<\/td><\/tr>\n<tr><td>Array 2 DC Voltage<\/td><td>{{ajaxData.latest_data['inverter2_DC_Voltage_1']|number:1}} V<\/td><\/tr>\n<tr><td>Status Code<\/td><td><span ng-show=\"ajaxData.latest_data['inverter2_Status_Code']==2\" class='label label-success'>Operating Normally<\/span>\n<span ng-show=\"ajaxData.latest_data['inverter2_Status_Code']==4\" class='label label-danger'>Error<\/span>\n<span ng-show=\"ajaxData.latest_data['inverter2_Status_Code']==1\">Starting<\/span>\n<\/td><\/tr>\n<\/table>",
            "has_panel": "1"
        }
    }
]

In the sample code above, the Inverter Data widgets feature custom 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>
custom_dashboards/inverters.txt · Last modified: 2019/08/14 06:49 by ruchir