Integration SMA (user)
Description
The <clevergy-integration-sma-b2c> component allows end-users to directly connect their SMA solar installations through their personal account. This microfrontend can be embedded in any client's website.
Integration flow
-
Process Initiation: The user clicks a button on the website or app where the microfrontend is embedded.
-
Sunny Portal redirect: The user is redirected to the Sunny Portal website where they securely enter their credentials (username and password). Note: The user must have the appropriate permissions in Sunny Portal.
-
Permissions screen: After entering credentials, a screen appears requesting permissions to receive energy data and monitor the inverter.
-
Callback URL: After accepting permissions, the user is redirected to the configured callback URL. We recommend this URL to be either a connections screen within your app/website or the main page where the user can view their energy data.
Callback URL configuration
The callback URL is where users will be redirected after completing the SMA Sunny Portal connection process. You can configure this to:
- A connection confirmation page
- A dashboard showing production data
- Any other relevant page in your application
Delegate mode
-
Functionality: By default, the
delegateparameter is set tofalse, causing the microfrontend to directly redirect to the Sunny Portal website. However, ifdelegateis set totrue, the microfrontend emits an event containing the Sunny Portal URL. This allows developers to subscribe to the event and handle the redirection in a custom manner, such as opening an in-app browser if used in a mobile app. -
Mobile Apps Usage: This is particularly useful in mobile apps, especially on iOS where OAuth redirects and deeplinks can fail when third-party browsers like Chrome are used instead of Safari. The OAuth authorization flow might complete successfully, but the callback redirect may not properly return to the app. Using
delegateallows developers to manage the entire authentication process within an in-app WebView, ensuring reliable redirects and a seamless user experience.
This integration is currently in beta and only offers information about plants, devices and alerts.
If you need additional capabilities, please contact us.
Technical documentation
Check out the full documentation for clevergy-integration-sma-b2c.