Huawei Smart PVMS
Introduction
The Huawei Fusion Solar System is a closed system software system for managing Solar Plants, only accessible for Installer Access Rights.
For third party partners (Octopus, Tibber) Huawei has made a Northbound Southbound Interface (SNMP: Simple Network Management Protocol).
To make simple adjustments to the system without changing the local system software system this API is ideal to make changes.
Huawei SMTP SmartPVMS

Northbound open APIs are open interfaces based on the Representational State Transfer (REST) standard and can facilitate integration of third-party systems.
Third-party systems can use RESTful NBIs to access the resources authorized by the SmartPVMS, such as access authentication, configuration, alarm, and performance data.
APIs can be used only after authorization and the access is secure.
Only HTTPS access is supported.
The SmartPVMS provides a set of WebService APIs for third-party systems and third-party developers, who can construct HTTPS requests to call APIs and obtain SmartPVMS resources and data.
Huawei's documentation Northbound Open APIs:
Basic Thing XSRF-Token
The basic thing is to log in to get a XSRF-TOKEN token.
After obtaining the token, get code/codes of the stations from which you want to get data, you can do it using the getStationList -> stationCode method or just from FusionSolar panel. Subsequent methods provide the target data.
To be able to login you need a Northbound user account, which is not the same as you FusionSolar user account.
OAuth Connect
In OAuth Connect mode, third-party apps need to adapt to the OAuth 2.0 protocol to access northbound open APIs.
Example Authentication
An (existing user) account is used to call the login API to obtain an Cross-Site Request Forgery (XSRF) token for identity authentication when accessing other data query APIs and control APIs.
$ch = curl_init("https://eu5.fusionsolar.huawei.com/thirdData/login");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
"userName" => "email",
"password" => "password"
])
]);
$response = json_decode(curl_exec($ch), true);
$token = $response['data']['token'];
See also
- GitHub Tijs Verkoyen, HomeAssistant FusionSolar Integration. Contains useful remarks on Northbound API login.
- GitHub wlcrs, Huawei Solar Lib in python (ModBus).
- Forum Huawei, Getting an Northbound Open API User Account.