How to extend Homey-SolarPanels

Hi,

I am using Homey-SolarPanels, but it cointains only two values. There is request for extension since 2020 (Solax battery support · Issue #116 · DiedB/Homey-SolarPanels · GitHub). 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:

{
"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.

Did you contact the developer in [APP][Pro] Solar Panels

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

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

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.

I created issue on Github:

As it is suggested here:

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

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.

1 Like

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.

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

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
So it would be possible monitor data and based on its changes generate flows.

1 Like

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.

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