Je crois que j’avance.
Dans le fichier DetectedDevicesListActivity.java, voila la fonction qui s’occupe du login:
private void requestLogin(SchneiderWLSLDevice schneiderWLSLDevice) {
ScotDialogFragment instanceProgress = ScotDialogFragment.instanceProgress(true);
this.dialog = instanceProgress;
instanceProgress.show(getSupportFragmentManager(), (String) null);
String replaceAll = schneiderWLSLDevice.getMacAddress().toUpperCase().replaceAll(":", "");
if (schneiderWLSLDevice.getDeviceType().isSmartlinkB()) {
doLoginSmartlink(schneiderWLSLDevice, replaceAll, true);
} else if (schneiderWLSLDevice.getDeviceType().isWiserV1()) {
doLoginWiserlink(schneiderWLSLDevice, new LoginReq("admin", "admin"));
} else if (schneiderWLSLDevice.getDeviceType().isAramis()) {
fetchAramisGatewayKey(schneiderWLSLDevice, replaceAll);
}
}
En cherchant la définition de isWiserV1 :
public boolean isAramis() {
return this == MIP_V2 || this == SL_EL_D || this == ELKO;
}
public boolean isWiserV1() {
return this == MIP_V1;
}
public boolean isWiserV2() {
return this == MIP_V2 || this == ELKO;
}
Et en pistant les messages affichés par l’application, le modèle 31800 est référé en tant que aramis_wiserlink.
Je pense qu’Aramis est le petit nom du module bluetooth qui s’occupe de l’appariement. Dans ce cas de figure, on ne passe plus par login :admin et mdp: admin (peut êtte pas plus mal…).
A la place on passe par fetchAramisGatewayKeys.
ça ressemble à une méthode pour acquérir une clef d’api via le bouton d’association bt …
[edit ]
Bon en fait, le clef d’api est généré par un algorithme déterministe à partir de l’adresse mac du module.
J’essai de convertir le java en python et voir si j’arrive à forcer la serrure de mon module 
[edit 2]
Bon, j’arrive à générer un clef qui a l’air valide. j’arrive à récupérer les information du module en REST avec.
Sans la clef :
GET https://192.168.xxx.xxx/rsa1/ProductDetails
401 unauthorized (‹ WWW-Authenticate ›: ‹ Basic realm=« » ›)
Avec la clef : (m2madmin : key )
GET https://192.168.xxx.xxx/rsa1/ProductDetails → 401 unauthorize
'{ "fw": "V1.7.5", "coS": true, "name": "myWiserEnergy-B2A1", "sn": "RN-2020-W17-1-0045", "pc": "EER31800", "cSsem": true }'
[Edit 3] Victory !
Avec la clef :
GET /rsa1/MeterInstantData
'{ "MeterInstantData": [ { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 205, "channel": 5 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 205, "channel": 0 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 205, "channel": 1 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 205, "channel": 2 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 205, "channel": 3 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 205, "channel": 4 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 201, "channel": 0 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 134, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 201, "channel": 1 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 0, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 201, "channel": 2 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 158, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 201, "channel": 3 }, { "currentA": 0, "currentB": 0, "currentC": 0, "voltageAB": 0, "voltageBC": 0, "voltageCA": 0, "voltageAN": 0, "voltageBN": 0, "voltageCN": 0, "powerA": 0, "powerB": 0, "powerC": 0, "powerTActive": 201, "powerTReactive": 0, "powerTApparent": 0, "powerFactorT": 0, "frequency": 0, "slaveId": 201, "channel": 4 } ] }'