Huawei Smart PVMS: Difference between revisions
mNo edit summary |
|||
| Line 24: | Line 24: | ||
=== Example Authentication === | === Example Authentication === | ||
An (existing user) account is used to call the login API to obtain an Cross- | An (existing user) account is used to call the login API to obtain an Cross-Site Request Forgery ([[wikipedia:XSRF|XSRF]]) token for identity authentication when accessing other data query APIs and control APIs. | ||
<pre> | <pre> | ||
| Line 41: | Line 41: | ||
$token = $response['data']['token']; | $token = $response['data']['token']; | ||
</pre> | </pre> | ||
== See also == | == See also == | ||
Revision as of 14:34, 26 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:
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'];