What about the LAN port? (Now enabled) #25
Replies: 18 comments 40 replies
-
What software are you using to poke the MODBUS LAN interface, I tried a few things, but guessing I didnt know what to do. |
Beta Was this translation helpful? Give feedback.
-
I did try the LAN port first, but couldn't get any data from it. I've just retried with your suggestions and I'm getting the same. I'll do some more digging in this to switch over to prefer a TCP/IP based approach, and have the direct wired connection as a backup. Thanks for raising this @mdt3k - I'd written it off as a bad implementation/interface! |
Beta Was this translation helpful? Give feedback.
-
Overnight I did see some other values in the 44k registers. They were only present for single 15-second periods, and they look a lot like bit-fields, so I'm now pretty confident that they are status information. It's possible the box latches them until they're read rather than them being fleeting, this also begs the question whether them being read by the wifi-dongle resets them. The other values I saw in the 44k registers were:
|
Beta Was this translation helpful? Give feedback.
-
Thread to capture identified registers: 31022 unknown_8 - Battery draw / discharge, in W. wraps around from 0 to 65535 to go negative indicating charge rate in W |
Beta Was this translation helpful? Give feedback.
-
Just to check I assume that the wifi dongle supplied by fox can’t be interfaced yet? If I want that to stay in can I add another so I can keep the wifi dongle in place and us RS232? James |
Beta Was this translation helpful? Give feedback.
-
Hi I have just had an H1 inverter installed and really keen to be able to get the data from it locally, as I want to be able to use the data in my own dashboards. Ultimately I want it in Home Assistant, but I haven't been able to access the data at all yet. I tried the Node-Red code on a docker version on my network above and got error messages, so not sure I am doing it correctly. Any help much appreciated, otherwise I will look at the WIFI/LAN RS485 module, but not sure how I connect the cables to the COM port..? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi, New here, had a fox system for a year now, and the software/cloud is a total joke... Im reading this as i have been looking for something local, and because i dont like the idea of the setup being tweakable from the net (its chinese and the way things are right now i would rather it be disconnected form the net). Now i read this and notice you are talking to registers through the rs485, which i had thought of playing with, but then i would have to reverse engineer codes and such as you have done... thinking about this, this whole setup is not running on http sockets, two expensive to maintain... its not working via incomming http requests, as most routers would block incomming and a handshake would be needed to grab the IP which will more than likely be dynamic from provider. So the only way it can be working and in a way thats scalable without costs for socket servers, would be polling. Long polling is more than likely how its working, wiht a preset DNS/IP to send its poll to. I would guess the setting of settings then happens this way too, the system polls, gets a response for any cached settings updates (this could be verified by changing battery settings and seeing how long it takes for the settings to change on the inverter. I really think this could be handled all via http over lan, I also guess that the data long polling to a server would be more readable in data form more than likely JSON or a bespoke serialzed dataset of an object/array. Now i have tried sniffing the traffic on the net, looking for the ping and isolating the ip of the wifi dongle, but ive been having trouble finding it. I had a thought, i can hit the wifi dongle on the inverter, and i can access the page to change the connection details it uses to connect to my virgin router, i have done this before. So why not use a proxy? Raspberry PI configured as an wireless access point... then sniff the traffic, should be easier, you could even change the /etc/hosts file to divert all traffic to whatever.com to 127.0.0.1 local address. which you could setup a small API based local server running (i have an MVC stack i could use locally)... this would then have all incomming requests to the access point pi diverted from the preset address/ip it was going to at fox cloud and we could then see whats coming in and work out how to respond, as well how to respond with cached settings updates. I know i can only update battery levels from fox cloud but i also know the installer can change way more remotely. Any thoughts on this? it may allow for a lan based connection over wifi or ethernet and would open up a lot for caching all data, maybe settings changes if thats how its working and connection to the ev setup outside the home through automated pushes of dynamic ip change of the service provider with something like noip and a few incomming network routing options on your router. I do have a few pis lying around, i can butcher my syncthing pi4 to do some tests (foxcloud is going down for a bit my provider told me, and to be honest its up and down like a meerkat looking for trouble on the best of days). ta Paul |
Beta Was this translation helpful? Give feedback.
-
Thank you for all of the inputs and matching up of values. I tweaked the modbus.yaml file in the repo to use the LAN ModBus addresses, and it is working great with HA. BTW, for very simple command line prodding, I used mbpoll. My batteries should be arriving early August, so hoping to make more progress once those are installed. |
Beta Was this translation helpful? Give feedback.
-
@art103 Here you go Richard [Richard Sharpe] [William Eccles] [Richard Sharpe] [William Eccles] |
Beta Was this translation helpful? Give feedback.
-
Quick update - LAN access is being worked on. In addition to the folks above I've got access as well so will be putting this in as an option. |
Beta Was this translation helpful? Give feedback.
-
LAN access now available. If you swap from USB to LAN then your sensors and energy dashboard should continue to work. The same sensor names have been used to make it all work the same way regardless of the connection method choice. |
Beta Was this translation helpful? Give feedback.
-
Perfect timing for the LAN access to become available! Not long after my PV install and just as I'm getting my head around HA and how I can get FoxESS to integrate with it. I was using the Fox Cloud integration for the last week or two, but I'd prefer the Modbus / LAN integration to get more like real-time data. So... I've got some sensors working via the LAN now, but not all. I'm afraid my coding ability is next to zero, so I'm not sure what to look for to see if I've done anything wrong. My grid_daily and feedin_daily figures are both 0kWh. My Grid consumption and FeedIn power are both 0kW. Can anyone help? Separately, once I've got the LAN integration working, how do I delete the previous Fox Cloud integration? I've removed it from HACS but the sensors are still hanging around, albeit all listed as Unavailable. |
Beta Was this translation helpful? Give feedback.
-
Regarding removing the old sensors, you can go to Settings, Devices, Entities and delete them from there.
You may also need to remove it from your .yaml file if you added it manually (I did).
It can take an hour (or two) for the statistics to update, but if you still get zero then there may be some more debugging...
Do you get updates if you add the sensor to a dashboard?
On 6 Aug 2022, 17:21, at 17:21, C00K50N ***@***.***> wrote:
Perfect timing for the LAN access to become available! Not long after
my PV install and just as I'm getting my head around HA and how I can
get FoxESS to integrate with it.
I was using the Fox Cloud integration for the last week or two, but I'd
prefer the Modbus / LAN integration to get more like real-time data.
So... I've got some sensors working via the LAN now, but not all. I'm
afraid my coding ability is next to zero, so I'm not sure what to look
for to see if I've done anything wrong.
My grid_daily and feedin_daily figures are both 0kWh. My Grid
consumption and FeedIn power are both 0kW. Can anyone help?
Separately, once I've got the LAN integration working, how do I delete
the previous Fox Cloud integration? I've removed it from HACS but the
sensors are still hanging around, albeit all listed as Unavailable.
--
Reply to this email directly or view it on GitHub:
#25 (comment)
You are receiving this because you were mentioned.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Depending on how HA has coped with the move to the new sensors (and when the old ones were deleted), you may need to modify the integrations.
My guess is that you now have a grid_consumption2 and feed_in_power2 sensors, which are not used by the grid_consumption_sum and feedin_sum integrations.
This means the old statistics are still trying to use the old Fox Cloud sensors, which are now deleted.
I didn't use HACS (I manually edited the .yaml files), so I'm not sure how to get from where you are now to a working system.
If you can find those entries in configuration.yaml, then it should be an easy update to the _2 versions, otherwise I'll need to defer to a HACS expert :)
August 6, 2022 8:11 PM, "C00K50N" ***@***.*** ***@***.******@***.***>)> wrote:
Thank you! That's the old sensors cleared via Settings > Devices > Entities.
It's been around 7 hours now, and still nothing on those particular sensors. Nothing when I add a gauge or anything to a dashboard though. Others are fine - e.g. PV1-Power, PV2-Power, Load Power all seem to be working fine and have been since I installed the LAN integration.
—
Reply to this email directly, view it on GitHub (#25 (reply in thread)), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AAQPYXJXEL5AN4CLIAS6YR3VX22GHANCNFSM5YIAPM3A).
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@StealthChesnut Thank you for the updated code. I now have Grid Consumption and FeedIn gauges working. And they broadly match the values from the CTs feeding our MyEnergi Zappi which I've used as my measuring stick up to now. Spot on! I see I also now have a Grid CT sensor which I can use to chart grid use, although it seems to be the inverse... See screenshot below - if you look at the right hand end the lilac Grid CT is the inverse of the Load Power: |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Closing this discussion thread as access via the LAN port has now been enabled. Any problems please open an issue. |
Beta Was this translation helpful? Give feedback.
-
I'll be updating the integration to use this, but the default refresh rate
will be at lowest 5s. If you go faster than that home assistant complains
in the logs that you might see performance issues.
…On Sat, 11 Jun 2022, 19:22 mdt3k, ***@***.***> wrote:
Today I have been hammering the LAN port a little. The inverter's
registers are updated every 0.5 seconds; I have not seen a register updated
faster than that (the fastest poll rate I have achieved is 100ms between
requests).
If you want to record 'all' the data the inverter produces, setting the
time between polls to something slightly lower than 0.5 seconds will make
sure nothing is missed.
—
Reply to this email directly, view it on GitHub
<#25 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALFO3FHLK2DRQIB77I6SLMDVOTKODANCNFSM5YIAPM3A>
.
You are receiving this because you were mentioned.Message ID:
<StealthChesnut/HA-FoxESS-Modbus/repo-discussions/25/comments/2929692@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
My H1-5.0-E inverter has a LAN port, in addition to the RS485 port that the WiFi logger dongle connects to.
I decided to connect a computer to it, and discovered the port hosts a ModbusTCP server. I doesn't appear fussy about what equipment address you poke it with (I tried 1 and 247), it will respond to requests for modbus input registers 300-399, and holding registers 30,000-30,027, 31,000-31,038 and 44,000-44,002 (it is possible it will respond to other registers, I only tried every 100th register). The server responds straight away, and the solar-related values change at least every 5 seconds (I have not logged data for a long period at a faster rate than this, when register scanning I queried every 0.25 seconds and this didn't seem to cause any problems). It is interesting (to me at least) that these are not the same register numbers that everyone else is reporting, and they do not seem to contain exactly the same information as available via the WiFi dongle. I have not yet worked up the enthusiasm to create an RS485 break out box, but for now I assume my dongle is working the same as everyone elses.
The registers return the following information:
My decode of registers 31,000-31,038:
All the values appear to be signed, and where a multiplier is listed they are fixed point values (x10 means a reported value of 2 should be interpreted as 0.2, x100 means 2 -> 0.02)
31000 PV1 Voltage x10
31001 PV1 Current x10
31002 PV1 Watts
31003 PV2 Voltage x10
31004 PV2 Current x10
31005 PV2 Watts
31006 Grid Voltage x10
31007 Generated AC Current x10
31008 Generated AC WattsCurrent x10
31009 Grid Frequency Hz x100
31010 unknown_1
31011 unknown_2
31012 unknown_3
31013 unknown_4
31014 Export Watts (negative = importing)
31015 unknown_5
31016 House Usage Watts
31017 unknown_6
31018 Ambient Temperature degrees C x10
31019 Inverter Temperature degrees C x10 (the fox cloud has these values transposed, but that makes no sense)
31020 Inverter Battery Voltage x10
31021 Inverter Battery Current x10
31022 unknown_8
31023 unknown_9
31024 unknown_10
31025 unknown_11
31026 unknown_12
31027 Inverter State (0 = Standby, 1 = (attempting to) Start Generation, 2 = On Grid, other values = ?)
31028 Possibly the “Inverter Mode” from the Fox protocol manuals
31029 Possibly the CT meter type from the Fox protocol manuals
31030 unknown_13
31031 unknown_14
31032 unknown_15
31033 unknown_16
31034 unknown_17
31035 unknown_18
31036 unknown_19
31037 unknown_20
31038 unknown_21
(there is no unknown_7 as I worked out what that was).
Can anyone shed any light on any of the unknown values? In particular the use of registers 300+ and 44000+?
Beta Was this translation helpful? Give feedback.
All reactions