Huawei Smart PVMS: Difference between revisions
| (2 intermediate revisions by the same user not shown) | |||
| Line 19: | Line 19: | ||
Huawei's documentation Northbound Open APIs: | Huawei's documentation Northbound Open APIs: | ||
* [https://support.huawei.com/enterprise/en/doc/EDOC1100492747/8f6c35d4 SmartPVMS 25.2.0 Northbound API Reference] | * [https://support.huawei.com/enterprise/en/doc/EDOC1100492747/8f6c35d4 SmartPVMS 25.2.0 Northbound API Reference] | ||
=== Basic Thing XSRF-Token === | |||
The basic thing is to log in to get a XSRF-TOKEN token. | |||
<br>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. | |||
<br>To be able to login you need a {{FormFCTW|9px|blue|bold|Northbound user account}}, which is {{FormFCTW|9px|red|bold|not}} the same as you FusionSolar user account. | |||
== OAuth Connect == | == OAuth Connect == | ||
| Line 44: | Line 49: | ||
== See also == | == See also == | ||
<span class="editsection">[[#content|top]]</span> | <span class="editsection">[[#content|top]]</span> | ||
* [https://github.com/woopstar/hsem Github Woopstar], Huawei Solar Energy Management (HSEM) for Home Assistant. With Battery optimization. | |||
* [https://github.com/tijsverkoyen/HomeAssistant-FusionSolar GitHub Tijs Verkoyen], HomeAssistant FusionSolar Integration. Contains useful remarks on Northbound API login. | * [https://github.com/tijsverkoyen/HomeAssistant-FusionSolar GitHub Tijs Verkoyen], HomeAssistant FusionSolar Integration. Contains useful remarks on Northbound API login. | ||
* [https://github.com/wlcrs/huawei-solar-lib/tree/develop/examples GitHub wlcrs], Huawei Solar Lib in python (ModBus). | * [https://github.com/wlcrs/huawei-solar-lib/tree/develop/examples GitHub wlcrs], Huawei Solar Lib in python (ModBus). | ||
* [https://forum.huawei.com/enterprise/intl/en/thread/communicate-with-fusionsolar-through-an-openapi-account/667232424741978112?blogId=667232424741978112 Forum Huawei], Getting an Northbound Open API User Account. | |||
== Reference == | == Reference == | ||
Latest revision as of 14:54, 27 December 2025
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 Woopstar, Huawei Solar Energy Management (HSEM) for Home Assistant. With Battery optimization.
- 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.