Foxess Ess monitor datalog

I was looking dataloggers for my inverter. I found one called NodeRed with a script for Solax which looks very similar but not all the counters display properly.

After spending hours searching I found something on GitHub.

Which details the registers which was an already made package for it to use on this platform. When I changed to the correct sensors in the script and set to FC3 Reading holding registers many counters started to work but a lot of manual work but this platform does everything I want so I am grateful.

I still feel bitter from the way I was treated by the manufacturer. The manual says, ethernet port for pc monitoring or third party monitoring. When I inquired if they do pc monitoring software or recommend a third party appliance they lied to me to say that the ethernet port is a “reserved” port and non functioning. I was very offended like they treat me like I am stupid. When it did in fact work but using Modbus as I discovered using a port scanner port 502.

v0.9

sensors:
input_type: holding
slave: 247
data_type: int16
address: 31000 - name: “PV1-Voltage”
address: 31001 - name: “PV1-Current”
address: 31002 - name: “PV1-Power”
address: 31003 - name: "PV2-Voltage
address: 31004 - name: “PV2-Current”
address: 31005 - name: “PV2-Power”
address: 31006 - name: “RVolt” # Grid Voltage
address: 31007 - name: “RCurrent” # Generated AC Current ?
address: 31008 - name: “31008” # Generated AC Watts ?
address: 31009 - name: “RFreq” # Grid Frequency
address: 31014 - name: “Grid CT”
address: 31016 - name: “Load Power”
address: 31018 - name: “AmbTemp”
address: 31019 - name: “InvTemp”
address: 31020 - name: “BatVolt”
address: 31021 - name: “BatCurrent”
address: 31022 - name: “Battery-Discharge-Power”
address: 31023 - name: “Battery-Temp”
address: 31024 - name: “Battery-SoC”

No inverter 5 to 10m away should require to monitor (wifi stick only) to router and datalog, a phone/ “a stupid app”, broadband, website, account and the manufacturer being in existence as the only means. What good is it if I loose broadband. I was told they only sell Wifi sticks which is a big nono, I would want anything like that wired. Once connected updates will automatically install, another big nono, if goes wrong and fails behind my back then I have to do the chasing as opposed to someone manually doing it (if there is a known fault and requires it) then they have to act straight away. Also I was told you could changes settings like voltages and all sorts of aspects (like my Sunnywebox) from a website over the internet which is a big nono. What if it is compromised, what if Britain goes into conflict with China. Maybe i am paranoid but the point is, I want it private in house and has to function with the datalogger regardless of what happens out there.

I user a separate browser profile for many things to isolate them. Useful to separate cookies and use the bookmark toolbar for related things.

C:\Vivaldi\Application\vivaldi.exe --user-data-dir=“C:\Vivaldi\HomeAssist”

That should work for Chrome as the browser in the screenshot is Vivaldi which is just a dressed up version of Chrome 90 with some nice features to it and adjustments to the user interface.

With my previous solar panel system I was given a Sunnywebbox with a built in webserver that worked for 7 years all the way from Firefox 10? to Chrome 90 until the day I moved out.

I just find it insane why you should go “around the houses” or all the way around the world to do something 5 to 10m away and

Thank you very much. It was either this or no monitoring.

Thanks @MrMobodies I felt the same way about using the FoxESS cloud and, even though there is cloud integration for Home Assistant, I didn’t find the Fox cloud itself too reliable.

However, I also struggled to get this HA-FoxESS-Modbus integration working. I just have the battery, no solar panels and connected to the inverter via the LAN port. Here’s what finally worked for me:

The github repo has the sensors, templates and energy meters in a single configuration file - which I can’t use because my main configuration.yaml contains include files.

Here’s my main configuration.yaml:

default_config:

automation: !include automations.yaml
binary_sensor: !include_dir_merge_list binary/
cover: !include cover.yaml
group: !include groups.yaml
logger: !include logger.yaml
modbus: !include custom_components/HA-FoxESS-Modbus/modbusLAN.yaml
scene: !include scenes.yaml
script: !include scripts.yaml
sensor: !include_dir_merge_list sensor/
shell_command: !include shell.yaml
switch: !include switch.yaml
tts: !include tts.yaml

I added a new sensor yaml file to my /sensor directory

- platform: template
  sensors:

# Two FoxESS template sensors to separate single sensor.battery.power into charge & discharge
    battery_discharge:
      friendly_name: "Battery Discharge"
      device_class: "power"
      unit_of_measurement: "kW"
      value_template: >
            {% if (states('sensor.battery_power') | float(default=0) ) > 0 %}
            {{ states('sensor.battery_power') | float(default=0) * 1 }}
            {% else %}
            0 
            {% endif %}
                      
    battery_charge:
      friendly_name: "Battery Charge"
      device_class: "power"
      unit_of_measurement: "kW"
      value_template: >
            {% if (states('sensor.battery_power') | float(default=0) ) < 0 %}
            {{ states('sensor.battery_power') | float(default=0) * -1 }}
            {% else %}
            0 
            {% endif %}

# Turn power values into energy values for energy dashboard
# Platform: integration: https://www.home-assistant.io/integrations/integration/

- name: "FoxESS Charge"
  platform: integration
  method: left
  round: 2
  source: sensor.battery_charge
  unit_time: h
    
- name: "FoxESS Discharge"
  platform: integration
  method: left
  round: 2
  source: sensor.battery_discharge
  unit_time: h

And finally, I added the last two sensors to my energy dashboard under ‘Home Battery Storage’.

I trimmed down the main modbusLAN.yaml like this

# v0.9
# Created by https://github.com/StealthChesnut/HA-FoxESS-Modbus
# Modbus Config for Fox ESS Hybrid H1 Inverter
# These sensors poll the inverter

- name: HA-FoxESS-Modbus-LAN
  type: tcp
  host: !secret FoxESSInverterIP # set to USR devices ip address
  port: 502
  sensors:

    - name: "Load Power"
      scan_interval: 5
      address: 31016
      state_class: measurement
      unit_of_measurement: "kW"
      data_type: int16
      scale: 0.001
      precision: 3
      input_type: holding    
      device_class: power
      
    - name: "Battery Power"
      scan_interval: 5
      slave: 247
      address: 31022
      state_class: measurement
      unit_of_measurement: "kW"
      data_type: int16
      scale: 0.001
      precision: 3
      input_type: holding    
      device_class: power 
      
    - name: "Inverter Temp"
      scan_interval: 30
      slave: 247
      address: 31019
      state_class: measurement
      unit_of_measurement: "°C"
      data_type: int16
      scale: 0.1
      precision: 1
      device_class: temperature
      input_type: holding    
      
    - name: "Battery Temp"
      scan_interval: 60
      slave: 247
      address: 31023
      state_class: measurement
      unit_of_measurement: "°C"
      scale: 0.1
      precision: 1
      data_type: int16
      input_type: holding
      device_class: temperature
      
    - name: "Battery SOC"
      scan_interval: 30
      slave: 247
      address: 31024
      state_class: measurement
      unit_of_measurement: "%"
      data_type: int16
      input_type: holding
      device_class: battery

Thanks for this is this still working for you or have you updated it as having problems getting my fox setup to display info in ha I’ve got the bits in ha but all shows no info thanks

Yep, all working for me with the above config. I struggled to get anything showing up in HA at first - but I think it was the due to me not knowing how to format the yaml sensors for the sensors inside !include files. I also didn’t need the energy meters contained in the original repo to get the energy dashboard working

Hi @MrMobodies

Could you explain how you could determine the IP-address of your converter?
I connected the ethernet port to an otherwise empty LAN with DHCP, and then tried a IP-scanning tool to find all connected devices
=> Only my own laptop and the router showed up so I guess i need to do some additional setup in the converter?

I went through the settings, and enabled “remote access”, but no success.
Could you explain me what steps you took other than connecting the ethernet-cable?

Many thanks!

I used the fing app on my phone to scan the local network for devices / IP addresses. When I found the MAC address / IP address of the inverter, I assigned it a static IP address from my home router

Just a quick update for anyone jumping here now.

There is a new and more up to date version of this, it scraps the yaml in favour of a more user friendly approach and includes way more features and controls.

You can find more info here:

HI folks, can confirm that this inverter AC1-3.0 is supported by integration?
I’m guessing that is covered by H1 (including AC1 and AIO), but I would like to get confirmation by someone more expert than me :smiley:

Supported models:

* H1 (including AC1 and AIO)
* H3 (including AOI)
* KH