Page 1 of 1

How to automate best via HomeAssistant

Posted: Tue Mar 28, 2023 10:56 am
by APfox
Hi, new PV user here :)

Got a couple of questions now the system is running for a week.

For now my H1 is still on a rather old firmware version, which seems to have some issues with manipulating the Time Periods via FoxEss Cloud, but the LAN port still works
Master : 1.44
Slave : 1.02
Manager : 1.39

At the moment I'm getting my FoxEss data in HomeAssistant via the LAN-port on the H1 and the custom integration HA-FoxESS-Modbus, which is working fine for reading data (more or less). The modbus seems to encounter connection losses for shorter and longer periods. Not entirely sure why this is happening though, but it seems not so uncommon when you search the web.

There is a usr-w610 en route so I hope to be able to switch to this solution as I want to be able to control the settings based on different parameters.
My problem lays in the weird power bill calculation in Flanders, Belgium. We are charged on power consumption but also on the use of the grid. This last part has changed and they take now your average peak over 15 minutes in consideration. So basically it comes down to limit your average peak to 2.5 kWh in 15 minutes, which is the strict legally defined minimum. It's a bit more complicated because your yearly use is also a parameter. (In my specific situation I should limit the 15' peak at about 4.2 kWh to avoid a higher bill.)

So the challenge:
Limit the charge current during off peak times (22:00 tot 07:00) to keep below that max peak of 4 kW/15min, but when my PV is active during peak times I want to have the full charging capacity available for charging the battery.

The possibilities are rather limited as there are only 2 Time Periods available
And I don't see a possibility to change the settings via the FoxESS Cloud (i'm a normal end user) to do it manually each morning/evening in the Cloud.
I could go to the inverter and change the setting via the H1, but that's a bit... well yeah you know :roll:

Re: How to automate best via HomeAssistant

Posted: Wed Mar 29, 2023 9:17 am
by calum
For now my H1 is still on a rather old firmware version
Definitely you want to ask your installer to update the firmware, from what I hear elsewhere on this board the latest versions are much better. I have had similar issues to what you describe in this post - I think the earlier firmware versions, when using the ethernet port for modbus data, can cause stability issues.

If you have already got ethernet going to your inverter, I wouldn't go with the W610 which seems to have some performance issues. Better for performance to go for something like the 410S (from the same manufacturer), or even better this Waveshare device if you can get hold of one (cheaper as well!)

If you have a look at this integration you can see it has the ability to write values back to the inverter via Modbus (this is another reason to stop using the ethernet port for data communications with the inverter, you don't have this ability to write back to the inverter using that interface). It's still under development, but in theory you could develop some automations to control the charge periods to achieve part of what you're after.

2.5kWh in 15 minutes would be 10kW which is a very high consumption to sustain, are you really seeing that sort of consumption on a regular basis? I suppose you could have that with an electrically heated shower or something, but that's not something you'd be able to control with the inverter.

I see you have a ECS2900-H3 battery system and a H1-5.0 inverter, which would mean you are limited to 40A (from the inverter spec, page 8) @ 172V (from the battery spec here). 40*172 is 6,880, call it a little over 7kW from the grid, but still well below the 2.5kWh/15 mins threshold you mentioned, and even further below the 4kWh/15 mins.

If you run other things (dishwasher / washing machine / EV charger) during your off peak period you just need to be careful to not run them all at the same time, otherwise you could potentially breach the limits you've mentioned. If for example you were charging your home battery and an EV at the same time, that would be 14kW draw, or 3.5kWh in 15 minutes. So higher than your first threshold, but still lower than the second one...

Re: How to automate best via HomeAssistant

Posted: Wed Mar 29, 2023 9:59 am
by Dave Foster
agree with everything that Calum has said.

That Home Assistant integration and connecting via the RS485 interface is the one that will allow you to meet your goal of disconnecting from the internet.

There are options within the inverter to set the charge/discharge current which could be automated at certain times of day / or certain conditions are true.

Re: How to automate best via HomeAssistant

Posted: Wed Mar 29, 2023 9:43 pm
by APfox
calum wrote: Wed Mar 29, 2023 9:17 am
For now my H1 is still on a rather old firmware version
Definitely you want to ask your installer to update the firmware, from what I hear elsewhere on this board the latest versions are much better. I have had similar issues to what you describe in this post - I think the earlier firmware versions, when using the ethernet port for modbus data, can cause stability issues.
That's kind of difficult if you didn't pay the invoice from the installer yet (it just arrived today tbh)
calum wrote: Wed Mar 29, 2023 9:17 am If you have already got ethernet going to your inverter, I wouldn't go with the W610 which seems to have some performance issues. Better for performance to go for something like the 410S (from the same manufacturer), or even better this Waveshare device if you can get hold of one (cheaper as well!)
There is a 5 port PoE ethernet swith located next to the switch board, so ethernet isn't a problem
I figured the WaveShark might be better after reading the topic you mentioned earlier, so I ordered it too. It should arrive tomorrow, the w610 will only arrive on Monday :)
Just need to figure out how to connect the RS485 to the H1 as that socket seems to be used by the CT meter too, not sure how I can connect the RS485 (I just need to peek to the current connection. I might be lucky en be able to recuperate some non-used wires).
calum wrote: Wed Mar 29, 2023 9:17 am If you have a look at this integration you can see it has the ability to write values back to the inverter via Modbus (this is another reason to stop using the ethernet port for data communications with the inverter, you don't have this ability to write back to the inverter using that interface). It's still under development, but in theory you could develop some automations to control the charge periods to achieve part of what you're after.
I found that integration too and been testing it over ethernet for now, seems to be what I'm looking for in combination with RS485
calum wrote: Wed Mar 29, 2023 9:17 am 2.5kWh in 15 minutes would be 10kW which is a very high consumption to sustain, are you really seeing that sort of consumption on a regular basis? I suppose you could have that with an electrically heated shower or something, but that's not something you'd be able to control with the inverter.

I see you have a ECS2900-H3 battery system and a H1-5.0 inverter, which would mean you are limited to 40A (from the inverter spec, page 8) @ 172V (from the battery spec here). 40*172 is 6,880, call it a little over 7kW from the grid, but still well below the 2.5kWh/15 mins threshold you mentioned, and even further below the 4kWh/15 mins.

If you run other things (dishwasher / washing machine / EV charger) during your off peak period you just need to be careful to not run them all at the same time, otherwise you could potentially breach the limits you've mentioned. If for example you were charging your home battery and an EV at the same time, that would be 14kW draw, or 3.5kWh in 15 minutes. So higher than your first threshold, but still lower than the second one...
true, but this is what my stats gave:
20230329_112049_screenshot.jpg
A full charge from 20% to 100% is absolutely not done. It would kill my bill. (At the moment I can test at will because I've still got an old analogue meter and not the newer digital one. It's with the new ones they charge the so called capacity tariff)
During off peak times I need to spread the charging load from the grid or limit the charging bandwidth. Two Time Periods are just not enough to charge the battery enough in winter time. The RS485 integration should give me some more options.

I know we have to spread our load and so far we're managing it pretty well. There were some difficult situations, but now with the ECS pack, we did not peak above 2 kW/15' (except that one overnight charge).

Re: How to automate best via HomeAssistant

Posted: Thu Mar 30, 2023 1:22 pm
by Dave Foster
APfox wrote: Wed Mar 29, 2023 9:43 pm
I figured the WaveShark might be better after reading the topic you mentioned earlier, so I ordered it too. It should arrive tomorrow, the w610 will only arrive on Monday :)
Just need to figure out how to connect the RS485 to the H1 as that socket seems to be used by the CT meter too, not sure how I can connect the RS485 (I just need to peek to the current connection. I might be lucky en be able to recuperate some non-used wires).
The Waveshare is light years better than the W610, it allows much faster polling (10s for W610, 5s for Waveshark)

The connector with your CT meter allows multiple connections, you need to connect to pins 3 (485B) & 4(485A), to avoid reflections it's best to use either twisted pair or cut the ends off an old CAT5 cable and use that. - The connector is a bit awkward to take apart unless the installer left the tool to do it, but you can use a pair of flat blade screwdrivers in the sides to release the clips and allow it to come apart.
IMG_1298.PNG

Re: How to automate best via HomeAssistant

Posted: Thu Mar 30, 2023 2:14 pm
by calum
A full charge from 20% to 100% is absolutely not done. It would kill my bill. (At the moment I can test at will because I've still got an old analogue meter and not the newer digital one. It's with the new ones they charge the so called capacity tariff)
During off peak times I need to spread the charging load from the grid or limit the charging bandwidth. Two Time Periods are just not enough to charge the battery enough in winter time. The RS485 integration should give me some more options.
I don't really understand why this would be such a problem - as I mentioned previously, if you were charging the battery at the maximum rate allowed by the inverter, you'd be pulling approximately 7kW from your grid connection. From 20% to 100% SoC is just under 7kWh, so your charge time would be around one hour. During that hour, you'd pull approx 1.7kWh from the grid each 15 minutes, a long way below your lower limit. The red line you're highlighting on the graph doesn't really clarify as there are no axes or units.

Long story short - I don't think you have a problem based on what you've told us, unless you're running at least another 2.5kW of electrical loads at the same time as charging your battery.
The Waveshare is light years better than the W610, it allows much faster polling (10s for W610, 5s for Waveshark)

The connector with your CT meter allows multiple connections, you need to connect to pins 3 (485B) & 4(485A), to avoid reflections it's best to use either twisted pair or cut the ends off an old CAT5 cable and use that.
For what it's worth I have a handful of sensors on a 2 second polling rate with my 410S and it works beautifully. I think the W610 is just particularly slow for some reason.
I'm also (currently) using a piece of 2 core flex to connect the COM port to the 410S, although it's barely a metre long and doesn't really go near any other cables. I'll look into changing it for a TP connection, but as Dave says, getting the connector open is quite annoying so it's not a high priority just now.

Re: How to automate best via HomeAssistant

Posted: Wed Apr 05, 2023 2:11 pm
by APfox
Took me about 10 minutes to open the connector. The advice to use 2 flat screwdrivers was handy, but in the end I used an iFixit tool.
So the Waveshare RS485 to PoE ETH (B) has been installed next to the CT Meter in the fuse box. Unfortunately I could not recuperate the unused wires from the CT Meter (they were like 5mm to short), so I had to run 2 cat 6 cables to the device (one for PoE/internet and the other for the RS485 connection)

Now I need to think about the strategy to go from one integration (HA-FoxESS-modbus) to another (foxess_modbus) without creating those silly _2 sensors ;)

Re: How to automate best via HomeAssistant

Posted: Sun Apr 09, 2023 6:54 pm
by APfox
Something odd I noticed: since hooking up the RS485 there were no mysterious disconnections on my LAN-port anymore.
The HA-FoxESS-Modbus integration is running rather stable at the moment since April 5th, but the foxess-modbus integration looks more promising when it comes to managing the PV-system