# How to extend Homey-SolarPanels

**URL:** <https://community.homey.app/t/how-to-extend-homey-solarpanels/63764>\
**Category:** Developers\
**Tags:** app\
**Created:** [May 17, 2022, 9:40pm UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764 "2022-05-17T21:40:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_Stranik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michal_stranik/32/179351_2.png) [@Michal\_Stranik](https://community.homey.app/u/Michal_Stranik)\
**Post date:** [May 17, 2022, 9:40pm UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/1 "2022-05-17T21:40:19Z")

</div>

Hi,

I am using [Homey-SolarPanels](https://github.com/DiedB/Homey-SolarPanels), but it cointains only two values. There is request for extension since 2020 ([Solax battery support · Issue #116 · DiedB/Homey-SolarPanels · GitHub](https://github.com/DiedB/Homey-SolarPanels/issues/116)). But nobody added it. So I wanted to extend it by myself.

I dowloaded code and open Drivers\Solax\Device.js and there is:

_currentEnergy = productionData.result.yieldtoday;_  
_currentPower = productionData.result.acpower;_

I do not understand, where is definition of “result”, because now it is not returning whole data/model.  
It should return all these data:

```auto
{
"success": true,
"exception": "Query success!",
"result": {
"inverterSN": "xxx",
"sn": "xxx",
"acpower": 0,
"yieldtoday": 0,
"yieldtotal": 122.5,
"feedinpower": 0,
"feedinenergy": 3.94,
"consumeenergy": 546.64,
"feedinpowerM2": 0,
"soc": 71,
"peps1": 686,
"peps2": 229,
"peps3": 161,
"inverterType": "5",
"inverterStatus": "107",
"uploadTime": "2022-05-17 23:35:12",
"batPower": -504,
"powerdc1": 0,
"powerdc2": 0,
"powerdc3": null,
"powerdc4": null
}
}

```

Thank you for any advice in advance.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [May 18, 2022, 5:42am UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/2 "2022-05-18T05:42:58Z")

</div>

Did you contact the developer in [[APP][Pro] Solar Panels](https://community.homey.app/t/app-pro-solar-panels/44273)

As I see he is stil working on a new version.

---

<div class="post-metadata">

**Author:** ![Michal\_Stranik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michal_stranik/32/179351_2.png) [@Michal\_Stranik](https://community.homey.app/u/Michal_Stranik)\
**Post date:** [May 18, 2022, 7:21am UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/3 "2022-05-18T07:21:58Z")

</div>

He has request for this since 2020 and its status is on hold.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [May 18, 2022, 7:52am UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/4 "2022-05-18T07:52:20Z")

</div>

I accept that as a No.  
Both your request as the one you refer to don’t mention for which driver the request is as the app supports many brands and models.

Ah sorry i now see solax. Maybe aska again and provide the developer more info as you have a battery and not everyone has one.

---

<div class="post-metadata">

**Author:** ![Michal\_Stranik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michal_stranik/32/179351_2.png) [@Michal\_Stranik](https://community.homey.app/u/Michal_Stranik)\
**Post date:** [May 18, 2022, 8:43am UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/5 "2022-05-18T08:43:24Z")

</div>

I created issue on Github:

> <https://github.com/DiedB/Homey-SolarPanels/issues/194>
>
> I have Solax inverter and I need to use the excess energy. Would be possible to …support it? Basically when:
> \- Solar produce energy 
> \- Battery is full
> \- Load is smaller than Solar 
> It means I have more energy I can consume and for that, I should start other appliance to use it.
> 
> It would help a lot, if app would support/present all 5 items:
> \- solar (how much it produce)
> \- battery (battery level and how much battery charging/discharging)
> \- feed-in (in/out)
> \- load 
> \- inverter is already supported as power
> 
> Thank you.

As it is suggested here:

> **[FAQ](https://diederik.gitbook.io/homey-solar-panels-app/faq)**

But there is zero reaction. Do you have better idea how to contact developer?

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [May 18, 2022, 11:24am UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/6 "2022-05-18T11:24:41Z")

</div>

> [@Michal\_Stranik](#):
>
> productionData.result

It looks like that object contains the information you listed. So to get “feedinenergy” you use productionData.result.feedinenergy.  
So, you will need to create some more capabilities in the device to assign the values to.

---

<div class="post-metadata">

**Author:** ![Michal\_Stranik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michal_stranik/32/179351_2.png) [@Michal\_Stranik](https://community.homey.app/u/Michal_Stranik)\
**Post date:** [May 18, 2022, 1:15pm UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/7 "2022-05-18T13:15:29Z")

</div>

Thanks, but I am stuck anyway. I am not able to use that souce code, because it generate errors when I try to run it.

Therefore I create new project and now I am trying to put it together.

> **[Homey-Solax/com.msd.inverter.solax at main · MichalStranik/Homey-Solax](https://github.com/MichalStranik/Homey-Solax/tree/main/com.msd.inverter.solax)**
>
> main/com.msd.inverter.solax

So far I have driver with form for putting required data, but I don´t know how to save it (finish paring):

> <https://github.com/MichalStranik/Homey-Solax/blob/main/com.msd.inverter.solax/drivers/solax/driver.js>

Is there any other source I can study to learn this (docs/examples)?

I basically need just “simple” app which periodically call endpoint and provide data from it:  
[https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=xxx&sn=yyy](https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=xxx&sn=yyy)  
So it would be possible monitor data and based on its changes generate flows.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [May 18, 2022, 4:20pm UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/8 "2022-05-18T16:20:23Z")

</div>

Looks like you created a new Homey app and just copied the driver? As I see that one was SDK2 recently (11 march) and you could ask @Diederik if he has time to upgrade and help extend the capabilities?  
To be future proof you want that driver upgraded to the new SDK.

> [@\[APP\]\[Pro\] Solar Panels](https://community.homey.app/t/app-pro-solar-panels/44273/82):
>
> Solax should be working, but I need to port it to the new version still. I cannot yet guarantee you if it will make the cut.

---

<div class="post-metadata">

**Author:** ![Michal\_Stranik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michal_stranik/32/179351_2.png) [@Michal\_Stranik](https://community.homey.app/u/Michal_Stranik)\
**Post date:** [May 18, 2022, 7:32pm UTC](https://community.homey.app/t/how-to-extend-homey-solarpanels/63764/9 "2022-05-18T19:32:54Z")

</div>

Ok, I wrote to Diederik there, let´s see if he will have time for it. Thank you.
