Open olli0815 opened 1 month ago
For MIX this is implemented. What type is this?
MOD 10KTL3-XH(BP)
Oh sorry, the type of the used interface by the webgui out of this datapoint: growatt.\<nr>.\<nr>.devices.\<sn>.growattType
tlxh
Ok "tlxh" that make sense. If you activate the "advanced settings" is there a possibility to read the time slots?
No, Not yet. I ticket all options, no time slots in the data.
Just writing can also work, but then it's a blind flight because it only works in one direction. To explain: The values are displayed when you open the page on the Growatt homepage. However, they are transmitted in the source code of the page. But that's not how the adapter works. It would like to query the values. If there is no way to query the values, I don't like to implement it.
Makes sense. How to check if they are readable?
At the mix: to set: to Read, first Advanced Setting then read:
On the mix I can read every parameter:
I'm able to read the "slots" too via App / WebInterface
That's good. But at the moment I'm on vacation in the US. Going down the west coast from SFO to LA. Let's have a look in a bit more than a week. After that I will explain what you have to do that I can implement the settings.
enjoy !!
to recreate the command. Open the browser, the Growatt page and activate the developer tools with F12. Then click on Network. "tcpSet.do" is called to read and write.
I would need to read and write each parameter once. A hard copy of Payload and the text in Response and the response...
{"msg":"100-99-0-0-0-0-0-0-0-0-2828-3342-0-0-0-0-0-0-0-","success":true}
Please enter different values in all fields so that you can see where something is.
{"msg":"inv_set_success","success":true}
Please enter different values in all fields so that you can see where something is. This example is bad...
gridFirst: {
name: 'Grid first',
type: 'mix_ac_discharge_time_period',
paramId: 'MIX_AC_DISCHARGE_TIME_MULTI',
parseRet: PARSERET.parseGritFirst,
param: {
param1: { name: 'Discharge power rate', type: 'INUM_0_100', unit: '%' },
param2: { name: 'Discharge stopped soc', type: 'INUM_0_100', unit: '%' },
param3: { name: 'Time slot 1 start HH', type: 'INUM_0_24' },
param4: { name: 'Time slot 1 start MI', type: 'INUM_0_60' },
param5: { name: 'Time slot 1 end HH', type: 'INUM_0_24' },
param6: { name: 'Time slot 1 end MI', type: 'INUM_0_60' },
param7: { name: 'Time slot 1 on', type: 'BOOL' },
param8: { name: 'Time slot 2 start HH', type: 'INUM_0_24' },
param9: { name: 'Time slot 2 start MI', type: 'INUM_0_60' },
param10: { name: 'Time slot 2 end HH', type: 'INUM_0_24' },
param11: { name: 'Time slot 2 end MI', type: 'INUM_0_60' },
param12: { name: 'Time slot 2 on', type: 'BOOL' },
param13: { name: 'Time slot 3 start HH', type: 'INUM_0_24' },
param14: { name: 'Time slot 3 start MI', type: 'INUM_0_60' },
param15: { name: 'Time slot 3 end HH', type: 'INUM_0_24' },
param16: { name: 'Time slot 3 end MI', type: 'INUM_0_60' },
param17: { name: 'Time Slot 3 on', type: 'BOOL' },
},
static parseGritFirst(val, resolve) {
debugApi('parseGritFirst:', val);
if (val.success === true && val.msg) {
const ar = val.msg
.toString()
.split('-')
.map(n => parseInt(n, 10));
if (ar.length > 18) {
let time = '';
[val.param1, val.success] = fNum(ar[0], 0, 100, val.success);
[val.param2, val.success] = fNum(ar[1], 0, 100, val.success);
[time, val.success] = fTime(ar[10], val.success);
[val.param3, val.success] = fNum(time.substring(0, 2), 0, 24, val.success);
[val.param4, val.success] = fNum(time.substring(3, 6), 0, 60, val.success);
[time, val.success] = fTime(ar[11], val.success);
[val.param5, val.success] = fNum(time.substring(0, 2), 0, 24, val.success);
[val.param6, val.success] = fNum(time.substring(3, 6), 0, 60, val.success);
[val.param7, val.success] = fBool(ar[12], val.success);
[time, val.success] = fTime(ar[13], val.success);
[val.param8, val.success] = fNum(time.substring(0, 2), 0, 24, val.success);
[val.param9, val.success] = fNum(time.substring(3, 6), 0, 60, val.success);
[time, val.success] = fTime(ar[14], val.success);
[val.param10, val.success] = fNum(time.substring(0, 2), 0, 24, val.success);
[val.param11, val.success] = fNum(time.substring(3, 6), 0, 60, val.success);
[val.param12, val.success] = fBool(ar[15], val.success);
[time, val.success] = fTime(ar[16], val.success);
[val.param13, val.success] = fNum(time.substring(0, 2), 0, 24, val.success);
[val.param14, val.success] = fNum(time.substring(3, 6), 0, 60, val.success);
[time, val.success] = fTime(ar[17], val.success);
[val.param15, val.success] = fNum(time.substring(0, 2), 0, 24, val.success);
[val.param16, val.success] = fNum(time.substring(3, 6), 0, 60, val.success);
[val.param17, val.success] = fBool(ar[18], val.success);
} else {
val.success = false;
}
} else {
val.success = false;
}
debugApi('parseGritFirst result:', val);
resolve(val);
}
And that is then incorporated into the source code... actually no secret
No bug, rather an ask - but fist things first Thanks for the Adapter !!.
Would it be possible to set more values then the given channels under settings? background I wand to set load prios more dynamic to reflect dynamic energy tariffs.
Ole