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.
188 lines
2.7 KiB
JSON
188 lines
2.7 KiB
JSON
[
|
|
{
|
|
"t": "2025-08-12 00:00:00",
|
|
"i": 3.711,
|
|
"a": 3.72,
|
|
"g": 3.717
|
|
},
|
|
{
|
|
"t": "2025-08-11 00:00:00",
|
|
"i": 3.711,
|
|
"a": 3.733,
|
|
"g": 3.723
|
|
},
|
|
{
|
|
"t": "2025-08-10 00:00:00",
|
|
"i": 3.705,
|
|
"a": 3.728,
|
|
"g": 3.719
|
|
},
|
|
{
|
|
"t": "2025-08-09 00:00:00",
|
|
"i": 3.705,
|
|
"a": 3.726,
|
|
"g": 3.715
|
|
},
|
|
{
|
|
"t": "2025-08-08 00:00:00",
|
|
"i": 3.705,
|
|
"a": 3.722,
|
|
"g": 3.716
|
|
},
|
|
{
|
|
"t": "2025-08-07 00:00:00",
|
|
"i": 3.704,
|
|
"a": 3.729,
|
|
"g": 3.716
|
|
},
|
|
{
|
|
"t": "2025-08-06 00:00:00",
|
|
"i": 3.698,
|
|
"a": 3.725,
|
|
"g": 3.708
|
|
},
|
|
{
|
|
"t": "2025-08-05 00:00:00",
|
|
"i": 3.7,
|
|
"a": 3.716,
|
|
"g": 3.708
|
|
},
|
|
{
|
|
"t": "2025-08-04 00:00:00",
|
|
"i": 3.703,
|
|
"a": 3.734,
|
|
"g": 3.711
|
|
},
|
|
{
|
|
"t": "2025-08-03 00:00:00",
|
|
"i": 3.705,
|
|
"a": 3.734,
|
|
"g": 3.714
|
|
},
|
|
{
|
|
"t": "2025-08-02 00:00:00",
|
|
"i": 3.699,
|
|
"a": 3.71,
|
|
"g": 3.705
|
|
},
|
|
{
|
|
"t": "2025-08-01 00:00:00",
|
|
"i": 3.699,
|
|
"a": 3.722,
|
|
"g": 3.709
|
|
},
|
|
{
|
|
"t": "2025-07-31 00:00:00",
|
|
"i": 3.704,
|
|
"a": 3.721,
|
|
"g": 3.713
|
|
},
|
|
{
|
|
"t": "2025-07-30 00:00:00",
|
|
"i": 3.698,
|
|
"a": 3.733,
|
|
"g": 3.72
|
|
},
|
|
{
|
|
"t": "2025-07-29 00:00:00",
|
|
"i": 3.695,
|
|
"a": 3.722,
|
|
"g": 3.712
|
|
},
|
|
{
|
|
"t": "2025-07-28 00:00:00",
|
|
"i": 3.713,
|
|
"a": 3.722,
|
|
"g": 3.716
|
|
},
|
|
{
|
|
"t": "2025-07-27 00:00:00",
|
|
"i": 3.715,
|
|
"a": 3.737,
|
|
"g": 3.725
|
|
},
|
|
{
|
|
"t": "2025-07-26 00:00:00",
|
|
"i": 3.709,
|
|
"a": 3.727,
|
|
"g": 3.716
|
|
},
|
|
{
|
|
"t": "2025-07-25 00:00:00",
|
|
"i": 3.7,
|
|
"a": 3.73,
|
|
"g": 3.722
|
|
},
|
|
{
|
|
"t": "2025-07-24 00:00:00",
|
|
"i": 3.699,
|
|
"a": 3.731,
|
|
"g": 3.717
|
|
},
|
|
{
|
|
"t": "2025-07-23 00:00:00",
|
|
"i": 3.687,
|
|
"a": 3.729,
|
|
"g": 3.706
|
|
},
|
|
{
|
|
"t": "2025-07-22 00:00:00",
|
|
"i": 3.687,
|
|
"a": 3.724,
|
|
"g": 3.71
|
|
},
|
|
{
|
|
"t": "2025-07-21 00:00:00",
|
|
"i": 3.701,
|
|
"a": 3.728,
|
|
"g": 3.711
|
|
},
|
|
{
|
|
"t": "2025-07-20 00:00:00",
|
|
"i": 3.705,
|
|
"a": 3.728,
|
|
"g": 3.717
|
|
},
|
|
{
|
|
"t": "2025-07-19 00:00:00",
|
|
"i": 3.704,
|
|
"a": 3.734,
|
|
"g": 3.716
|
|
},
|
|
{
|
|
"t": "2025-07-18 00:00:00",
|
|
"i": 3.702,
|
|
"a": 3.735,
|
|
"g": 3.721
|
|
},
|
|
{
|
|
"t": "2025-07-17 00:00:00",
|
|
"i": 3.702,
|
|
"a": 3.723,
|
|
"g": 3.714
|
|
},
|
|
{
|
|
"t": "2025-07-16 00:00:00",
|
|
"i": 3.717,
|
|
"a": 3.73,
|
|
"g": 3.724
|
|
},
|
|
{
|
|
"t": "2025-07-15 00:00:00",
|
|
"i": 3.7,
|
|
"a": 3.723,
|
|
"g": 3.714
|
|
},
|
|
{
|
|
"t": "2025-07-14 00:00:00",
|
|
"i": 3.705,
|
|
"a": 3.749,
|
|
"g": 3.726
|
|
},
|
|
{
|
|
"t": "2025-07-13 00:00:00",
|
|
"i": 3.704,
|
|
"a": 3.72,
|
|
"g": 3.708
|
|
}
|
|
] |