Collect Inverter data from Solarman API

Hi everyone.
I’m new to the forum and followed the guide
I sent an email to “[email protected]” to request API access and they replied like this:

Sorry, due to the API business adjustment, temporarily does not support opening.

Your understanding and patience is greatly appreciated."

Has this happened to anyone before? I have an afore af6k-sl inverter and I can’t add it to homeassistant

I asked for API-ID and I got unfortunately exactly the same answer as u posted…

From: [email protected]
Date: 06.03.2024
Message:„ Sorry, due to the API business adjustment, temporarily does not support opening.
Your understanding and patience is greatly appreciated.“

Hi,
Has anyone managed to remotely control an inverter using API? As far as I can see in the documentation there is remote control, but there is no list of commands…

Hi I have the same problem with second inverter config, did you manage it on on config.json file?

AllesKutEnter

Good day, the first code is clear, but how to apply the second one is not clear! Can you provide more detailed information?

I received this response from Solarman when asked for API access. Is this the expected response? Will will be crossing that 2 Lakhs API call volume by chance?

Dear Clients,

Thank you for your interest in Wuxi IGEN Technology Co. (hereinafter referred to as “IGEN Technology” or “us”) and for considering using our Solarman OpenAPI service. Before you officially subscribe, we would like to provide you with some important information.

Firstly, in the services provided to individual users, the following free usage quotas are include·

  1. API call volume of 200,000 times per year

  2. Number of power stations within 3

If it exceeds the usage limit we provide, we will have to temporarily suspend your service. To ensure that your service can be restored as soon as possible, please contact us as soon as possible for further communication on a solution.

In addition, to ensure that the rights and interests of both parties are fully protected when using the API, we recommend that you review and agree to our developer agreement. You can download the attachment “Developer Agreement” in this email to view the API developer agreement. And reply via email with ‘I have understood all the contents of the Developer Agreement and agree to be bound by it’ to “ [email protected] “ to complete agreement confirmation.

After you confirm the agreement, our service specialist will send you account information and OpenAPI usage documentation via email,

If you have any questions or need further information about the content of the agreement, please feel free to contact us at any time.

Thank you again for your trust and support in IGEN Technology!

regards,

Wuxi IGEN Technology Co.

[SOLARMAN OpenAPI Developer Agreement.pdf]

Thank you very much @Gav_in . I was unable to move further as I was following the old API link. Now I understood the reason :slight_smile:

1 Like

Before pushing it further, do you think this method applies to KSTAR: KSG-2K ?

Hi,
I know this was long time ago but it looks like your steps are immortal :slight_smile: I am trying to integrate solarman and currently I am on step 4. Do you remember what is deviceSN and how I can get it?

it’s the actual serial number of your inverter as far as I remember…been a while since I set this up but fairly sure that’s it.

1 Like

have you ever succeeded? I have a KSTAR KSG 5K and I can’t get it to work with Solarman.

Hello everyone,

I’m staring with HA and Solarman Integration, please, do you have any material to install step by step?
Because I don’t understand, where I should create sensor, mqq, doker etc, I did only Hacs integration :D, maybe you have, one step by step, where you said first, config mqq blablabl second create file sensor.yaml in the paste xxx etc

Thanks for atention.

In my experience the following integration is best: GitHub - davidrapan/ha-solarman: ⚡ Solarman Stick Logger integration for 🏠 Home Assistant

1 Like

I can’t config.
this integration doesn’t connect with my micro_inversor

Welcome to the Forums…
You’ve not giving any info on what Inverter you have, what Integration (which version, fork, etc) you are trying to use, etc, etc so it’s kinda difficult to assist you.
Also you are posting in a thread about a specific topic that probably isn’t relative to your query so that’s not helping either.

Read here to get you started with how to go about looking for help on the forum and then would suggest opening a new Topic with your specific queries and go from there…

as a PS…the Integration Martijn mentions above your previous post is a good place as any to start with integrating your Inverter with HA

1 Like

Hello, community!

I’m working on an integration in Home Assistant using the Solarman API, and I came across the documentation for the Device Historical Data feature:
API Documentation - Historical Data

Has anyone here used this part of the API? I’m particularly interested in understanding:

  1. What parameters are required to query historical data?
  2. Any tips on handling authentication and requests?
  3. Practical examples of how to format the query and process the returned data would be very helpful!

If anyone has integrated this feature into Home Assistant or has experience with it, I’d love to hear your insights. Any help would be greatly appreciated!

Thanks!

I haven’t gotten into it yet, but I’m looking for help to find the easiest way to do it! It’s doable ! but I don’t know how yet.

Help guys !

Short version: there are two deviceSn ! one for the logger, one for the inverter. If you only see no power production information, just change the deviceSn to that of the invertor and the power stats will show up.

Longer version: Just experienced the same that @raycingray experienced - all the CURL things worked (thanks to everyone on this thread!) but the currentData request only came back with basic device information with nothing on electrical production details.

Looked at the app on my phone to confirm data was clearly being populated and updated live to Solarman server. Then played with the app a bit - under the “Device” tab of the app I suddenly realised there are 2x S/N displayed in “Device Management” one for the Logger one for the Inverter. Tap on the “Inverter” (slightly grey box) brings up all the power production stats including current power output. Lightbulb moment: power consumption is associated with the Inverter not the Logger (makes sense). Change the deviceSn to that of the Inverter and it all works.

Now to try the MQTT scripts to get all these stats into HA.

Isn’t it just easier to use solarman locally?

Hey all, thanks everyone in this thread for their posts, it is through this thread that I finally got my curl commands going. They now worked brilliantly using my Raspberry Pi with the APP_ID and APP_SECRET provided by the Solarmanpv. I have now managed to retrieve the historical data too. As my contribution, I post here an example of retrieving my Sofar ESI-5K-S1 hybrid inverter detailed data for 2nd March 2025, Perth Australian time.

curl --request POST --url "${API_HOST}/device/v1.0/historical?appId=${APP_ID}&language=en" --header "Authorization: Bearer $token" --header "Content-Type: application/json" --data '{"deviceSn": "'"$DEVICE_SN"'","timeType": 5,"startTime": "1740844800","endTime": "1740931140"}'

For "timeType=5, the timestamp needs to be converted to 10-digit second-level UNIX timestamp UTC. You can use this Epoch Converter ( Epoch Converter - Unix Timestamp Converter) to convert your local time to the 10-digit second-level UNIX timestamp UTC. Use the third option, remember to strip off the ‘GMT’ to make it your local time at the input.

If all works well, this curl command will output a massive file containing all the data of the day sampled roughly every 5 minutes. It has 280 to 300 samples, and each sample has over 300 data points. It is a massive json file.

My next task is to extract the relevant ones for my further data analysis. When I have figured that out, I will post here and hopefully can help someone in this community.