summaryrefslogtreecommitdiffstats
path: root/node.d
diff options
context:
space:
mode:
authorBrainDoctor <github.account@chrigel.net>2017-07-12 12:12:50 +0200
committerBrainDoctor <github.account@chrigel.net>2017-07-12 12:12:50 +0200
commit40f612e796e27120dc324e8c8a5d2f4e681c8d50 (patch)
treeeee783de1ca96744b80936f9eced4b0ed05ed4c1 /node.d
parentd7893c24276e0fc02058e504743510f86078df8e (diff)
parentcb326dff0245688d19a07999d318067bace47ef8 (diff)
Merge branch 'master' of git://github.com/firehol/netdata into stiebeleltron
Diffstat (limited to 'node.d')
-rw-r--r--node.d/README.md63
-rw-r--r--node.d/fronius.node.js21
2 files changed, 71 insertions, 13 deletions
diff --git a/node.d/README.md b/node.d/README.md
index e69de29bb2..3c29779054 100644
--- a/node.d/README.md
+++ b/node.d/README.md
@@ -0,0 +1,63 @@
+# Disclaimer
+
+Module configurations are written in JSON and **node.js is required**.
+
+to be edited.
+
+---
+
+The following node.d modules are supported:
+
+# fronius
+
+This module collects metrics from the configured solar power installation from Fronius Symo.
+See `netdata/conf.d/node.d/fronius.conf.md` for more details.
+
+**Requirements**
+ * Configuration file `fronius.conf` in the node.d netdata config dir (default: `/etc/netdata/node.d/fronius.conf`)
+ * Fronius Symo with network access (http)
+
+It produces per server:
+
+1. **Power**
+ * Current power input from the grid (positive values), output to the grid (negative values), in W
+ * Current power input from the solar panels, in W
+ * Current power stored in the accumulator (if present), in W (in theory, untested)
+
+2. **Consumption**
+ * Local consumption in W
+
+3. **Autonomy**
+ * Relative autonomy in %. 100 % autonomy means that the solar panels are delivering more power than it is needed by local consumption.
+ * Relative self consumption in %. The lower the better
+
+4. **Energy**
+ * The energy produced during the current day, in kWh
+ * The energy produced during the current year, in kWh
+
+5. **Inverter**
+ * The current power output from the connected inverters, in W, one dimension per inverter. At least one is always present.
+
+
+### configuration
+
+Sample:
+
+```json
+{
+ "enable_autodetect": false,
+ "update_every": 5,
+ "servers": [
+ {
+ "name": "Symo",
+ "hostname": "symo.ip.or.dns",
+ "update_every": 5,
+ "api_path": "/solar_api/v1/GetPowerFlowRealtimeData.fcgi"
+ }
+ ]
+}
+```
+
+If no configuration is given, the module will be disabled. Each `update_every` is optional, the default is `5`.
+
+---
diff --git a/node.d/fronius.node.js b/node.d/fronius.node.js
index eb7fd1b7c9..f771f6c3d0 100644
--- a/node.d/fronius.node.js
+++ b/node.d/fronius.node.js
@@ -53,7 +53,7 @@ var fronius = {
name: '', // the unique name of the chart
title: service.name + ' Current Site Power', // the title of the chart
units: 'W', // the units of the chart dimensions
- family: 'Power', // the family of the chart
+ family: 'power', // the family of the chart
context: 'fronius.power', // the context of the chart
type: netdata.chartTypes.area, // the type of the chart
priority: fronius.base_priority + 1, // the priority relative to others in the same family
@@ -78,7 +78,7 @@ var fronius = {
name: '', // the unique name of the chart
title: service.name + ' Current Load', // the title of the chart
units: 'W', // the units of the chart dimensions
- family: 'Consumption', // the family of the chart
+ family: 'consumption', // the family of the chart
context: 'fronius.consumption', // the context of the chart
type: netdata.chartTypes.area, // the type of the chart
priority: fronius.base_priority + 2, // the priority relative to others in the same family
@@ -104,7 +104,7 @@ var fronius = {
name: '', // the unique name of the chart
title: service.name + ' Current Autonomy', // the title of the chart
units: '%', // the units of the chart dimensions
- family: 'Autonomy', // the family of the chart
+ family: 'autonomy', // the family of the chart
context: 'fronius.autonomy', // the context of the chart
type: netdata.chartTypes.area, // the type of the chart
priority: fronius.base_priority + 3, // the priority relative to others in the same family
@@ -128,7 +128,7 @@ var fronius = {
name: '', // the unique name of the chart
title: service.name + ' Energy production for today', // the title of the chart
units: 'kWh', // the units of the chart dimensions
- family: 'Energy', // the family of the chart
+ family: 'energy', // the family of the chart
context: 'fronius.energy.today', // the context of the chart
type: netdata.chartTypes.area, // the type of the chart
priority: fronius.base_priority + 4, // the priority relative to others in the same family
@@ -152,7 +152,7 @@ var fronius = {
name: '', // the unique name of the chart
title: service.name + ' Energy production for this year', // the title of the chart
units: 'kWh', // the units of the chart dimensions
- family: 'Energy', // the family of the chart
+ family: 'energy', // the family of the chart
context: 'fronius.energy.year', // the context of the chart
type: netdata.chartTypes.area, // the type of the chart
priority: fronius.base_priority + 5, // the priority relative to others in the same family
@@ -191,7 +191,7 @@ var fronius = {
name: '', // the unique name of the chart
title: service.name + ' Current Inverter Output', // the title of the chart
units: 'W', // the units of the chart dimensions
- family: 'Inverters', // the family of the chart
+ family: 'inverters', // the family of the chart
context: 'fronius.inverter.output', // the context of the chart
type: netdata.chartTypes.stacked, // the type of the chart
priority: fronius.base_priority + 6, // the priority relative to others in the same family
@@ -222,12 +222,8 @@ var fronius = {
service.end();
// Site Consumption Chart
- var consumption = site.P_Load;
- if (consumption === null) consumption = 0;
- consumption *= -1;
-
service.begin(fronius.getSiteConsumptionChart(service, 'fronius_' + service.name + '.consumption'));
- service.set(fronius.consumptionLoadId, Math.round(consumption));
+ service.set(fronius.consumptionLoadId, Math.round(Math.abs(site.P_Load)));
service.end();
// Site Autonomy Chart
@@ -264,8 +260,7 @@ var fronius = {
if (fronius.isUndefined(json.Body)) return false;
if (fronius.isUndefined(json.Body.Data)) return false;
if (fronius.isUndefined(json.Body.Data.Site)) return false;
- if (fronius.isUndefined(json.Body.Data.Inverters)) return false;
- return true;
+ return fronius.isDefined(json.Body.Data.Inverters);
},
// module.serviceExecute()