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

Adapter for FoxEss Inverters #810

Open
Wondermusic opened this issue Jan 17, 2023 · 26 comments
Open

Adapter for FoxEss Inverters #810

Wondermusic opened this issue Jan 17, 2023 · 26 comments
Labels
Hardware needed modbus works The Modbus adapter works fine Requested

Comments

@Wondermusic
Copy link

What kind of device or service would you like to see an adapter for?
Fox-ess Inverter

Is the device connected to the internet or only available on a local network?
It is connected to the Internet and is not availabe in local network (in my case the T-Series, other may be also available in LAN).

Is an official App or Website available?
Yes.
Homepage: https://de.fox-ess.com/
Cloudsite: https://www.foxesscloud.com/

Is an official API including documentation available?
I think so, but I'm not sure.

Are other libraries for an integration available?
Ideally in JavaScript/npm, but also other programming languages are interesting, add links please

Is this device already integrated in other Smart Home systems?
Yes in Home Assistant via HACS: https://github.com/macxq/foxess-ha

Is this device already integrated in homebridge? Might the ham adapter in combination with the homebridge plugin be sufficient?
No

@goebel-joerg
Copy link

Would be great to get an adapter for the Fox ess series

@mcm1957
Copy link
Collaborator

mcm1957 commented Jan 30, 2023

@goebel-joerg
Please use Thumbs-Up at first post to show your interest. This allows sorting of Requests by most requested adapters.
See https://github.com/ioBroker/AdapterRequests#how-to-use-this

@Wondermusic
Copy link
Author

@mcm1957
Sorry, haven't got any notifications about new posts.
What do you mean with - Hardware needed? I can test, if that help's.

@mcm1957
Copy link
Collaborator

mcm1957 commented Jan 31, 2023

Hardware Needed is a general marker for potential developers indicating that an implementaion is not (really) possible without access to a matching hardware. Of course this need not be a physical device at the location of a developer - a cooperation with any user having access to a matching hardware will be ok too. In this case access to the webservice could be sufficient too if someone will share access data.

Thanks for your offer to support a potential developer. If someone will start a development he/she will contact you. DO NOT POST ANY ACCESS DATA HERE.

@arneproft
Copy link

I´ve got the Modbus Protocol. Maybe it helps for direct connecting to the Hybrid Inverters from H1 and H3 (incl. AIO) Series. :-)
T-Series and the other non-Hybrids are actually not available.
Cheers!

H3&AIO-H3 Hybrid Inverter modbus Protocol_20220710.pdf
H1-Modbus Register Definitions_Single Phase Hybrid Inverter_V1.01.pdf

@mcm1957 mcm1957 added the modbus sufficient? Is the Modbus Adapter maybe sufficient? label Feb 12, 2023
@Schlicky
Copy link

I have a FOX ESS AIO H3 inverter and i can test the adapter as well.

Here is the Fox Cloud API Document: Fox Cloud API Document

Fox Cloud (FC):
FC provide the broker depending on MQTT V3.1.1 version, allow the account that has been
registered in FC platform and has access to achieve data to subscribe the data info of inverter,
battery and monitor module via MQTT protocol.
The specific scope of authority is authorized and managed by the platform manufacture

@Schlicky
Copy link

Here is a similiar project ... it might help the developers
macxq/foxess-ha - FOX ESS with Home Assistant Integration

@gbackus
Copy link

gbackus commented Jun 15, 2023

Fox Cloud (FC): FC provide the broker depending on MQTT V3.1.1 version, allow the account that has been registered in FC platform and has access to achieve data to subscribe the data info of inverter, battery and monitor module via MQTT protocol. The specific scope of authority is authorized and managed by the platform manufacture

Has anyone tried to use the mqtt client to get data from the FOX Inverter?

@lordheandl
Copy link

Gibt es hierzu schon was neues?
Habe auch einen fox ess h3 wechselrichter und die App dazu ist grauenhaft. Würde gerne die Daten in mein iobroker integrieren. Ein Adapter wäre genial

@forrestfunk
Copy link

Für android gibt es eine schlankere app, nennt sich "energy stats".
Der momentane Weg (bis es vielleicht irgendwann einen nativen adapter gibt) ist über den modbus zu gehen. Ich empfehle hierzu in diesem Thread quer zu lesen:
https://www.photovoltaikforum.com/thread/178210-erfahrungen-mit-fox-ess/?pageNo=207

@DutchmanNL
Copy link
Collaborator

hat schonmal jemand probiert die API aus zu lesen, laut Dokumentation ist es ein MQTT api diese sollte man theoretisch auch mit dem MQTT adapter auslesen können. Ich habe gerade einen Kunden wo ein Fox ESS converter verbaut ist, leider noch nicht in betrieb genommen.

Sobald dieser in betrieb ist werde ich auch mal schauen was man machen kan das wird aber noch ein wenig dauern

@lordheandl
Copy link

Endlich DutchmanNL nimmt sich der Sache an. Dann gibt es bald einen Adapter🙏

@mcm1957
Copy link
Collaborator

mcm1957 commented Sep 20, 2023

diese sollte man theoretisch auch mit dem MQTT adapter auslesen können

Den mqtt Adapter gibt es bereits :-)

@lolmeister77
Copy link

lolmeister77 commented Nov 10, 2023

Ich konnte hier die Cloud API von Fox ESS finden:
https://www.foxesscloud.com/i18n/en/OpenApiDocument.html

//Edit: API Keys lassen sich hier anlegen:
https://www.foxesscloud.com/user/center

@DutchmanNL
Copy link
Collaborator

Ich konnte hier die Cloud API von Fox ESS finden:

https://www.foxesscloud.com/i18n/en/OpenApiDocument.html

Vielen Dank, das hilft und die api ist gut dokumentiert

"Before using this api, please go to the api management of the cloud platform personal center to generate your apikey."

Währe der nächste Schritt für einen Entwickler (ich habe dieses Gerät nicht und auch keinen Zugang zu jemanden der es hat)

Ich arbeite gerade an einem zentralen Modul um derartige API einfacher in einen ioBroker Adapter zu integrieren, diese API währe ein potenzieller Kandidat

@lolmeister77
Copy link

In der Dokumentation ist ein Beispiel Python Script, welches inkl API Key auf Anhieb funktioniert.:

 python foxwrtest.py
'status_code:200'
('content:b\'{"errno":0,"msg":"success","result":[{"datas":[{"unit":"kW","name":"PV1Power","variable":"pv1Power","value":0.0},{"unit":"kW","name":"PV2Power","variable":"pv2Power","value":0.0},{"unit":"%","name":"SoC","variable":"SoC","value":81.0}],"time":"2023-11-12 '
 '19:16:15 CET+0100","deviceSN":"XXXXXXXXXXXX"}]}\'')

Ich bekomme beim Testen nur recht schnell die Meldung:

'status_code:200'
('content:b\'{"errno":40400,"msg":"Your requests are too frequent. Please try '
 'again later"}\'')

Zusätzlich scheint man bei Fox nur 20 Calls pro Tag frei zu haben. Wenn ich einen API Key anlege sehe ich wie viele Abfragen noch zur Verfügung stehen.

@GonzoTheNose
Copy link

Ich konnte hier die Cloud API von Fox ESS finden:
https://www.foxesscloud.com/i18n/en/OpenApiDocument.html

Vielen Dank, das hilft und die api ist gut dokumentiert

"Before using this api, please go to the api management of the cloud platform personal center to generate your apikey."

Währe der nächste Schritt für einen Entwickler (ich habe dieses Gerät nicht und auch keinen Zugang zu jemanden der es hat)

Ich arbeite gerade an einem zentralen Modul um derartige API einfacher in einen ioBroker Adapter zu integrieren, diese API währe ein potenzieller Kandidat

Habe das Device und kann Tests dazu ausführen.

@DutchmanNL
Copy link
Collaborator

@GonzoTheNose @lolmeister77

Das problem was ich hier sehe sind dis API abfragen (max 20 pro tag) wodurch ich eine Implementierung dieser API als nicht wirklich sinnvoll interpretiere. Man koennte im grunde maximal jede stunden einmalig die API ihre daten ermitteln.

Wir sollten das klarstellen ehe ein API adapter entsteht mit ungewünschten Effekten.

Endlich DutchmanNL nimmt sich der Sache an. Dann gibt es bald einen Adapter🙏

Mein Kunde hat nur leider die integration auf naestes Jahr verschoben daher habe ich keinen Zugang zu einem system um es mir an zu schauen grr

Fox Cloud (FC): FC provide the broker depending on MQTT V3.1.1 version, allow the account that has been registered in FC platform and has access to achieve data to subscribe the data info of inverter, battery and monitor module via MQTT protocol. The specific scope of authority is authorized and managed by the platform manufacture

Has anyone tried to use the mqtt client to get data from the FOX Inverter?

Was anyone able to communicate by MQTT to the device ? As mentioned (in German) above the API has a 20 call rate limit.
If we are able to connect locally (which is also my preference on top of an web API) it would be more suistanable.

@GonzoTheNose
Copy link

@GonzoTheNose @lolmeister77

Das problem was ich hier sehe sind dis API abfragen (max 20 pro tag) wodurch ich eine Implementierung dieser API als nicht wirklich sinnvoll interpretiere. Man koennte im grunde maximal jede stunden einmalig die API ihre daten ermitteln.

Wir sollten das klarstellen ehe ein API adapter entsteht mit ungewünschten Effekten.

Endlich DutchmanNL nimmt sich der Sache an. Dann gibt es bald einen Adapter🙏

Mein Kunde hat nur leider die integration auf naestes Jahr verschoben daher habe ich keinen Zugang zu einem system um es mir an zu schauen grr

Fox Cloud (FC): FC provide the broker depending on MQTT V3.1.1 version, allow the account that has been registered in FC platform and has access to achieve data to subscribe the data info of inverter, battery and monitor module via MQTT protocol. The specific scope of authority is authorized and managed by the platform manufacture

Has anyone tried to use the mqtt client to get data from the FOX Inverter?

Was anyone able to communicate by MQTT to the device ? As mentioned (in German) above the API has a 20 call rate limit. If we are able to connect locally (which is also my preference on top of an web API) it would be more suistanable.

Die Rahmenbedingungen sind mir bekannt und damit kann ich leben...

@lolmeister77
Copy link

Ich bin zwischenzeitlich doch auf die lokale Modbus Schnittstelle gewechselt, da man hier Werte in Echtzeit bekommt.
Ein Ticket, welche weiteren lokalen Abfragen noch möglich sind, ist bis jetzt noch bei Fox offen.
Ich denke trotzdem, dass ein Adapter, der die täglichen Statistiken abrufen kann, sinnvoll wäre.
Ich habe vom Fox Support erfahren, dass Anfang 2024 eine neue "Version" der Cloud kommen soll. Vielleicht ändern sich dann auch die Limitierungen.

@DutchmanNL
Copy link
Collaborator

Ich bin zwischenzeitlich doch auf die lokale Modbus Schnittstelle gewechselt, da man hier Werte in Echtzeit bekommt.
Ein Ticket, welche weiteren lokalen Abfragen noch möglich sind, ist bis jetzt noch bei Fox offen.
Ich denke trotzdem, dass ein Adapter, der die täglichen Statistiken abrufen kann, sinnvoll wäre.

wuerdest du deine Modus Konfiguration als template bereits stellen damit andere es auch einfacher übernehmen können (Modus ist nicht jedermann sein ding)

Ich habe vom Fox Support erfahren, dass Anfang 2024 eine neue "Version" der Cloud kommen soll. Vielleicht ändern sich dann auch die Limitierungen.

man müsste die requirements fuel einen adapter durchnehmen, abrufen von Statistiken macht so sinn ein wirklich live daten verbrauch eher weniger

@lolmeister77
Copy link

lolmeister77 commented Nov 21, 2023

Das ist das Holding-Register, was ich aktuell verwende.
Frei übernommen von:
https://github.com/StealthChesnut/HA-FoxESS-Modbus

`_address	name	description	unit	type	len	factor	offset	formula	role	room	poll	wp	cw	isScale
30000	foxess_inv1_model	Inverter Model		string	1						true	false	false	false
30016	foxess_inv1_master_version	Master Version		uint16be	1	0,01					false	false	false	false
30018	foxess_inv1_manager_version	Manager Version		uint16be	1	0,01					false	false	false	false
30019	foxess_inv1_bms_version	BMS Version		uint16be	1						false	false	false	false
30020	foxess_inv1_battery_1_version	Battery 1 Version		uint16be	1						false	false	false	false
30021	foxess_inv1_battery_2_version	Battery 2 Version		uint16be	1						false	false	false	false
30022	foxess_inv1_battery_3_version	Battery 3 Version		uint16be	1						false	false	false	false
31000	foxess_inv1_pv1_voltage	PV1 Voltage	V	int16be	1	0,1					true	false	false	false
31001	foxess_inv1_pv1_current	PV1 Current	A	int16be	1	0,1					true	false	false	false
31002	foxess_inv1_pv1_power	PV1 Power	kW	int16be	1	0,001					true	false	false	false
31003	foxess_inv1_pv2_voltage	PV2 Voltage	V	int16be	1	0,1					true	false	false	false
31004	foxess_inv1_pv2_current	PV2 Current	A	int16be	1	0,1					true	false	false	false
31005	foxess_inv1_pv2_power	PV2 Power	kW	int16be	1	0,001					true	false	false	false
31006	foxess_inv1_grid_voltage_R	RVolt	V	int16be	1	0,1					true	false	false	false
31007	foxess_inv1_grid_voltage_S	SVolt	V	int16be	1	0,1					true	false	false	false
31008	foxess_inv1_grid_voltage_T	TVolt	V	int16be	1	0,1					true	false	false	false
31009	foxess_inv1_inv_current_R	RCurrent	A	int16be	1	0,1					true	false	false	false
31010	foxess_inv1_inv_current_S	SCurrent	A	int16be	1	0,1					true	false	false	false
31011	foxess_inv1_inv_current_T	TCurrent	A	int16be	1	0,1					true	false	false	false
31012	foxess_inv1_inv_power_R	Rpower	kW	int16be	1	0,001					true	false	false	false
31013	foxess_inv1_inv_power_S	Spower	kW	int16be	1	0,001					true	false	false	false
31014	foxess_inv1_inv_power_T	TPower	kW	int16be	1	0,001					true	false	false	false
31015	foxess_inv1_grid_frequency	Grid Frequency	Hz	int16be	1	0,01					false	false	false	false
31016	foxess_inv1_eps_voltage_R	EPS RVolt	V	int16be	1	0,1					false	false	false	false
31017	foxess_inv1_eps_voltage_S	EPS SVolt	V	int16be	1	0,1					false	false	false	false
31018	foxess_inv1_eps_voltage_T	EPS TVolt	V	int16be	1	0,1					false	false	false	false
31019	foxess_inv1_eps_current_R	EPS Rcurrent	A	int16be	1	0,1					false	false	false	false
31020	foxess_inv1_eps_current_S	EPS Scurrent	A	int16be	1	0,1					false	false	false	false
31021	foxess_inv1_eps_current_T	EPS Tcurrent	A	int16be	1	0,1					false	false	false	false
31022	foxess_inv1_eps_power_R	EPS RPower	kW	int16be	1	0,001					false	false	false	false
31023	foxess_inv1_eps_power_S	EPS SPower	kW	int16be	1	0,001					false	false	false	false
31024	foxess_inv1_eps_power_T	EPS TPower	kW	int16be	1	0,001					false	false	false	false
31025	foxess_inv1_eps_frequency	EPS Frequency	Hz	int16be	1	0,01					false	false	false	false
31026	foxess_inv1_meter1_power_R	Meter RPower	kW	int16be	1	0,001					true	false	false	false
31027	foxess_inv1_meter1_power_S	Meter SPower	kW	int16be	1	0,001					true	false	false	false
31028	foxess_inv1_meter1_power_T	Meter TPower	kW	int16be	1	0,001					true	false	false	false
31029	foxess_inv1_load_power_R	Load RPower	kW	int16be	1	0,001					true	false	false	false
31030	foxess_inv1_load_power_S	Load SPower	kW	int16be	1	0,001					true	false	false	false
31031	foxess_inv1_load_power_T	Load TPower	kW	int16be	1	0,001					true	false	false	false
31032	foxess_inv1_inverter_temperature	Inverter Temperature	°C	int16be	1	0,1					true	false	false	false
31033	foxess_inv1_ambient_temperature	Inner Temperature	°C	int16be	1	0,1					true	false	false	false
31034	foxess_inv1_inv_battery_voltage	InvBatVolt	V	int16be	1	0,1					false	false	false	false
31035	foxess_inv1_inv_battery_current	InvBatCurrent	A	int16be	1	0,1					false	false	false	false
31036	foxess_inv1_battery_power	InvBatPower	kW	int16be	1	0,001					true	false	false	false
31037	foxess_inv1_battery_temperature	Battery Temp	°C	int16be	1	0,1					true	false	false	false
31038	foxess_inv1_battery_soc	Battery Soc	%	int16be	1	1					true	false	false	false
31039	foxess_inv1_bms_charge_rate	BMS Max Charge Current	A	int16be	1	0,1					false	false	false	false
31040	foxess_inv1_bms_discharge_rate	BMS Max Discharge Current	A	int16be	1	0,1					false	false	false	false
31041	foxess_inv1_state_code	Inverter State Code		int16be	1						true	false	false	false
31044	foxess_inv1_fault_1_code	Inverter Fault 1 Code		int16be	1						false	false	false	false
31045	foxess_inv1_fault_2_code	Inverter Fault 2 Code		int16be	1						false	false	false	false
31046	foxess_inv1_fault_3_code	Inverter Fault 3 Code		int16be	1						false	false	false	false
31047	foxess_inv1_fault_4_code	Inverter Fault 4 Code		int16be	1						false	false	false	false
31048	foxess_inv1_fault_5_code	Inverter Fault 5 Code		int16be	1						false	false	false	false
31049	foxess_inv1_fault_6_code	Inverter Fault 6 Code		int16be	1						false	false	false	false
31050	foxess_inv1_fault_7_code	Inverter Fault 7 Code		int16be	1						false	false	false	false
31050	foxess_inv1_fault_8_code	Inverter Fault 8 Code		int16be	1						false	false	false	false
32000	foxess_inv1_pv_energy_total	PV Energy Total	kWh	uint32be	1	0,1					true	false	false	false
32002	foxess_inv1_pv_energy_today	PV Energy Today	kWh	uint16be	1	0,1					true	false	false	false
32003	foxess_inv1_charge_energy_total	Charge Energy Total	kWh	uint32be	1	0,1					true	false	false	false
32005	foxess_inv1_charge_energy_today	Charge EnergyToday	kWh	uint16be	1	0,1					true	false	false	false
32006	foxess_inv1_discharge_energy_total	Discharge Energy Total	kWh	uint32be	1	0,1					true	false	false	false
32008	foxess_inv1_discharge_energy_today	Discharge Energy Today	kWh	uint16be	1	0,1					true	false	false	false
32009	foxess_inv1_feed_in_energy_total	Feed In Energy Total	kWh	uint32be	1	0,1					true	false	false	false
32011	foxess_inv1_feed_in_energy_today	Feed In EnergyToday	kWh	uint16be	1	0,1					true	false	false	false
32012	foxess_inv1_grid_consumption_energy_total	Grid Consumption Energy Total	kWh	uint32be	1	0,1					true	false	false	false
32014	foxess_inv1_grid_consumption_energy_today	Grid Consumption Energy Today	kWh	uint16be	1	0,1					true	false	false	false
32015	foxess_inv1_output_energy_total	Output Energy Total	kWh	uint32be	1	0,1					false	false	false	false
32017	foxess_inv1_output_energy_today	Output EnergyToday	kWh	uint16be	1	0,1					false	false	false	false
32018	foxess_inv1_input_energy_total	Input Energy Total	kWh	uint32be	1	0,1					false	false	false	false
32020	foxess_inv1_input_energy_today	Input Energy Today	kWh	int16be	1	0,1					false	false	false	false
32021	foxess_inv1_load_energy_total	Load Energy Total	kWh	uint32be	1	0,1					false	false	false	false
32023	foxess_inv1_load_energy_today	Load Energy Today	kWh	int16be	1	0,1					false	false	false	false
41000	foxess_inv1_work_mode	Work Mode		int16be	1	1					false	false	false	false
41007	foxess_inv1_max_charge_current	Max Charge Current	A	int16be	1	0,1					false	false	false	false
41008	foxess_inv1_max_discharge_current	Max Discharge Current	A	int16be	1	0,1					false	false	false	false
41009	foxess_inv1_min_soc	Min SoC	%	int16be	1	1					false	false	false	false
41010	foxess_inv1_max_soc	Max Soc	%	int16be	1	1					false	false	false	false
41011	foxess_inv1_min_soc_on_grid	Min SoC (On Grid)	%	int16be	1	1					false	false	false	false

@JayVee2
Copy link

JayVee2 commented Mar 18, 2024

Hiet hat einer in Python schon gute Arbeit geleistet:

https://pypi.org/project/foxesscloud/0.2.7/#description

@mcm1957 mcm1957 added modbus works The Modbus adapter works fine and removed modbus sufficient? Is the Modbus Adapter maybe sufficient? labels Mar 19, 2024
@CPU-6502
Copy link

CPU-6502 commented Apr 5, 2024

@DutchmanNL : Ich habe bei mir einen FOX ESS H3 sowie iobroker auf Raspberry Pi am Laufen. Bin gerne bereit dich bei der Entwicklung/Test zu unterstützen!

Stefan

@gbackus
Copy link

gbackus commented Apr 5, 2024

Da wäre ich sofort mit an Board mit meinem FOX ESS F3000.
Diese dämliche Cloud ist im Moment das letzte Puzzlestück, das in meiner ioBroker-Heimsteuerung fehlt.

@kohennigs
Copy link

kohennigs commented Jul 6, 2024

Moin Moin!

Mein H3 und ich sind bei unter der Sonne 🤭 und ich versuche mich gerade zu orientieren was in Richtung iobroker gerade geht und wo man was machen / ich evtl helfen kann.

Bin hab ich aber gestern erst die API Doku entdeckt.

Laut API Doku hat sich da was getan:

Da steht was von real-time data und:

Each inverter under a single account has a total of 1440 interface calls per day.
The query interface is limited to once per second, and mach interface is calculated separately.
Inserting update interfaces is limited to once every 2 seconds, and each interface is calculated separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware needed modbus works The Modbus adapter works fine Requested
Projects
None yet
Development

No branches or pull requests