Files
CPLv4.0/mocks/device-cgi-simulator/cable-monitoring-data/slot0/schleifenwiderstand/DIA2.json
ISA 71f120aa27 fetchCableData.mjs
Sends Authorization: Basic <base64(user:pass)> with configurable credentials.
Accepts --user and --pass, or env CPL_USER/CPL_PASS; defaults to Littwin/Littwin.
Uses an https.Agent({ rejectUnauthorized: false }) when --insecure is set.
Corrected output folder to cable-monitoring-data.
CLI parser supports both --key=value and --key value (PowerShell friendly).
Quick usage (PowerShell)

All 32 slots, both types (iso=3, rsl=4), all DIA modes, last 30 days:
npm run mocks:cable
Specific date range (e.g., 2025-07-13 to 2025-08-12), all slots and types:
node .\mocks\scripts\fetchCableData.mjs --from 2025-07-13 --to 2025-08-12 --insecure
Only slot 0, Isolationswiderstand, DIA1:
node .\mocks\scripts\fetchCableData.mjs --slots 0 --modes DIA1 --types iso --from 2025-07-13 --to 2025-08-12 --insecure
Provide credentials explicitly:
node .\mocks\scripts\fetchCableData.mjs --user Littwin --pass Littwin --insecure
Or via environment variables for the session:
$env:CPL_USER = "Littwin"; $env:CPL_PASS = "Littwin"
node .\mocks\scripts\fetchCableData.mjs --insecure
Output structure

mocks/device-cgi-simulator/cable-monitoring-data/slot{0..31}/
isolationswiderstand/DIA0.json, DIA1.json, DIA2.json
schleifenwiderstand/DIA0.json, DIA1.json, DIA2.json
I smoke-tested slot 0, DIA1, iso with login and it produced DIA1.json under slot0/isolationswiderstand. If you need me to also add a convenience npm script with user/pass placeholders, say the credentials source you prefer (env vs args), and I’ll wire it.
2025-08-12 10:50:08 +02:00

188 lines
2.7 KiB
JSON

[
{
"t": "2025-08-12 00:00:00",
"i": 13.954,
"a": 14.103,
"g": 14.05
},
{
"t": "2025-08-11 00:00:00",
"i": 14.024,
"a": 14.144,
"g": 14.108
},
{
"t": "2025-08-10 00:00:00",
"i": 13.974,
"a": 14.074,
"g": 14.035
},
{
"t": "2025-08-09 00:00:00",
"i": 14.028,
"a": 14.165,
"g": 14.114
},
{
"t": "2025-08-08 00:00:00",
"i": 13.94,
"a": 14.039,
"g": 14.007
},
{
"t": "2025-08-07 00:00:00",
"i": 13.998,
"a": 14.152,
"g": 14.052
},
{
"t": "2025-08-06 00:00:00",
"i": 13.978,
"a": 14.056,
"g": 14.028
},
{
"t": "2025-08-05 00:00:00",
"i": 13.87,
"a": 14.041,
"g": 14.006
},
{
"t": "2025-08-04 00:00:00",
"i": 13.87,
"a": 14.095,
"g": 13.995
},
{
"t": "2025-08-03 00:00:00",
"i": 14.013,
"a": 14.143,
"g": 14.055
},
{
"t": "2025-08-02 00:00:00",
"i": 14.01,
"a": 14.143,
"g": 14.088
},
{
"t": "2025-08-01 00:00:00",
"i": 13.975,
"a": 14.125,
"g": 14.045
},
{
"t": "2025-07-31 00:00:00",
"i": 13.921,
"a": 14.117,
"g": 14.052
},
{
"t": "2025-07-30 00:00:00",
"i": 13.962,
"a": 14.109,
"g": 14.04
},
{
"t": "2025-07-29 00:00:00",
"i": 13.962,
"a": 14.105,
"g": 14.039
},
{
"t": "2025-07-28 00:00:00",
"i": 14.054,
"a": 14.171,
"g": 14.081
},
{
"t": "2025-07-27 00:00:00",
"i": 14.071,
"a": 14.171,
"g": 14.123
},
{
"t": "2025-07-26 00:00:00",
"i": 14.024,
"a": 14.126,
"g": 14.071
},
{
"t": "2025-07-25 00:00:00",
"i": 14.006,
"a": 14.148,
"g": 14.093
},
{
"t": "2025-07-24 00:00:00",
"i": -0.001,
"a": 14.116,
"g": 13.567
},
{
"t": "2025-07-23 00:00:00",
"i": 13.98,
"a": 14.11,
"g": 14.042
},
{
"t": "2025-07-22 00:00:00",
"i": 13.793,
"a": 14.099,
"g": 13.97
},
{
"t": "2025-07-21 00:00:00",
"i": 13.982,
"a": 14.127,
"g": 14.044
},
{
"t": "2025-07-20 00:00:00",
"i": 13.832,
"a": 14.056,
"g": 13.971
},
{
"t": "2025-07-19 00:00:00",
"i": 13.967,
"a": 14.056,
"g": 14.027
},
{
"t": "2025-07-18 00:00:00",
"i": 13.927,
"a": 14.086,
"g": 13.989
},
{
"t": "2025-07-17 00:00:00",
"i": 13.952,
"a": 14.13,
"g": 14.067
},
{
"t": "2025-07-16 00:00:00",
"i": 13.952,
"a": 14.153,
"g": 14.071
},
{
"t": "2025-07-15 00:00:00",
"i": 13.943,
"a": 14.114,
"g": 14.062
},
{
"t": "2025-07-14 00:00:00",
"i": 13.936,
"a": 14.047,
"g": 13.989
},
{
"t": "2025-07-13 00:00:00",
"i": 13.966,
"a": 14.109,
"g": 14.02
}
]