Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control charging based on prices #3

Open
mackewigren opened this issue Mar 25, 2022 · 25 comments
Open

Control charging based on prices #3

mackewigren opened this issue Mar 25, 2022 · 25 comments
Labels
enhancement New feature or request

Comments

@mackewigren
Copy link

Hi
I am about to invest in probably a Huawei inverter. In Homey I know when prices are high and low from my electrical company. Is it possible to control the inverter that when the price is low it should charge instead of having schedules in the inverter? More or less every hour tell the inverter if it is a charging hour or a discharging hour?

@reyntjensw
Copy link
Owner

@mackewigren from what I know this is not possible.
The inverter in my case is only charging with solar power.

You can create a case at Huawei and ask them if the APi has this ability, if so it can be added.

@mackewigren
Copy link
Author

@mackewigren from what I know this is not possible. The inverter in my case is only charging with solar power.

You can create a case at Huawei and ask them if the APi has this ability, if so it can be added.

According to documents I have seen it should be possible to charge with schedules. But I guess maybe not controlled via API.

@reyntjensw
Copy link
Owner

@mackewigren after discussing this with Huawei, there is no way in doing this.

@reyntjensw
Copy link
Owner

reyntjensw commented Oct 11, 2022 via email

@mackewigren
Copy link
Author

Good morning From what I know, charging cannot be controlled with the api. The system makes "intelligent" decisions based on the load. Wouter

Thanks. There are different settings. I have TOU as Operation mode. Then I can define several time slots during the day to control if I should Charge or Discharge. See attached image of example settings. It would be good enough to just have two time slots a day. One for the coming hour and one for the rest. And every hour it should be updated based on a workflow.

It should be possible with MODBUS TCP from what I heard. But I don't know anything about that.

IMG_2500

@reyntjensw
Copy link
Owner

@mackewigren Thanks for the info.
Currently, I'm not sure if I will incorporate ModBus because it seems like they are going to discontinue 3rd party integrations. (https://forum.huawei.com/enterprise/en/forum.php?mod=redirect&goto=findpost&ptid=789585&pid=4632813)

I'll put this one on the backlog

@reyntjensw reyntjensw reopened this Oct 13, 2022
@mackewigren
Copy link
Author

mackewigren commented Oct 26, 2022 via email

@mackewigren
Copy link
Author

Hi, updating this case. Not sure if you got my pdf file in the last update.

As you see below it should nowadays be possible to control charging through the API. This would be very very interesting. I also see that there are more people asking about this.

What do you think about this? For me it would be good enough to be able to set for example two periods at the time. For example

  1. Charge between 02:00 and 06:00 (or for how many hours, 02:00 and 4 hours)
  2. Discharge between 06:00 and 02:00 (or for how many hours, 06:00 and 20 hours)

Every hour when I get new electric prices from Tibber in my case (or Nordpool) I could let homey send new schedules.

What do you say about this?

Best regards

Marcus

iMaster NetEco V600R022C00 Northbound Interface Reference-V7 (SmartPVMS)....pdf

@reyntjensw
Copy link
Owner

Hi @mackewigren

It will not be impossible if you are referring to point 6.3.6.
They have mixed 2 versions of the api in the documentation.

If the request url includes a port like this one, it is not possible.
image

@mackewigren
Copy link
Author

mackewigren commented Nov 11, 2022 via email

@reyntjensw
Copy link
Owner

Hi @mackewigren

If you look at the code (https://github.com/reyntjensw/Homey-FusionSolar/blob/main/drivers/luna/api.js#L6) this is the url I am using to do all the calls, it starts with thirdData. This api is publicly available, the one in the document is not reachable, I think it's created for another platform.

@mackewigren
Copy link
Author

mackewigren commented Dec 13, 2022 via email

@reyntjensw
Copy link
Owner

@mackewigren I right now don't have the time to program this. If someone else has the time, please create a PR.

@trapeze78
Copy link

Hi, I have a Homey, recently bought a LUNA inverter and will soon get som Huawei batterier as well. I share the exact same situation as @mackewigren and will follow this thread closely. Not sure if I am able to program this myself but will dig into the API details as soon as everything is up and running. Option would be to run something using a Home Assistant setup or wait for my electricity company Tibber to get it done themselves but that might take a while. Keep up the good work!

@boboiusa
Copy link

Hi I have had the ability to test this now from Postman. And it works. I could trigger battery charging. I use the same credentials but Huawei needed to ”open” access for this version. So it definitely should be possible. Would you be interested in developing for battery control? Best regards Marcus

------------------------------------------------------------- Marcus Wigren 0733-983138 Rosenvägen 5 23735 Bjärred @.***
11 nov. 2022 kl. 15:23 skrev Wouter Reyntjens @.***>: Hi @mackewigren https://github.com/mackewigren If you look at the code (https://github.com/reyntjensw/Homey-FusionSolar/blob/main/drivers/luna/api.js#L6) this is the url I am using to do all the calls, it starts with thirdData. This api is publicly available, the one in the document is not reachable, I think it's created for another platform. — Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZQJIKHSA4WO26YEXXHLP3WHZJH3ANCNFSM5RTRPOAA. You are receiving this because you were mentioned.

@mackewigren
Hello Marcus.
I will soon get my Huawei battery and is was wondering if you have had any more luck regarding smart charging the battery. I am also from Sweden and it would be great to know what is possible with Huawei batteries today.

Cheers,
Johan

@mackewigren
Copy link
Author

HI boboiusa

I have not tested it more. I dont have enough knowledge on my own I think. But I tested a luttle from Postman just to make sure it is possible through API. But unfortunately I ave not been able to convince the app author to implement this and I have not enough knowledge I think to do it on my own.

I think the only thing the app (or a script) needs to do is

  1. Change charge mode. Three different options. Charge, Discharge, Nothing. This can then be triggered through flows

  2. Could be nice to set electricity price so it would be possible to see revenue in the Fusion Solar app.

The other settings is probably overdoing it. Feed-to-grid or Feed-to-battery can be changed in the Fusion Solar app is my opinion.

So if you want to try to convince the author, just go on :-)

@trapeze78
Copy link

trapeze78 commented Mar 28, 2023 via email

@reyntjensw
Copy link
Owner

If someone can give me the commands, I can try to implement them.

@mackewigren
Copy link
Author

If someone can give me the commands, I can try to implement them.

Hi, I will get back about this in a couple of days. Unless someone else have the time before me. Thanks a lot.

@boboiusa
Copy link

boboiusa commented Apr 1, 2023

Thank you all for trying to get this to work.

Have a nice weekend!

@mackewigren
Copy link
Author

Hi
WIll this be "good enough" as examples? See attached pdf.
Fusion Solar Battery Flow.pdf

@reyntjensw
Copy link
Owner

@mackewigren thanks for the example, I'm first working on a login issue, when that is solved I'll try to work on this.

@mackewigren
Copy link
Author

@mackewigren thanks for the example, I'm first working on a login issue, when that is solved I'll try to work on this.

Just let me know if I can help.

@reyntjensw reyntjensw added the enhancement New feature or request label May 28, 2023
@mackewigren
Copy link
Author

@reyntjensw Hi. Wanted to check if you have had any progress with this? We are many that have “requested” this feature. In different threads.

@reyntjensw
Copy link
Owner

@mackewigren for now this is not on the backlog since the app is not stable.
It does not make sense to develop this if the app is not working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants