Collect Ecactus Agave Inverter Solar Data via API & Home Assistant Integration

Hi all,

I’m a newbie to Home Assistant looking to integrate the data from my Solar setup into HA. There is no integration available for this brand yet and I’ve tried using other brands but this has not worked.
I have little to no coding experience, but I have managed to complete the following with some basic information and Postman. I want to know how to retrieve the data before I start messing about in home assistant.

  • I have the OpenAPI document
  • I have the required ID & Password
  • I have the device SN.

Using these I have been able to send a call and generate a user token via postman using a get URL call.
I now wish to use this token to gain access to the data. that the device exports to its native app.

I have the following info to work with form the API document. (Screenshots Attached)



My main issue is with the deviceQueryInfoDto parameter. How do I articulate the values for this?

Also is there a standard value I insert into the value for the end & start parameters

  • end = (end second timestamp) integer(int64)
  • start = (start second timestamp(The time span is the last 1 months)) integer(int64)

There is no information on the token duration. is there a standard protocol on how long this token lasts?

Describe the solution you’d like

  • Access to the data
  • Details on the sensor creation
  • Advice on the next steps

Update:

So I have managed to get a data response from the API using Postman with a significant amount of data. Famine to Feast :sweat_smile:

Can anyone advice on what to do next?

How do I set this connection up in HA?
What is the best way to log the data. (For future use as well as now)
How to beautify it on HA?

Hello,
I am really interested in how you managed to get data responses from the api, I tried postman … and I have to admit that I’m totally lost :wink:
Could you please share some screenshots on postman’s config ?
TIA

Hi, You need you access code and password for the API. This is different to the app login.

When you have this use these to get a user token. Follow the API doc for this.

When you have this you should have all the inputs for the api to return the data to you.

These are
deviceSn
Authorisation (User token)

The timestamp is tricky
i used this to generate the start / end stamps
// Get the current Unix time (in seconds)

const currentTime = Math.floor(Date.now() / 1000);

// Calculate the start time as 301 seconds ago

const startTime = currentTime - 301;

// Save the values to environment variables

pm.environment.set(“currentUnixTime”, currentTime);

pm.environment.set(“startUnixTime”, startTime);

Hi @seaniefield How did you obtain the acces and secret id?

Nice work!

Hi Robin. I contacted ecactus regarding enabling access via HA. They then supplied this information to me and I took it from there myself. This was a very difficult process for someone of my limited coding capabilities.