[APP][Pro] StecaGrid - Get your data from your inverter right into Homey

Thread for StecaGrid

Feel free to add constructive feedback.

1 Like

@Torch1969 Thank you for your constructive feedback.

Are you able to access in your setup and are your StecaGrid connected to LAN:
http://< ip >/measurements.xml

IP: ip to your inverter.

And does this show a image?
http://< ip >/gen.screenshot.bmp

Regarding the discovery/device:
You are correct. I could put it in the discovery. I have not thought of people having multiple. In the device, I could add “version”, if software versions differ in the methods of which data is retrieved.

For the record, copied this feedback from my post in an other thread:

Hi @Kim_Kokholm very nice, I have a coolcept 4200 and immediately tried to test this app.

Why did you put the device url in the app settings and not in device advanced settings? It’s a setting of the device, for instance how to configure 2 inverter’s?
My inverter isn’t found (status code 404), could it be the fact it’s in separate VLAN? Can you handle this? Or doesn’t my inverter have the /measurements.xml? Which types of inverter do you support?
Are you sure you didn’t mix up power in W (=measure_power) (which you’re getting from inverter) and energy in Wh (meter_power) which you are using in the app.
Why only update once in 2 minutes?

If I acces http://< ip >/measurements.xml the screen is blank.
If I access http://< ip >/gen.screenshot.bmp the display of the inverter is shown.

In this post you can see which pages I use to get information of inverter.

For me discovery of device isn’t necessary, only move the ip to the device settings would be more appropriate. I have one inverter, my remark is just for future enhancement. If you plan to add discovery, please leave option to give in ip, because in some situations discovery won’t work (cross VLAN).

I am sure I have older version of the stecagrid inverter. So handling different versions would be good enhancement of your app :grinning:

On measurements page of inverter this is shown:

On http:///gen.measurements.table.js this information:

document.write(“

Inverter

NameValueUnit
P DC 58.27W
U DC 500.57V
I DC 0.12A
U AC 231.26V
I AC 0.35A
F AC 50.00Hz
P AC 62.88W
”);

Hi @Torch1969 , during my research I did find some people has this working for them:
/gen.measurements.table.json

Can you please try this out?

I would love to support your hardware as well.
I would still keep the IP in the admin-settings - in the device-add I would add version/models. Our versions are very different.

Regarding the 2min update:
Actually my first thoughts was update more frequent: 06-20 - where the sun is actually possible :slight_smile: and then at off-hours less frequent.
I could update more often - at what frequence do you suggest?

My readings:


(edited: just realized you are absolutely right, its on W i see and not Wh)

Yes it works, same output as /gen.measurements.table.js:

document.write(“

Inverter

NameValueUnit
P DC — W
U DC 1.50V
I DC — A
U AC — V
I AC — A
F AC — Hz
P AC — W
”);

From this page I scrape the energy (=kWh=meter_power) in homeyscript: /gen.yield.day.chart.js

When the inverter is active I would suggest something from 5-10 seconds, because flows using this have to react fast on change of power (for instance for charging/discharging battery).
The reading of energy (on different page) can be done less often, f.i. once a minute. But I think it’s best to make this use configurable (with separate parameter) in device settings.

@Torch1969 can you please paste the exact result of “/gen.measurements.table.json”, since I dont have this endpoint and cannot see the data for myself.

From the names, what values does match:
Production now: <value from your table/interface> +
Internal temperature: <value from your table/interface> +
Voltage: <value from your table/interface> +

I guess your language is NL :slight_smile:

Well, I can’t get it to show the exact text because the html code is interpreted every time.
Here is a picture

Production now is the value after P AC
Temperature is not there
Voltage is U AC
Current is I AC
But values are empty’ now (minus sign)

Just to be clear: /gen.measurements.table.json and /gen.measurements.table.js are provdiing the same result? Please notice the difference with js/json.

I checked again, no difference between those two.

In homeyscript I get the power out of this “string” with the following “high” level code:

@Torch1969 would you mind trying this release:

Please remove your old device after upgrading (or before). Visit the settings-section and restart the app.
During the device-pairing - please do only select your version 4200 - I hope I’ve got it right - testing blindly :slight_smile:

Thanks for putting effort in this.
I was able to add my inverter without problems. After few seconds, status is “error read”. See bug report 910070e3-d5a6-4390-8018-00ea5a90127d
Maybe you don’t handle the three minus sings properly when there is no production?

Thank you for the feedback.

Can you please attach a faulty/no-production-dataset snippet I can use to test my code? I see the crash report. Next I’ve added more stacking.


document.write("<table class='invisible'><tr class='invisible'><th class='invisible'><h3>Inverter</h3></th><th class='invisible'><h3></h3></th></tr><tr class='invisible'><td class='invisible' valign='top' align='center'><table><tr><th>Name</th><th>Value</th><th>Unit</th></tr><tr><td>P DC</td><td align='right'> --- </td><td>W</td></tr><tr><td>U DC</td><td align='right'>   1.10</td><td>V</td></tr><tr><td>I DC</td><td align='right'> --- </td><td>A</td></tr><tr><td>U AC</td><td align='right'> --- </td><td>V</td></tr><tr><td>I AC</td><td align='right'> --- </td><td>A</td></tr><tr><td>F AC</td><td align='right'> --- </td><td>Hz</td></tr><tr><td>P AC</td><td align='right'> --- </td><td>W</td></tr></table></td><td class='invisible' valign='top' align='center'></table></td></tr></table>");

:sweat_smile: finally found a way to copy this code in here….

The error didn’t go away today, even when there was PV production.

Version 1.1.1 available in test.

I am not convinced that I’ve nailed the bug, but added more tracing. Maybe it will sort things out.

Error still there: c693af65-91bd-4810-92b6-add2dd7202b0

Ahhh the new diagnostics are paying off.

This is the URL: 10.10.20.101/gen.measurements.table.js

Please add http:// before 10.10… and try again. Restart the app after applying the settings/configuration.

1 Like

Ah, good diagnosis :-). That solved the error. Next step. The device is greyed out on homey dashboard (like device is out), when clicking on it, I’m getting error (red on top of screen) missing capability listener: alarm_capability.

fe18ab9a-95e4-4c52-bc8a-4666b6e8dbd6

Is the greyed out device intended behaviour? (Because power is zero)?

Please remove device and add/pair again. I’ve added new capabilities.