@schnipsel71
moin, ich habe auch eine Hycube Anlage und hatte ein fertiges Script. Das funktioniert leider seit nem Update nicht mehr.
Nun habe ich das von dir gelesen und mich an die Arbeit gemacht.
Irgendwie kommen aber keine Daten aus meiner Anlage raus.
Ich pack das mal hier rein.
httpGet(
'http://10.10.1.139/auth/',
{
headers: {
"Authorization": Buffer.from("Basic hycube:hycube").toString("base64"),
}
},
(error, response) => {
if (!error) {
let token = response.data;
console.log("Token "+ token);
httpGet(
'http://10.10.1.139/get_values/',
{
headers: {
"Authorization": token
}
},
(error, response) => {
if (!error) {
console.log(response.statusCode);
console.log(response.data);
var result = JSON.parse(response.data);
var GridPower= (result["Grid_P"]);
var BatteryPower=result["Battery_P"];
var HausPower= result["Home_P"];
var solar= result["solar1_P"];
setState("HyWeb.Batterie", BatteryPower);
setState("HyWeb.Grid", GridPower);
setState("HyWeb.Hausverbrauch", HausPower);
setState("HyWeb.Solar", solar);
} else {
console.error(error);
}
}
);
} else {
console.error(error);
}
}
);
Im Debugfenster kommt
javascript.0 14:06:19.611 info Stopping script script.js.ioBroker.Energie.Hycube.hycube
javascript.0 14:06:19.711 info Start JavaScript script.js.ioBroker.Energie.Hycube.hycube (Javascript/js)
javascript.0 14:06:19.724 info script.js.ioBroker.Energie.Hycube.hycube: httpGet(config={"method":"get","url":"http://10.10.1.139/auth/","responseType":"text","responseEncoding":"utf8","timeout":2000,"headers":{"User-Agent":"Mozilla/5.0 (X11; Linux i686; rv:109.0) Gecko/20100101 Firefox/121.0","Authorization":"QmFzaWMgaHljdWJlOmh5Y3ViZQ=="}})
javascript.0 14:06:19.727 info script.js.ioBroker.Energie.Hycube.hycube: registered 0 subscriptions, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
javascript.0 14:06:19.772 info script.js.ioBroker.Energie.Hycube.hycube: Token ewogICAgIlBlcm1pc3Npb24iOiAzLAogICAgImV4cCI6IDE3MjE1NjcxNzkKfQo=
javascript.0 14:06:19.772 info script.js.ioBroker.Energie.Hycube.hycube: httpGet(config={"method":"get","url":"http://10.10.1.139/get_values/","responseType":"text","responseEncoding":"utf8","timeout":2000,"headers":{"User-Agent":"Mozilla/5.0 (X11; Linux i686; rv:109.0) Gecko/20100101 Firefox/121.0","Authorization":"ewogICAgIlBlcm1pc3Npb24iOiAzLAogICAgImV4cCI6IDE3MjE1NjcxNzkKfQo="}})
javascript.0 14:06:19.782 info script.js.ioBroker.Energie.Hycube.hycube: 200
javascript.0 14:06:19.782 info script.js.ioBroker.Energie.Hycube.hycube: { "Battery_C": 100, "Battery_I": -21.299999237060547, "Battery_P": -1116.8814148439415, "Battery_V": 52.43574905395508, "Grid_I_L1": -19.158, "Grid_I_L2": -18.836, "Grid_I_L3": -18.267, "Grid_P": -13177.5, "Grid_V_L1": 237.6, "Grid_V_L2": 238.1, "Grid_V_L3": 236.2, "Grid_f": 50, "Home_P": 883.8000000000002, "Inv1_I_L1": 9.6, "Inv1_I_L2": 9.7, "Inv1_I_L3": 9.5, "Inv1_P_L1": -2365, "Inv1_P_L2": -2370, "Inv1_P_L3": -2372, "Inv1_V_L1": 238, "Inv1_V_L2": 238.4, "Inv1_V_L3": 236.1, "Meter2_P": -7043.7, "Meter3_P": -7017.6, "Solar1_I": 7.3, "Solar1_P": 2563, "Solar1_V": 381.8, "Solar2_I": 7.7, "Solar2_V": 464, "solar2_P": 3284, "solar_total_P": 5847 }
javascript.0 14:06:19.783 warn at Object.<anonymous> (script.js.ioBroker.Energie.Hycube.hycube:32:25)
javascript.0 14:06:19.785 warn at Object.<anonymous> (script.js.ioBroker.Energie.Hycube.hycube:33:25)
javascript.0 14:06:19.788 warn at Object.<anonymous> (script.js.ioBroker.Energie.Hycube.hycube:34:25)
javascript.0 14:06:19.789 warn at Object.<anonymous> (script.js.ioBroker.Energie.Hycube.hycube:35:25)
Datenpunkte werden keine angelegt
Mich würde interessieren wo da der Fehler im System ist