Foxess Inverter Modbus

New install, mostly working, I connected the ethernet port on my AC1-5.0-E inverter and I can see all the sensors contained in /config/custom_components/HA-FoxESS-Modbus/modbusLAN.yaml

However, I couldn’t just copy / paste this project’s configuration.yaml into my main HA configuration.yaml because I use !includes there (I tried and all my other sensors stopped working).

The important lines of my main HA configuration.yaml look like this:

modbus: !include custom_components/HA-FoxESS-Modbus/modbusLAN.yaml
sensor: !include_dir_merge_list sensor/

I added this project’s configuration.yaml into my sensor directory without any changes and it validates & seems happy after a restart - but no template sensors appear in HA.

Has any one else got this working without pasting the sensors into HA’s main configuration.yaml?

My yaml ability is definitely at the copy / paste level - can anyone point me in the right direction to get these template sensors up and running please?

FWIW, I also have the cloud foxess repository installed which uses the wifi dongle and it seems to co-exist quite happily with this install. I thought there might be an ethernet loop issue - but the wifi and the ethernet port get assigned separate IP addresses (I think).

I much prefer this direct connection method Over the FoxESS cloud integration, but I can’t get the energy sensors working at all.

Any help greatly appreciated.

Hi. Seems like you have a hybrid inverter, which has an entirely different protocol from the T-series inverter described here.
Please have a look at this repo .
It’s a local solution which should work for you.

Oops, sorry I got the two confused - my bad!

Finally, I’ve got it working. I’m wondering if it would make sense to introduce some timeout for “too old” data. What I mean is that even usually those values are pretty low but if inverter shuts down it keeps showing the last known value until next day, like current generation, load, voltage, etc. Or if powered from inverter’s 12V that doesn’t make any sense? (I still power ESP from USB)

Great! Have you figured out why it hadn`t been working before?

Yeah, I’ve been planning to add a “state-sensor” for the inverter, which can be either “online”, “offline” or “alarm” (error). Basically the same as in the Foxess app.
In this case the sensor values will be set to “0” when the inverter is offline.

Just have to find some time :wink:

Yes i see this problem too.
@assembly if You doo this then please send code i test it and write information.

The inverter state isn’t broadcasted over RS485. So unfortunately it isn’t as simple as just reading out an additional register.

I’ve been testing the past week and have “online” and “offline” working already. I’ll still have to check if there are any fault messages send by the inverter to be able to determine the “error” state.

Will hopefully update here this weekend if I get it all working and tested.

Basically, I’ve changed RS485 adapter with the one having automatic flow control. No other changes.

After communication with foxess poland, they say this is mirror copy what is send to USB datalogger

Yes, obviously… the state can be derived from the info within the registers, but isn’t included in a register as a plain and simple value that can be parsed. Some additional code is needed to extract; that goes for esphome as well as the app.
But if you think you can find it directly in a register, by all means share your code with us. Would save me some time.

Ok i don’t have nothing more like in docs where You find in this post on my drive maybee this helps You :slight_smile:
P.S. Guys from poland fox is idiots - sorry :wink:

P.S2 please check: alarm 28 - 10 minutes medium voltage missing
10 - AFCI Comm Fault
Next i try ask foxxe spoland

Uploaded a new version to github.
An additional Esphome sensor is created which can be either
“online”
“offline”
“error”

All of the error messages are captured by the component. They are however only displayed in the esphome logs when there acually is an error.

As I have never had any errors up till now, I would be glad for testers (@Niqu ?)

error_in_log

1 Like

Tested. I have status online offline and waiting for some error.
Yes in modbus error is displayed only when it is. After that error is loged only in foxess cloud until reboot (next day production start)

P.S. small mistae is in yaml file
foxesssensors->inverter_state\ change to foxesssensors->inverter_state, \

Tested and, inverter on line offline but still on T-series power i have some Watts

I’m curious what a typical error looks like. Is it just an error number which you have to look up, or is actually a message with a maximum of 32 characters.

That’s not a mistake, it’s supposed to be like that.

Yes, at this moment that is still supposed to happen, since I do not know what to do with the sensors when the inverter goes offline.

  1. I can’t set them to 0, because for example voltage and frequency of the phases still remains. Setting this to 0 would just be false.

  2. I could set them to “unknown”, which is theoretically correct but isn’t very useful. Sometimes you want to know in the evening how much you produced that day or want to know at what temperature the inverter was running at the end of the day.

  3. I could leave it as it is right now with the last known state displayed. The state sensor being offline tells you that the values are not up to date anymore.

As far as I’m concerned option 3 is actually the best option, however I am conflicted. If someone has a good argument for one of the other options or a better idea on how to go about this than I’m more than happy to change my mind :wink:

Ok that is clear.
For me it’s not interested temperature of inverter ( because i have last logged before off) that same grid freq, voltage etc. but maybe somebody need this so don’t change nothing.

Hmmm PV1 power 0 PV2 power0 T series generation power 59W… Maybe small change in software: if offline and pv1 and pv2 0 t series unavailable ?

@Henry-Sir I’m Getting the same strange values on Generating Power sensor … aprox 65 0000 W. And your code was unable to compilie. I put the screen on @assembly github. Can you help me please ?

At this point I still do not understand how the inverter can know the grid load. For me this value is always 0.

I think because we have DTSU666 Smart Metter like @Henry-Sir mentioned. May you please @assembly commint Henry’s changes on githib ? I have opened issue… actually when i put his *.h file i have some troubles with compilation. ;(