APsystems APS ECU R local inverters data pull

Oh, no I didn’t write it for a command line sensor. I just was trying to get the data in a usable format, for use later into a custom component for home assistant. You should be able to just put this python script somewhere, and run it (after modifying the IP address).

I’m starting work on the component that will actually integrate in HA correctly. That will probably be a few days away before I have something working.

understood, still very promising:

{
  "timestamp": "2020-12-29 22:59:12",
  "inverter_qty": 7,
  "inverters": [
    {
      "uid": "408000094016",
      "online": true,
      "unknown": "01",
      "frequency": 0.0,
      "temperature": 0,
      "model": "YC600",
      "channel_qty": 2,
      "power": [
        0,
        0
      ],
      "voltage": [
        0,
        0
      ]
    },
    {
      "uid": "408000095622",
      "online": true,
      "unknown": "01",
      "frequency": 0.0,
      "temperature": 0,
      "model": "YC600",
      "channel_qty": 2,
      "power": [
        0,
        0
      ],
      "voltage": [
        0,
        0
      ]
    },
    {
      "uid": "408000091826",
      "online": true,
      "unknown": "01",
      "frequency": 0.0,
      "temperature": 0,
      "model": "YC600",
      "channel_qty": 2,
      "power": [
        0,
        0
      ],
      "voltage": [
        0,
        0
      ]
    },
    {
      "uid": "408000092933",
      "online": true,
      "unknown": "01",
      "frequency": 0.0,
      "temperature": 0,
      "model": "YC600",
      "channel_qty": 2,
      "power": [
        0,
        0
      ],
      "voltage": [
        0,
        0
      ]
    },
    {
      "uid": "408000091913",
      "online": true,
      "unknown": "01",
      "frequency": 0.0,
      "temperature": 0,
      "model": "YC600",
      "channel_qty": 2,
      "power": [
        0,
        0
      ],
      "voltage": [
        0,
        0
      ]
    },
    {
      "uid": "408000092434",
      "online": true,
      "unknown": "01",
      "frequency": 0.0,
      "temperature": 0,
      "model": "YC600",
      "channel_qty": 2,
      "power": [
        0,
        0
      ],
      "voltage": [
        0,
        0
      ]
    },
    {
      "uid": "408000091840",
      "online": true,
      "unknown": "01",
      "frequency": 0.0,
      "temperature": 0,
      "model": "YC600",
      "channel_qty": 2,
      "power": [
        0,
        0
      ],
      "voltage": [
        0,
        0
      ]
    }
  ],
  "total_power": 0
}

Just to make sure there isn’t a bug, but based on your timestamp, I’m assuming you aren’t generating any power right now?

Lol, indeed, will try tomorrow with some light on the panels :grin:

I’m a noob in Home Assistant and hope there will be some sort of ECU-R integration to make the install possible for me. I updated the first command to be send to the ECU-R to determen the ECU-ID which is needed for following commands you might want to send.
status
Not all fields are known right now… work in progress. @ksheumaker we are also active on this forumdiscussion (in Dutch) https://gathering.tweakers.net/forum/list_messages/2032302/1

Hey Kevin, could you change this logic to be determined on byte 35? Not all inverters in same type have those start numbers.

35 1=YC600 and 3=QS1

(the 31 and 33 values discussed before)

Inverter ID is officially three digits (conform APSystems info)

QS1 = 802 (US and Canada)
QS1 = 801 (Europe, Middle East and Africa)
YC600-T = 407 (US and Canada)
YC600-Y = 409 (US and Canada)
YC600 = 406 or 408 (Europe, Middle East and Africa)
YC1000-3 = 503 or 504 (US and Canada)
YC1000 = 501 or 502 (Europe, Middle East and Africa)

This is great. I was hoping to get the kWh numbers, I’ll implement that as well.

My plan is to make the integration (it will be pretty easy to install), I’m gonna start working on that today. I’ve made one a couple of years ago, so I have some experience, but I know the APIs have changed a bit. I’ll keep you updated on the progress.

I will also check out the forum, we will see how well google translate does, since I don’t speak Dutch.

Anything need explained, just ask here we’’ ll notice and reply

Has anyone figured out what bits hold this? I’d be happy to add support for all the models. Do we have output from all them to test with? Hopefully at least all the QS1 and YC600 variants use the same data format. :slight_smile:

Hey Kyle! Today I made some improvement on the datasheets (I posted new versions of them). In there you’ll find the bits’n’pieces.

I’m trying to keep up with all info and correct where applicable. Sander is playing with random commands, beware you can mess up the configuration! We need to do more sniffing to retreive other commands and responses (like getting historical data from the ECU-R). Basically we almost have it to start of with! Good practice is not to start too complicated. There’s always room for expansion.:slight_smile:

I should do other stuff at home now but I really want to expand the response datasheet when we ask the ECU-R to return Inverter data. You allready provided most of the info in earlier responses.

I’ve been reading through the forum, google translate does a pretty good job. I should be able to implement all the changes from the datasheet easily enough.

I’m not as concerned with additional commands since once we have the data in home assistant, things like historical data can be pulled from it - since HA will now be logging everything. I don’t think additional commands to the ECU would end up in any integration (unless you find something interesting).

It’s only 9AM here, and sun is actually shining today, so I should make some progress today.

Great, I leave you with it… I agree with you for data logging.

Ok, I have a first pass of an integration done. I’m eager for feedback, suggestion, bug reports, etc.

I’ve put it on github, so you can add it to your system:

There is some documentation there as on how to go about installing it.

Here’s a few screenshots of the sensors available in the developers tool section. I haven’t tried to make a lovelace dashboard yet.

damn youre quick… let me get this done here …
dark here, but sensors do show up pretty nice, YC600 seems no issues like this. Need to wait bit for daylight again


Master values:

PS, whats the polling time you used? default stuff is 60 seconds i though, but of no use in this context i suppose

Glad to here it appears to be working.

Polling time I set to 1 minute. I guess I could make that a config option in the yaml so it could be adjusted.

sure, np

One GUI suggestion:
Power entitie icon could be mdi:solar-power
And the frequency should be the sine-wave
image

wrong sample here, thats the voltage ,not power entity, pls ignore

First dash now:

Question:
you did define a “total_power”: xx in the JSON data, is there an entity created for it?

i should read your READ.ME first, sorry (too enthusiastic probably)

this is where i leave it for today:

Looking good!

I pushed an updated version to the repo that changes all the icons, and also adds an ‘interval’ option to the config where you can specify in seconds how often to query the ecu. Default is 60 if it’s left out.

1 Like