Skip to content

Commit

Permalink
Updated generator Node
Browse files Browse the repository at this point in the history
Move the paths from the Energy Meter node to the generator node.
This node now supports all generators, making it more simple.
- com.victronenergy.(dc)genset -> used for generator data, like voltages, RPM, oil pressure etcetera.
- com.victronenergy.generator -> start/stop code in Venus OS. Can activate a relay, but also, in case of Fischer panda, a generator directly via D-Bus.
  • Loading branch information
dirkjanfaber committed Sep 11, 2024
1 parent 127944f commit dbcb7dc
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 18 deletions.
66 changes: 57 additions & 9 deletions src/nodes/config-client.html
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,7 @@ <h3>Details</h3>
<p>The <strong>input nodes</strong> have two selectable inputs: the devices select and measurement select. The available options are dynamically updated based on the data that is actually available on the Venus device.</p> <ul> <li><em>Device select</em> - lists all available devices</li> <li><em>Measurement select</em> - lists all available device-specific measurements</li> <li><em>Node label input field</em> - sets a custom label for the node</li> </ul> <p>The measurement unit type is shown in the measurement label in brackets, e.g. Battery voltage (V). In case the data type is enumerated, an appropriate enum legend is shown below the selected option. In this case the node will also output the enumerated textual value as <tt>msg.textvalue</tt>.</p>
<p>If the data type is <em>float</em>, a dropdown for rounding the output appears.</p>
<p>By default the node outputs its value every five seconds. If the <em>only changes</em> is checked, the node will only output on value changes.</p>
<p>Generator input node for relay controlled and Fischer Panda generators.<br />In order to use the relay for controlling a generator, make sure to set the relay to <i>Generator</i> via the (remote) console first.<br />Also see <a href="https://github.com/victronenergy/venus/wiki/dbus#generator-data">here</a> for more information.</p>
<p>Generator input node for relay controlled and Fischer Panda generators.<br />In order to use the relay for controlling a generator, make sure to set the relay to <i>Generator</i> via the (remote) console first.<br />The <strong>Generator start/stop<strong> dropdown is for the generic generator. It can activate a relay, but also, in case of Fischer panda, a generator directly via D-Bus.<br />The other option(s) are for generator data like voltages, RPM, oil pressure etcetera.<br />Also see <a href="https://github.com/victronenergy/venus/wiki/dbus#generator-data">here</a> for more information.</p>
<h3>Generator</h3>
<dl class="message-properties">
<dt class="optional">Generator not detected at AC input alarm<span class="property-type">enum</dt>
Expand Down Expand Up @@ -2094,14 +2094,6 @@ <h3>Generator</h3>
<dd>Dbus path: <b>/TodayRunTime</b>
</dd>
</dl>
</script>

<script type="text/x-red" data-help-name="victron-input-genset">
<h3>Details</h3>
<p>The <strong>input nodes</strong> have two selectable inputs: the devices select and measurement select. The available options are dynamically updated based on the data that is actually available on the Venus device.</p> <ul> <li><em>Device select</em> - lists all available devices</li> <li><em>Measurement select</em> - lists all available device-specific measurements</li> <li><em>Node label input field</em> - sets a custom label for the node</li> </ul> <p>The measurement unit type is shown in the measurement label in brackets, e.g. Battery voltage (V). In case the data type is enumerated, an appropriate enum legend is shown below the selected option. In this case the node will also output the enumerated textual value as <tt>msg.textvalue</tt>.</p>
<p>If the data type is <em>float</em>, a dropdown for rounding the output appears.</p>
<p>By default the node outputs its value every five seconds. If the <em>only changes</em> is checked, the node will only output on value changes.</p>
<p>This node is essentially an energy meter showing volts, amps, power, energy etc. It is comparable with the input-gridmeter.</p>
<h3>Genset</h3>
<dl class="message-properties">
<dt class="optional">AC Frequency (Hz)<span class="property-type">float</dt>
Expand Down Expand Up @@ -2319,6 +2311,42 @@ <h3>Genset</h3>
</dl>
<h3>Dcgenset</h3>
<dl class="message-properties">
<dt class="optional">DC current (DC A)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Dc/0/Current</b>
</dd>
<dt class="optional">DC current (DC A)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Dc/0/Current</b>
</dd>
<dt class="optional">Engine coolant temperature (Degrees celsius)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/CoolantTemperature</b>
</dd>
<dt class="optional">Engine exhaust temperature (Degrees celsius)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/ExaustTemperature</b>
</dd>
<dt class="optional">Engine load (%)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/Load</b>
</dd>
<dt class="optional">Oil pressure (kPa)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/OilPressure</b>
</dd>
<dt class="optional">Engine oil temperature (Degrees celsius)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/OilTemperature</b>
</dd>
<dt class="optional">Engine oil temperature (Seconds)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/OperatingHours</b>
</dd>
<dt class="optional">Heatsink temperature (RPM)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/Speed</b>
</dd>
<dt class="optional">Internal winding temperature (Degrees celsius)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/WindingTemperature</b>
</dd>
<dt class="optional">Heatsink temperature (Degrees celsius)<span class="property-type">float</dt>
<dd>Dbus path: <b>/HeatsinkTemperature</b>
</dd>
<dt class="optional">Starter battery voltage (DC V)<span class="property-type">float</dt>
<dd>Dbus path: <b>/StarterVoltage</b>
</dd>
</dl>
</script>

Expand Down Expand Up @@ -5158,6 +5186,26 @@ <h3>Generator</h3>
<dd>Dbus path: <b>/ServiceCounterReset</b>
</dd>
</dl>
<h3>Genset</h3>
<dl class="message-properties">
<dt class="optional">Start generator<span class="property-type">enum</dt>
<dd>Dbus path: <b>/Start</b>
<ul>
<li>0 - Stop</li>
<li>1 - Start</li>
</ul>
</dd>
</dl>
<h3>Dcgenset</h3>
<dl class="message-properties">
<dt class="optional">Start generator<span class="property-type">enum</dt>
<dd>Dbus path: <b>/Start</b>
<ul>
<li>0 - Stop generator</li>
<li>1 - Start generator</li>
</ul>
</dd>
</dl>
</script>

<script type="text/x-red" data-help-name="victron-output-inverter">
Expand Down
2 changes: 1 addition & 1 deletion src/nodes/victron-nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@

registerInputNode('victron-input-accharger', 'AC Charger', 'input-accharger');
registerInputNode('victron-input-acload', 'AC Load', 'input-acload');
registerInputNode('victron-input-acsystem', 'AC System', 'input-acsystem');
registerInputNode('victron-input-alternator', 'Alternator', 'input-alternator');
registerInputNode('victron-input-battery', 'Battery Monitor', 'input-battery');
registerInputNode('victron-input-dcdc', 'DC-DC', 'input-dcdc');
Expand All @@ -393,7 +394,6 @@
registerInputNode('victron-input-dcsystem', 'DC System', 'input-dcsystem');
registerInputNode('victron-input-dess', 'Dynamic ESS', 'input-dess');
registerInputNode('victron-input-digitalinput', 'Digital Input', 'input-digitalinput');
registerInputNode('victron-input-genset', 'Energy Meter', 'input-genset');
registerInputNode('victron-input-ess', 'ESS', 'input-ess');
registerInputNode('victron-input-evcharger', 'EV Charger', 'input-evcharger');
registerInputNode('victron-input-fuelcell', 'Fuel cell', 'input-fuelcell');
Expand Down
1 change: 0 additions & 1 deletion src/nodes/victron-nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ module.exports = function (RED) {
RED.nodes.registerType('victron-input-evcharger', BaseInputNode)
RED.nodes.registerType('victron-input-fuelcell', BaseInputNode)
RED.nodes.registerType('victron-input-generator', BaseInputNode)
RED.nodes.registerType('victron-input-genset', BaseInputNode)
RED.nodes.registerType('victron-input-gps', BaseInputNode)
RED.nodes.registerType('victron-input-gridmeter', BaseInputNode)
RED.nodes.registerType('victron-input-inverter', BaseInputNode)
Expand Down
94 changes: 88 additions & 6 deletions src/services/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -2421,7 +2421,7 @@
]
},
"input-generator": {
"help": "<p>Generator input node for relay controlled and Fischer Panda generators.<br />In order to use the relay for controlling a generator, make sure to set the relay to <i>Generator</i> via the (remote) console first.<br />Also see <a href=\"https://github.com/victronenergy/venus/wiki/dbus#generator-data\">here</a> for more information.</p>",
"help": "<p>Generator input node for relay controlled and Fischer Panda generators.<br />In order to use the relay for controlling a generator, make sure to set the relay to <i>Generator</i> via the (remote) console first.<br />The <strong>Generator start/stop<strong> dropdown is for the generic generator. It can activate a relay, but also, in case of Fischer panda, a generator directly via D-Bus.<br />The other option(s) are for generator data like voltages, RPM, oil pressure etcetera.<br />Also see <a href=\"https://github.com/victronenergy/venus/wiki/dbus#generator-data\">here</a> for more information.</p>",
"generator": [
{
"path": "/Alarms/NoGeneratorAtAcIn",
Expand Down Expand Up @@ -2517,10 +2517,7 @@
"type": "float",
"name": "Today's run time (seconds)"
}
]
},
"input-genset": {
"help": "<p>This node is essentially an energy meter showing volts, amps, power, energy etc. It is comparable with the input-gridmeter.</p>",
],
"genset": [
{
"path": "/Ac/Frequency",
Expand Down Expand Up @@ -2799,7 +2796,68 @@
}
}
],
"dcgenset": []
"dcgenset": [
{
"path": "/Dc/0/Current",
"type": "float",
"name": "DC current (DC A)"
},
{
"path": "/Dc/0/Current",
"type": "float",
"name": "DC current (DC A)"
},
{
"path": "/Engine/CoolantTemperature",
"type": "float",
"name": "Engine coolant temperature (Degrees celsius)"
},
{
"path": "/Engine/ExaustTemperature",
"type": "float",
"name": "Engine exhaust temperature (Degrees celsius)"
},
{
"path": "/Engine/Load",
"type": "float",
"name": "Engine load (%)"
},
{
"path": "/Engine/OilPressure",
"type": "float",
"name": "Oil pressure (kPa)"
},
{
"path": "/Engine/OilTemperature",
"type": "float",
"name": "Engine oil temperature (Degrees celsius)"
},
{
"path": "/Engine/OperatingHours",
"type": "float",
"name": "Engine oil temperature (Seconds)"
},
{
"path": "/Engine/Speed",
"type": "float",
"name": "Heatsink temperature (RPM)"
},
{
"path": "/Engine/WindingTemperature",
"type": "float",
"name": "Internal winding temperature (Degrees celsius)"
},
{
"path": "/HeatsinkTemperature",
"type": "float",
"name": "Heatsink temperature (Degrees celsius)"
},
{
"path": "/StarterVoltage",
"type": "float",
"name": "Starter battery voltage (DC V)"
}
]
},
"input-gps": {
"help": "<p>GPS information can be obtained with this node. For an example usage see the <a href=\"https://github.com/victronenergy/node-red-contrib-victron/wiki/Example-Flows#location-based-scheduling\">location based scheduling</a> example.</p>",
Expand Down Expand Up @@ -6619,6 +6677,30 @@
"name": "Service countdown reset (1=Reset service counter)",
"writable": true
}
],
"genset": [
{
"path": "/Start",
"type": "enum",
"name": "Start generator",
"enum": {
"0": "Stop",
"1": "Start"
},
"writable": true
}
],
"dcgenset": [
{
"path": "/Start",
"type": "enum",
"name": "Start generator",
"enum": {
"0": "Stop generator",
"1": "Start generator"
},
"writable": true
}
]
},
"output-inverter": {
Expand Down
1 change: 0 additions & 1 deletion src/services/victron-system.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ class SystemConfiguration {
'input-evcharger': this.getNodeServices('input-evcharger'),
'input-fuelcell': this.getNodeServices('input-fuelcell'),
'input-generator': this.getNodeServices('input-generator'),
'input-genset': this.getNodeServices('input-genset'),
'input-gps': this.getNodeServices('input-gps'),
'input-gridmeter': this.getNodeServices('input-gridmeter'),
'input-inverter': this.getNodeServices('input-inverter'),
Expand Down

0 comments on commit dbcb7dc

Please sign in to comment.