PV Data from Solarman WiFi logger - with API

Hello Ronald. Thanks for this but I get an error message when entering the curl command in step 2:
{
“code”: “2101006”,
“msg”: “invalid param”,
“success”: false,
“requestId”: “e25e55fec6exxxxx”
}

I have checked the different input without success. Any idea?

Hello, sorry for reviving an old Post.
I found this in my search to integrate my Sofar ME3000SP.
I have the API and also followed the instructions. Then I used your Config.yaml, but is does not read any data.

I see all the sofar entities but no values. I just can’t get it working.

Check out my post here, it runs you through exactly what you want as I have the Same Battery Inverter:

and here:

First, thanks for your reply and time you take to guide le in the correct direction.
Now I’m completely lost. :upside_down_face:

1st tried to set this Sofar up using the HACS module from Stephan Joubert

And from the issues I found out that I was not the only one not getting data. This does not require an API, correct?

2nd try, is the online API from Skully that I found (and also incorporated your findings)

Got the API info this week so started around noon playing around with the received info.

My JSON info that I get from JSON Path Finder

{
	"code": null,
	"msg": null,
	"success": true,
	"requestId": "f15ee17e81fcd340",
	"deviceSn": "2104559628",
	"deviceId": 213282644,
	"deviceType": "COLLECTOR",
	"deviceState": 1,
	"dataList": [
		{
			"key": "SN1",
			"value": "2104559628",
			"unit": null,
			"name": "Embedded Device SN"
		},
		{
			"key": "MDUv1",
			"value": "ME_08_2701_2.06",
			"unit": null,
			"name": "Module Version No"
		},
		{
			"key": "WORK_TIM1",
			"value": "693089",
			"unit": "s",
			"name": "Total running time"
		},
		{
			"key": "OFFSET_TIM1",
			"value": "0",
			"unit": "s",
			"name": "Offset time"
		},
		{
			"key": "SEND_PERIOD1",
			"value": "5",
			"unit": "Min",
			"name": "Data Uploading Period"
		},
		{
			"key": "COLLECT_PERIOD1",
			"value": "60",
			"unit": "s",
			"name": "Data Acquisition Period"
		},
		{
			"key": "max_conn_n1",
			"value": "2",
			"unit": null,
			"name": "Max. No. of Connected Devices"
		},
		{
			"key": "SGits1",
			"value": "0",
			"unit": null,
			"name": "Signal Strength"
		},
		{
			"key": "HEA_F1",
			"value": "120",
			"unit": "s",
			"name": "Heart Rate"
		}
	]
}

I get the idea that I don’t get all info from Solarman.
Setup is a Sofar with Battery and sensors to verify power from provider and solar panels (separate installation).

I have Solarman installed from home_assistant_solarman/README.md at main · StephanJoubert/home_assistant_solarman · GitHub

That gives you the following 40 entities:





To get these you need to have created an account on the solarmanpv.com website.

Start reading this post from “my information” yes you need your api and secret sent to you from Solarman and substitute your information in the guide. Don’t forget to hash your account password…everything is in the instructions:

Hello,

As mentioned I installed the Solarman integration trough HACS. I entered al the info. Even used the Auto discovery to test. IP is correct, device ID is correct (checked multiple times).
And I also read all info on the GitHub website. After the integrations is configured I can see the entities but no data/input (they are configured). There is no connection.
I also can’t find any mentioning of any email/log-in info for this integration to work either. Or I’m missing it. This integration is made to load data directly and not trough the Solarman website (API).
Or do I need to adjust the extra yaml that’s created for the Sofar?

Reading your second post, concerning the my info. You’re talking about the online interface (trough API). Or did you combine stuff? Meaning you use the local integration (the above one) together with the manual configuration.yaml.

I tried it all (integration, API) it’s just not working, no data whatsoever. Really followed the readme
Like my Sofar is talking a different language than my HomeAssistant.
Got several HACS integrations working but this Sofar/Solarman is not willing to cooperate.

Giving up on this one for the moment, thanks for the help.

It’s been a while since I set it up. But I remember that I had to email Solarman to ask for the API and secret. They sent it after a few days. Then follow my instructions. If you want an offline option then you need to build the RS485 module and connect it to your Sofar inverter. Then set up MQTT and use the sensor file that I posted.

Here is the email to send:

[email protected]

I just purchased a Sofar ME3000SP inverter and would like to get API access to pull data from the liver in to my Home Assistant system.

Please could you send me a AppID and AppSecret.

Thank you in advance for your assistance.

Thanks, that’s also what I did. Got all info but can’t get it working. So for me it stops here. Got other more important things to do. All the rest is working except the Sofar integration.

Sorry, just follow my instructions and it will work…

Don’t give up…I’ve recently had a Solar PV system installed (With Sofar Inverter) and had huge confusion around how to integrate…but got there in the end.
What I’ve gathered is that there are two options… 1) local and /or 2) via API, and both can work :sunglasses:
(Unfortunately threads seem to randomly jump between the two options and confuse things).

Option 1 is via GitHub - StephanJoubert/home_assistant_solarman: Home Assistant component for Solarman collectors used with a variety of inverters.
This reads locally but is totally dependent on the chosen yaml perimeter file during config and is specific to your setup…for me none of the default options worked and had to research to find one working with my model…was in the GitHub repository issues…the one that worked for me is in issue #53

Option 2 works well once you have the API details. It’s pulling the data from the Solarman Cloud so is delayed but does work (once you figure out the sensors you need - I found this post very helpful on that front Collect Inverter data from Solarman API - #49 by bino )

My advice…make a call on how you want to pull the data and then follow that path only until you succeed (or exhaust all options for that route)…

again, appreciate your help and as mentioned, it’s me, not you :-). Just can’t figure it out yet. And not enough time to play around. Also not having any way of log or test does not help. I can however connect to the local interface over my network. So the local IP is correct.

Thanks for sharing your info. What type of Sofar do you have? Will have a look at your info and the treads. just getting time for this

Concerning the local option. Can you share your config? I would rather want to work locally than over the cloud. the IP is 100% correct. Even when using the autoconfig it picks up the correct info. And the integration is still in active my HA. unfortunatly no data.

Hi there,

You just need to find the time to look at both the threads that I originally linked you to. I posted EVERYTHING that is needed, including the yaml configurations for sensors and mqtt.

I really can’t do any more than what I already did to make it as easy as possible for others to follow. I know only to well your difficult things can be as a HA learner myself… :wink:

2 Likes

I’ve a Sofar HYD6000-ES inverter…

No config to share as such…I’ve just installed the Component I linked in prev post and followed its instructions (using the config file from the GitHub post I linked to).

Think you just need to give yourself some time, read through the threads /posts and then have a go with either API or Local access or even try both :sunglasses:…good luck :+1:t2:

1 Like

I do not understand hardware wise how does it collect data every 30 sec?

Still nothing closer. What I tried

Start over again and again and this is the last info I can give

Concerning the API.
Followed the instructions as mentioned by Scully
Collect Inverter data from Solarman API - Share your Projects! - Home Assistant Community (home-assistant.io)

I get the impression that I don’t get all values that I should get. This is the output that I get for step 4 (and 5). So My API and all the rest is working for the moment.

{
    "code": null,
    "msg": null,
    "success": true,
    "requestId": "HIDDEN",
    "deviceSn": "HIDDEN",
    "deviceId": HIDDEN,
    "deviceType": "COLLECTOR",
    "deviceState": 1,
    "dataList": [{
        "key": "SN1",
        "value": "HIDDEN",
        "unit": null,
        "name": "Embedded Device SN"
    }, {
        "key": "MDUv1",
        "value": "ME_08_2701_2.06",
        "unit": null,
        "name": "Module Version No"
    }, {
        "key": "WORK_TIM1",
        "value": "1",
        "unit": "s",
        "name": "Total running time"
    }, {
        "key": "OFFSET_TIM1",
        "value": "1669772876",
        "unit": "s",
        "name": "Offset time"
    }, {
        "key": "SEND_PERIOD1",
        "value": "5",
        "unit": "Min",
        "name": "Data Uploading Period"
    }, {
        "key": "COLLECT_PERIOD1",
        "value": "60",
        "unit": "s",
        "name": "Data Acquisition Period"
    }, {
        "key": "max_conn_n1",
        "value": "2",
        "unit": null,
        "name": "Max. No. of Connected Devices"
    }, {
        "key": "SGits1",
        "value": "0",
        "unit": null,
        "name": "Signal Strength"
    }, {
        "key": "HEA_F1",
        "value": "120",
        "unit": "s",
        "name": "Heart Rate"
    }]
}

I do not get the info for my battery or what Scully mentioned, “the Cumulative Production kWh”. I do not have these sensors here so normal that I can get them in HA. I presume I need to get in touch with Solarman support ofr this. Or am I missing something and just being stupid :slight_smile:

Concerning the direct connection. (the system is connected through a LAN cable!)
StephanJoubert/home_assistant_solarman: Home Assistant component for Solarman collectors used with a variety of inverters. (github.com)

Started again and removed the integration, removed the HACS download. rebooted HA, added the HACS again, added the integration, rebooted.

The config of the integration (even added it as a double in the config.yaml afterwards to also try it that way, no difference in the behavior)

sensor:
  - platform: solarman
    name: SOFAR
    inverter_host: 192.168.1.157
    inverter_port: 8899
    inverter_serial: 2104559628
    scan_interval: 30
    lookup_file: sofar_lsw3.yaml

Screenshot of the integration

Screenshot of the direct connection to the dataloger

And HA does not want to connect (Not even talking of the sensors. It first needs to connect)

I really don’t know what to do more to get this working. First step is in getting it to connect.

There is no Firewall, no vlan stuff. HA can communicate with all the rest of my devices over IP.

I’m more and more convinced that it has something to do with the inverter (Called Collector in the JSON!) and how it is configured. Not with the integrations or API instructions. Weird thing is that I do see the typical data on the Solarman app and website.

Yes…the details you show are for the Collector (see Device Type tag) …the data you are taking about / looking for is from the Inverter, so you’d need a second Rest Sensor for the Inverter data…

As I mentioned above I got no results with this lookup file and used another which gave me some data back…read back on my original post for the link :+1:t2: