PV Data from Solarman WiFi logger - with API

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:

I know. I read your results and those of many others. Tried 5 files, no results :-(.

As mentioned, the base is to get a connection and that is even not working.

Local connection: FAIL

I know. But that is the data I get back from the API instructions that I followed. With the info I got from Solarman. As mentioned, I do not get anything else back. I do not get an inverter.
Reason that I think something else is wrong.

What I posted in my reply is the only data I get back using the curl. No other sensors.

Can’t rely help further on the local connection one…I’ve shared what’s works for me…maybe raise issue in the repository on GitHub

1 Like

Post the result for the Inverter query so after following all the steps and let’s have a look to see if it shows anything…

Thanks for all the help.

So following the instructions from Scully to get the info.

  1. Doen and got the info.
  2. did it and works for me I get a “reply”
  3. Correct, I get a similar result.
  4. Yep, working but the results are different!
    In the example I see device type Inverter. I get device type Collector
    See my results below.

When I “rerun”

I will see the value of that the “key”: “OFFSET_TIM1” will increase.

So I do have a connection, API is working. But I do not get the data that I should get.

The Data List you have above is from your Collector / Logger not the Inverter…(and FWIW matches the structure of my own so you are doing this correctly for the collector).

You need to run the final Curl command in the instructions twice with the different serial numbers of your devices to get the data you want…once for Collector with its serial number, and again separately for the Inverter with its serial number. The AppID and Bearer Token remain the same, just change the serial number each time.

One you have proof of concept, then create separate rest sensors as required depending on whether you want the whole list or a selection only…

why don’t you use this?

What do you mean connected with LAN cable, which inverter you have?

I want to but probably doing something stupid or looking over a bit of instruction. (Just found out about my mistake with the API.
What I mean is that I don’t use wifi but a wired connection to the data collector.
Or is there somewhere a switch that you need to set to allow the communication.

I can look at the collector on my network (after I log in)


Entering the data in the integration is from what I read correct. No extra info in the configuration.yaml is needed, no need to change manually anything else, correct?

It will not connect and doesn’t give me any info. Set it to the correct IP, SN of the collector. Model of the invertor should be supported with the standard Sofar yaml. Tested now several custom ones, but no luck. (Copy paste no alterations)
Inverter is a Sofar

Did a quick test and changed the Device SN to SE1ES430N5R577 (invertor) and got the date that was needed. Did not get that bit of info from the instructions. Will play again and further with this info.

Looks like you’re getting there…
The various instructions /steps are a little confusing alright but everything is in there…you’ve actually linked to them yourself above …as was mentioned in the thread, with something like this you need to give yourself plenty of time and read then read again the steps before jumping in…
Anyway am glad you’re making progress :+1:t2:

1 Like

I know, been going over and over and still mist that part. Wondering g if it’s the same for the direct link. That direct link and energy integration is for me the ultimate goal. Since that can be combined to my car charger to optimise my consumption.

Have you set up Solarman app on your phone? If not set it up and remember that the Sofar inverter has a serial number, but you also need the Wi-Fi logger serial number as it is the logger that is giving you the data and not the inverter…


Integration requires the logger serial number: