I recently had solar panels installed with a huawei sun2000 inverter. This inverter comes with a nice app that provides all the data from the sun production but alse the energy consumption from the house and the power that is put on the net (due to a linked modbus energy meter). I want to integrate this data as much as possible in loxone, mainly because i want my sunscreens to react based on the amount of sun. Currently my screens are sometimes triggered on a cloudy day when it's too hot inside and no rain is expected.
I got in touch with Huawei support. Unfortunately you can't fetch this data locally via the ip of the converter (as can be done for sma i think and solaredge). Only possibilities are via RS485 or openapi.
They provided me with the details to make an openapi connection and gave me an openapi user. I'm however unsure how i can fetch this data in loxone as the openapi request needs to transmit a token that changes everytime and i don't now how to integrate this. I also don't know how to convert the request via postman into a virtual input. I can however fetch the data via postman. Any help on this would be greatly appreciated.
I've linked the procedure hereunder:
Request address: https://XXXXX/thirdData/login
HTTP method: POST
Request parameter: systemCode and userName
Use the next link to login: https://eu5.fusionsolar.huawei.com/thirdData/login
Choose Post, select Body, raw and JSON and insert userName and systemCode(Password) and Send:

Result:

After you login copy the Token that you will use to interrogate the next parameters.

5. Interface of Plant List
Request address: https://XXXXX/thirdData/getStationList
HTTP method: POST
Request parameter:-
Use the next link to interrogate: https://eu5.fusionsolar.huawei.com/t...getStationList
Copy the Token in Headers:

Set the interrogation and send:

Result:

Copy the stationCode and current Time to use at the next interrogation.
6. Interface of Power Station for Real-time Data
Request address: https://XXXXX/thirdData/getStationRealKpi
HTTP method: POST
Request parameter: stationCode
Use the next link to interrogate: https://eu5.fusionsolar.huawei.com/t...StationRealKpi
Copy the Token in Headers:

Set the interrogation: insert the station code from the Plant List and Send:

Result:

Kommentar