Repository navigation
Feature request: Add Fox ESS EV Charger / L Series support via FoxESS Cloud #375
Replies: 2 comments
|
Hi did you have any follow up on this request. I am keen to adopt and assist where required as I have the same requirements, |
|
Hi @PedroAvelinoSilva and @aschuetze332, We would love to investigate and add support for Fox ESS EV Chargers (such as the L Series) if the required data is accessible via the official FoxESS Cloud OpenAPI! Because FoxESS OpenAPI is primarily documented around inverters and battery storage, the first critical step is finding out:
Diagnostic ScriptBecause the FoxESS Cloud OpenAPI requires MD5 signature generation with timestamps on every request, raw Below is a self-contained Python diagnostic script (uses only standard Python 3 libraries, no extra packages needed). Save this as #!/usr/bin/env python3
"""FoxESS Cloud OpenAPI EV Charger Diagnostic Tool."""
import argparse
import hashlib
import json
import sys
import time
import urllib.request
BASE_URL = "https://www.foxesscloud.com"
def fox_request(token: str, path: str, method: str = "POST", data: dict = None) -> dict:
timestamp = str(round(time.time() * 1000))
# FoxESS requires literal \r\n in signature payload
signature_raw = rf"{path}\r\n{token}\r\n{timestamp}"
signature = hashlib.md5(signature_raw.encode("utf-8")).hexdigest()
headers = {
"token": token,
"lang": "en",
"timestamp": timestamp,
"signature": signature,
"Content-Type": "application/json",
"User-Agent": "FoxESS-HA-EV-Diagnostic/1.0",
"Connection": "close",
}
url = f"{BASE_URL}{path}"
payload = json.dumps(data).encode("utf-8") if data is not None else None
req = urllib.request.Request(url, data=payload, headers=headers, method=method)
try:
with urllib.request.urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode("utf-8"))
except Exception as exc:
return {"error": str(exc)}
def main():
parser = argparse.ArgumentParser(description="FoxESS EV Diagnostic")
parser.add_argument("--token", required=True, help="Your FoxESS Cloud OpenAPI key")
parser.add_argument("--sn", help="Device serial number (charger or inverter)")
parser.add_argument("--stage", default="snapshot", help="Stage tag (e.g. idle, plugged_in, charging)")
args = parser.parse_args()
token = args.token.strip()
# If no SN provided, discover all devices on account
if not args.sn:
print("[1/1] Querying /op/v0/device/list ...")
res = fox_request(token, "/op/v0/device/list", method="POST", data={"currentPage": 1, "pageSize": 50})
print(json.dumps(res, indent=2))
return
sn = args.sn.strip()
stage = args.stage.strip().lower()
print(f"=== Diagnostics for SN {sn} (Stage: {stage}) ===")
# 1. Device Detail
print("\n--- 1. Device Detail (v1) ---")
detail = fox_request(token, f"/op/v1/device/detail?sn={sn}", method="GET")
print(json.dumps(detail, indent=2))
# 2. Real-time variables (v1 query without variable filter to dump all available variables)
print("\n--- 2. Real-time Data (/op/v1/device/real/query) ---")
real_v1 = fox_request(token, "/op/v1/device/real/query", method="POST", data={"sns": [sn]})
print(json.dumps(real_v1, indent=2))
# 3. Real-time variables (v0 fallback)
print("\n--- 3. Real-time Data fallback (/op/v0/device/real/query) ---")
real_v0 = fox_request(token, "/op/v0/device/real/query", method="POST", data={"sn": sn})
print(json.dumps(real_v0, indent=2))
# Save output to a file for easy sharing
filename = f"foxess_{sn}_{stage}.json"
with open(filename, "w", encoding="utf-8") as f:
json.dump({"detail": detail, "real_v1": real_v1, "real_v0": real_v0}, f, indent=2)
print(f"\n[+] Output saved to {filename}")
if __name__ == "__main__":
main()How to run the test across different stages:Step 1: Discover DevicesRun this first to list all registered devices on your Fox Cloud account and identify your EV charger's python3 foxess_ev_diagnostic.py --token YOUR_API_KEYStep 2: Test the EV Charger across different stagesRun the diagnostic with your EV charger SN (
Step 3: Check Inverter PV Linkage (Optional but very helpful)Since the L-Series charger connects directly to the inverter via communication cable, run a check on your inverter SN while the car is actively charging: python3 foxess_ev_diagnostic.py --token YOUR_API_KEY --sn YOUR_INVERTER_SN --stage inverter_during_charge
Looking forward to seeing what the API returns! |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I currently use this integration successfully with my Fox ESS inverter and would like to ask whether support for Fox ESS EV Chargers could be added, if the required data is available through the FoxESS Cloud/OpenAPI.
My system
Background
Fox ESS support has confirmed that the L Series does not currently support Modbus.
Their reply was:
Because of this, local Modbus integration is not possible for this charger.
However, the charger is visible and managed through the Fox ecosystem / Fox apps, so I would like to understand whether any EV Charger data is available through the FoxESS Cloud/OpenAPI and could be exposed by this Home Assistant integration.
Current limitation
The current
foxess-haintegration works well for inverter/PV/battery/grid data, but I do not see any EV Charger entities.There was already a discussion about this here:
The key question seems to be whether the FoxESS OpenAPI exposes EV Charger device data.
Requested entities
Read-only sensors would already be very useful.
If available from the FoxESS Cloud/OpenAPI, I would like to expose:
Control would be nice, but I understand this may not be possible unless the FoxESS OpenAPI provides write endpoints.
Why this would be useful
For L Series owners, Modbus is not available according to Fox ESS support. Therefore, FoxESS Cloud/OpenAPI may be the only realistic way to expose EV Charger data in Home Assistant without replacing the charger.
Even read-only charger data would be useful for:
Data I can provide
I can help with testing and provide:
Thanks for maintaining this integration.
All reactions