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

**URL:** <https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676>\
**Category:** Apps\
**Tags:** app, homey-pro\
**Created:** [November 24, 2023, 10:31pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676 "2023-11-24T22:31:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 24, 2023, 10:31pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/1 "2023-11-24T22:31:22Z")

</div>

Thread for StecaGrid

> **[StecaGrid](https://homey.app/en-us/app/com.steca.stecagrid/StecaGrid/)**
>
> Coolcept inverters for single-family houses and residential buildings

Feel free to add constructive feedback.

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 24, 2023, 10:37pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/2 "2023-11-24T22:37:00Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 25, 2023, 7:44am UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/3 "2023-11-25T07:44:30Z")

</div>

> [@Kim\_Kokholm](#):
>
> Thank you for your constructive feedback.

For the record, copied this feedback from [my post in an other thread](https://community.homey.app/t/app-pro-power-by-the-hour-insights-per-hour-day-month-and-year/20535/1909):

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?

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 25, 2023, 7:56am UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/4 "2023-11-25T07:56:54Z")

</div>

> [@Kim\_Kokholm](#):
>
> 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.

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](https://community.homey.app/t/help-how-to-create-an-app/58904/8) 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 😀

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 25, 2023, 8:12am UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/5 "2023-11-25T08:12:24Z")

</div>

On measurements page of inverter this is shown:

 ![Inverter Webinterface.jpeg](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/c/bcc8884c3f9c1d07060584ff04db87e455d4d327.png)

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

> document.write(“
> 
> | 
> ### Inverter
> | 
> ### 
> |
> | --- | --- |
> | 
> 
> | Name | Value | Unit |
> | --- | --- | --- |
> | P DC | 58.27 | W |
> | U DC | 500.57 | V |
> | I DC | 0.12 | A |
> | U AC | 231.26 | V |
> | I AC | 0.35 | A |
> | F AC | 50.00 | Hz |
> | P AC | 62.88 | W |
> 
> | |
> 
> ”);

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 25, 2023, 3:20pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/6 "2023-11-25T15:20:31Z")

</div>

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 🙂 and then at off-hours less frequent.  
I could update more often - at what frequence do you suggest?

My readings:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/2/e2617fd5c9a2ad4c66e17576012b64784510be74.png)  
(edited: just realized you are absolutely right, its on W i see and not Wh)

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 25, 2023, 8:57pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/7 "2023-11-25T20:57:20Z")

</div>

> [@Kim\_Kokholm](#):
>
> during my research I did find some people has this working for them:  
> /gen.measurements.table.json

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

> document.write(“
> 
> | 
> ### Inverter
> | 
> ### 
> |
> | --- | --- |
> | 
> 
> | Name | Value | Unit |
> | --- | --- | --- |
> | P DC | — | W |
> | U DC | 1.50 | V |
> | 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

> [@Kim\_Kokholm](#):
>
> Regarding the 2min update:  
> Actually my first thoughts was update more frequent: 06-20 - where the sun is actually possible 🙂 and then at off-hours less frequent.  
> I could update more often - at what frequence do you suggest?

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.

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 26, 2023, 7:33pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/8 "2023-11-26T19:33:08Z")

</div>

@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 🙂

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 26, 2023, 9:06pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/9 "2023-11-26T21:06:18Z")

</div>

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

 ![Schermafbeelding 2023-11-26 om 22.08.54](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/1/91fefee0630c0c3891dcc98fe2da05e2b0e25521.png)

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)

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 26, 2023, 9:59pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/10 "2023-11-26T21:59:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 27, 2023, 6:10am UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/11 "2023-11-27T06:10:52Z")

</div>

I checked again, no difference between those two.

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

> [@Help\\how to create an app](https://community.homey.app/t/help-how-to-create-an-app/58904/8):
>
> ```auto
> const content_p = await response_p.text();
> const start_p = content_p.indexOf('P AC') + 27;
> const tmpFromStart_p = content_p.substring(start_p);
> const end_p = tmpFromStart_p.indexOf('<');
> const tmpDone_p = tmpFromStart_p.substring(0, end_p);
> const dataInt_p = parseInt(tmpDone_p, 10);
> const power = Number.isNaN(dataInt_p) ? 0 : dataInt_p;
> 
> ```

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 27, 2023, 9:33pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/12 "2023-11-27T21:33:58Z")

</div>

@Torch1969 would you mind trying this release:

> **[StecaGrid](https://homey.app/en-dk/app/com.steca.stecagrid/StecaGrid/)**
>
> Coolcept inverters for single-family houses and residential buildings

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 🙂

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 28, 2023, 6:49am UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/13 "2023-11-28T06:49:25Z")

</div>

> [@Kim\_Kokholm](#):
>
> would you mind trying this release

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?

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 28, 2023, 12:16pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/14 "2023-11-28T12:16:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 28, 2023, 4:36pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/15 "2023-11-28T16:36:52Z")

</div>

> [@Kim\_Kokholm](#):
>
> Can you please attach a faulty/no-production-dataset snippet I can use to test my code?

```auto

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>");

```

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

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

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 28, 2023, 7:40pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/16 "2023-11-28T19:40:55Z")

</div>

> [@Torch1969](#):
>
> 910070e3-d5a6-4390-8018-00ea5a90127d

Version 1.1.1 available in test.

> **[StecaGrid](https://homey.app/en-dk/app/com.steca.stecagrid/StecaGrid/)**
>
> Coolcept inverters for single-family houses and residential buildings

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

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 28, 2023, 8:16pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/17 "2023-11-28T20:16:46Z")

</div>

> [@Kim\_Kokholm](#):
>
> 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

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 28, 2023, 8:23pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/18 "2023-11-28T20:23:33Z")

</div>

> [@Torch1969](#):
>
> c693af65-91bd-4810-92b6-add2dd7202b0

Ahhh the new diagnostics are paying off.

This is the URL: [10.10.20.101/gen.measurements.table.js](http://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.

---

<div class="post-metadata">

**Author:** ![Torch1969](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/torch1969/32/33305_2.png) [@Torch1969](https://community.homey.app/u/Torch1969)\
**Post date:** [November 28, 2023, 9:08pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/19 "2023-11-28T21:08:21Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![Kim\_Kokholm](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kim_kokholm/32/91519_2.png) [@Kim\_Kokholm](https://community.homey.app/u/Kim_Kokholm)\
**Post date:** [November 28, 2023, 9:46pm UTC](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676/20 "2023-11-28T21:46:47Z")

</div>

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

[Next page](https://community.homey.app/t/app-pro-stecagrid-get-your-data-from-your-inverter-right-into-homey/95676.md?page=2)
