indykoning / PyPi_GrowattServer

MIT License
79 stars 34 forks source link

Add support for getInverterDetailData_max_two on newInverterAPI.do endpoint #47

Open bardahlm opened 1 year ago

bardahlm commented 1 year ago

ShinePhone app for my MID 25KTL3-X1 uses the op getInverterDetailData_max_two on the newInverterAPI.do endpoint.

Possible code:

def inverter_detaildata_max(self, inverter_id):
    """
    Get detailed inverter data
    """
    response = self.session.get(self.get_url('newInverterAPI.do'), params={
        'op': 'getInverterDetailData_max_two',
        'inverterId': inverter_id
    })
    data = json.loads(response.content.decode('utf-8'))
    return data

Example response: example-response.txt