Skip to content

Commit

Permalink
Add generator specific error code paths to services
Browse files Browse the repository at this point in the history
Add generator specific Error identification paths to the input generator node, making troubleshooting generators easier.

Also fix a parsing bug in the check-services script and update
services documentation.
  • Loading branch information
dirkjanfaber committed Oct 10, 2024
1 parent 68b6fbf commit 6a8c37a
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/check-services-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ workbook.xlsx.readFile(xlsFile)
node = node + row.values[1].split('.')[2]
if (node === 'input-grid') { node = 'input-gridmeter' }
if (node === 'input-charger') { node = 'input-accharger' }
if (node === 'input-genset') { node = 'input-generator' }
if (node === 'input-dcgenset') { node = 'input-generator' }
if (typeof row.values[7] === 'undefined') { return }
const path = row.values[7].replace('Cgwacs', 'CGwacs')
// console.log("Check for node " + node + ", path: " + path);
Expand Down Expand Up @@ -78,13 +80,13 @@ workbook.xlsx.readFile(xlsFile)
if (!paths.includes(path)) {
// Print some info on the missing entry
let name = row.values[2]
if (row.values[9] && !row.values[9].match(/;/)) {
if (row.values[9] && typeof row.values[9] === 'string' && !row.values[9].match(/;/)) {
name = name + ' (' + row.values[9] + ')'
}
// check the type; if row 9 contains a semicolon, it is enum. Else it is a bit of
// a guess, but we default it to float if we are not sure
let type
if (row.values[9] && row.values[9].match(/;/)) {
if (row.values[9] && typeof row.values[9] === 'string' && row.values[9].match(/;/)) {
type = 'enum'
} else {
if (row.values[4].match(/string/)) {
Expand Down
48 changes: 48 additions & 0 deletions src/nodes/config-client.html
Original file line number Diff line number Diff line change
Expand Up @@ -2190,6 +2190,30 @@ <h3>Genset</h3>
</dd>
<dt class="optional">Engine winding temperature (°C)<span class="property-type">float</dt>
<dd>Dbus path: <b>/Engine/WindingTemperature</b>
</dd>
<dt class="optional">Generator specific error code 0<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/0/Id</b>
</dd>
<dt class="optional">Generator specific error code 1<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/1/Id</b>
</dd>
<dt class="optional">Generator specific error code 2<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/2/Id</b>
</dd>
<dt class="optional">Generator specific error code 3<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/3/Id</b>
</dd>
<dt class="optional">Generator specific error code 4<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/4/Id</b>
</dd>
<dt class="optional">Generator specific error code 5<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/5/Id</b>
</dd>
<dt class="optional">Generator specific error code 6<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/6/Id</b>
</dd>
<dt class="optional">Generator specific error code 7<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/7/Id</b>
</dd>
<dt class="optional">Error<span class="property-type">enum</dt>
<dd>Dbus path: <b>/ErrorCode</b>
Expand Down Expand Up @@ -2350,6 +2374,30 @@ <h3>Dcgenset</h3>
</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">Generator specific error code 0<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/0/Id</b>
</dd>
<dt class="optional">Generator specific error code 1<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/1/Id</b>
</dd>
<dt class="optional">Generator specific error code 2<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/2/Id</b>
</dd>
<dt class="optional">Generator specific error code 3<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/3/Id</b>
</dd>
<dt class="optional">Generator specific error code 4<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/4/Id</b>
</dd>
<dt class="optional">Generator specific error code 5<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/5/Id</b>
</dd>
<dt class="optional">Generator specific error code 6<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/6/Id</b>
</dd>
<dt class="optional">Generator specific error code 7<span class="property-type">string</dt>
<dd>Dbus path: <b>/Error/7/Id</b>
</dd>
<dt class="optional">Heatsink temperature (Degrees celsius)<span class="property-type">float</dt>
<dd>Dbus path: <b>/HeatsinkTemperature</b>
Expand Down
80 changes: 80 additions & 0 deletions src/services/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -2670,6 +2670,46 @@
"type": "float",
"name": "Engine winding temperature (°C)"
},
{
"path": "/Error/0/Id",
"type": "string",
"name": "Generator specific error code 0"
},
{
"path": "/Error/1/Id",
"type": "string",
"name": "Generator specific error code 1"
},
{
"path": "/Error/2/Id",
"type": "string",
"name": "Generator specific error code 2"
},
{
"path": "/Error/3/Id",
"type": "string",
"name": "Generator specific error code 3"
},
{
"path": "/Error/4/Id",
"type": "string",
"name": "Generator specific error code 4"
},
{
"path": "/Error/5/Id",
"type": "string",
"name": "Generator specific error code 5"
},
{
"path": "/Error/6/Id",
"type": "string",
"name": "Generator specific error code 6"
},
{
"path": "/Error/7/Id",
"type": "string",
"name": "Generator specific error code 7"
},
{
"path": "/ErrorCode",
"type": "enum",
Expand Down Expand Up @@ -2859,6 +2899,46 @@
"type": "float",
"name": "Internal winding temperature (Degrees celsius)"
},
{
"path": "/Error/0/Id",
"type": "string",
"name": "Generator specific error code 0"
},
{
"path": "/Error/1/Id",
"type": "string",
"name": "Generator specific error code 1"
},
{
"path": "/Error/2/Id",
"type": "string",
"name": "Generator specific error code 2"
},
{
"path": "/Error/3/Id",
"type": "string",
"name": "Generator specific error code 3"
},
{
"path": "/Error/4/Id",
"type": "string",
"name": "Generator specific error code 4"
},
{
"path": "/Error/5/Id",
"type": "string",
"name": "Generator specific error code 5"
},
{
"path": "/Error/6/Id",
"type": "string",
"name": "Generator specific error code 6"
},
{
"path": "/Error/7/Id",
"type": "string",
"name": "Generator specific error code 7"
},
{
"path": "/HeatsinkTemperature",
"type": "float",
Expand Down

0 comments on commit 6a8c37a

Please sign in to comment.