T10-G3 Inverter Status during non-solar hours

talal.hassan01
Posts: 32
Joined: Mon Jul 29, 2024 12:39 am

Hey Dave,

So the change is in and currently here is the stats:
2025-03-02 23:15:20.903 DEBUG (MainThread) [custom_components.foxess.sensor] OA Device Detail System has No Battery: False
2025-03-02 23:15:22.905 DEBUG (MainThread) [custom_components.foxess.sensor] Statetest 3
2025-03-02 23:15:22.906 DEBUG (MainThread) [custom_components.foxess.sensor] Inverter off-line set online flag false for SN: 603********
2025-03-02 23:15:22.906 WARNING (MainThread) [custom_components.foxess.sensor] FoxESS Inverter is off-line, waiting, will retry in 5 minutes
Considering that it is night time right now, I shall post another code block of similar sort tomorrow afternoon as well.

Thanks.
talal.hassan01
Posts: 32
Joined: Mon Jul 29, 2024 12:39 am

Hey Dave,

Apologies for the delay in reverting back. Here are the logs:
[2025-03-04 14:32:19.075 DEBUG (MainThread) [custom_components.foxess.sensor] Main Poll, interval: 603********
[2025-03-04 14:32:19.075 DEBUG (MainThread) [custom_components.foxess.sensor] Statetest 1
[2025-03-04 14:32:19.075 DEBUG (MainThread) [custom_components.foxess.sensor] getRaw OA request: {"sn":"603********" }
[2025-03-04 14:32:20.034 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-04 14:31:37 PKT+0500
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables tsrcv stamp: 1741080697.0, offset: 18000
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-04 14:31:37 PKT+0500 timestamp rcv:1741080697.0
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-04 14:31:37 PKT+0500 vs 2025-03-04 14:32:20.035423 timestamps r:1741080697.0 now:1741080740, age: 43
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables Good Response:
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

talal.hassan01 wrote: Tue Mar 04, 2025 9:48 am Hey Dave,

Apologies for the delay in reverting back. Here are the logs:
[2025-03-04 14:32:19.075 DEBUG (MainThread) [custom_components.foxess.sensor] Main Poll, interval: 603********
[2025-03-04 14:32:19.075 DEBUG (MainThread) [custom_components.foxess.sensor] Statetest 1
[2025-03-04 14:32:19.075 DEBUG (MainThread) [custom_components.foxess.sensor] getRaw OA request: {"sn":"603********" }
[2025-03-04 14:32:20.034 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-04 14:31:37 PKT+0500
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables tsrcv stamp: 1741080697.0, offset: 18000
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-04 14:31:37 PKT+0500 timestamp rcv:1741080697.0
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-04 14:31:37 PKT+0500 vs 2025-03-04 14:32:20.035423 timestamps r:1741080697.0 now:1741080740, age: 43
[2025-03-04 14:32:20.035 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables Good Response:
No problem, that looks perfect now, it's calculated the age of the last sample as 43 seconds (the last sample was 14:31:37 vs actual time of 14:32:20) - it will now accept a sample if it is less than minutes old when the running state has changed to 161.
talal.hassan01
Posts: 32
Joined: Mon Jul 29, 2024 12:39 am

Hey Dave,

I have some observation from today.

I have added the screenshots below, however in summary, the last pull was at 6:53PM when StateTest was 1 and load values were updated as well (from logs), however, HA did not recognize that as an update and went to "Unknown " at 6.23PM.

Snapshot from FoxCloud:
foxcloud.JPG
Logs:
[2025-03-05 18:53:14.676 DEBUG (MainThread) [custom_components.foxess.sensor] Main Poll, interval: 603T*******, 40
[2025-03-05 18:53:14.676 DEBUG (MainThread) [custom_components.foxess.sensor] Statetest 1
[2025-03-05 18:53:14.677 DEBUG (MainThread) [custom_components.foxess.sensor] getRaw OA request: {"sn":"603T*******" }
[2025-03-05 18:53:16.000 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-05 18:34:21 PKT+0500
[2025-03-05 18:53:16.000 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables tsrcv stamp: 1741181661.0, offset: 18000
[2025-03-05 18:53:16.000 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-05 18:34:21 PKT+0500 timestamp rcv:1741181661.0
[2025-03-05 18:53:16.000 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-05 18:34:21 PKT+0500 vs 2025-03-05 18:53:16.000959 timestamps r:1741181661.0 now:1741182796, age: 1135
[2025-03-05 18:53:16.001 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables invalid age: 2025-03-05 18:34:21 PKT+0500 vs 2025-03-05 18:53:16.000959 timestamps r:1741181661.0 now:1741182796, age: 1135

[2025-03-05 18:53:16.001 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables Good Response: [{'unit': 'kW', 'name': 'Load Power', 'variable': 'loadsPower', 'value': 0.72},
[2025-03-05 18:53:16.005 DEBUG (MainThread) [custom_components.foxess.sensor] Var: loadsPower, SN: 603T******* set to 0.72

[2025-03-05 18:53:16.010 DEBUG (MainThread) [custom_components.foxess.sensor] Var: runningState, SN: 603T******* set to 161
[2025-03-05 18:53:16.010 DEBUG (MainThread) [custom_components.foxess.sensor] TestState: 161, hasBat: False online: True
[2025-03-05 18:53:16.010 DEBUG (MainThread) [custom_components.foxess.sensor] Waiting so set off-line state, TestState: 161, hasBat: False online: False

[2025-03-05 18:58:17.471 DEBUG (MainThread) [custom_components.foxess.sensor] OA Device Detail System has No Battery: False
[2025-03-05 18:58:19.477 DEBUG (MainThread) [custom_components.foxess.sensor] Statetest 3
Load Power from HA
loadHA.JPG
Inverter Status from HA
inverterHA.JPG
Running State from HA
runningstateHA.JPG
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

I’ve just had a quick look at the logs for today, there have been some issues with the Foxcloud (quite a few posts about this on the forum) and it looks like this had been interfering with getting data - there were are number of errors on and off, and quite a few at the time your inverter was going off-line.

You can see the data interruptions in your loadpower trace as the cloud went on and off-line.

From your logs this is a sample of some of the (many) errors the Openapi was returning which is why the samples failed.
2025-03-05 13:22:21.640 DEBUG (MainThread) [custom_components.foxess.sensor] OA Device Variables Bad Response: {'errno': 0, 'msg': 'Unrecognized msg:0', 'result':

2025-03-05 13:27:29.232 ERROR (MainThread) [custom_components.foxess.sensor] OA Device Detail Bad Response: {'errno': 0, 'msg': 'Unrecognized msg:0', 'result': {'deviceType': 'T10-G3', 'masterVersion': '1.49', 'afciVersion': '0.00', 'hasPV': True, 'deviceSN': '603Txxxxxx', 'slaveVersion': '1.02', 'hasBattery': False, 'function':
You would be +5hrs on this so the time this was recorded was 18:22:21 and 18:27:29

I think we’ll have to write off today’s data as being a Fox own goal and wait for normal service to resume :(
talal.hassan01
Posts: 32
Joined: Mon Jul 29, 2024 12:39 am

Hi Dave,

Yes you are absolutely right. It was due to Fox Cloud.

Today the inverter decided to stay online and another special case occurred but luckily you have already placed guard rails to handle such situations. :D

So as the inverter state is still online, the StateTest is still showing "1" even at 10PM in the night, however, we also have a check on the Running state, and as the inverter moved to Waiting, the Load Power stopped populating data.

Even though Fox Cloud website shows last pull at 6.35PM, we agreed that it may do another sneaky pull in the background, so HA recorded last value at 6.45PM and then moved to Waiting -> Unknown. One thing to note is that the Running state changed to Waiting at 6.40PM and Load power shows last value populated at 6.45PM, but as the fetch duration is 5mins, I could expect that the value populated at 6.45PM is indeed the "last" one.

In Summary, no red flags, just posting for your awareness & acknowledgement

Screenshots & Logs below:
[2025-03-06 21:59:38.790 DEBUG (MainThread) [custom_components.foxess.sensor] OA Device Detail System has No Battery: False
[2025-03-06 21:59:40.791 DEBUG (MainThread) [custom_components.foxess.sensor] Statetest 1
[2025-03-06 21:59:40.791 DEBUG (MainThread) [custom_components.foxess.sensor] getRaw OA request: {"sn":"603T*******" }
[2025-03-06 21:59:41.558 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-06 18:35:56 PKT+0500
[2025-03-06 21:59:41.564 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables tsrcv stamp: 1741268156.0, offset: 18000
[2025-03-06 21:59:41.564 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-06 18:35:56 PKT+0500 timestamp rcv:1741268156.0
[2025-03-06 21:59:41.564 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables time: 2025-03-06 18:35:56 PKT+0500 vs 2025-03-06 21:59:41.564827 timestamps r:1741268156.0 now:1741280382, age: 12226
[2025-03-06 21:59:41.564 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables invalid age: 2025-03-06 18:35:56 PKT+0500 vs 2025-03-06 21:59:41.564827 timestamps r:1741268156.0 now:1741280382, age: 12226
[2025-03-06 21:59:41.565 DEBUG (MainThread) [custom_components.foxess.sensor] OA Variables Good Response: [{'unit': 'kW', 'name': 'Load Power', 'variable': 'loadsPower', 'value': 0.362}
Inverter Status
inverter.JPG
Running State
runningstate.JPG
Load Power Values
loadpower.JPG
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

Ok great, it’s looking good.

I just took a quick run through the logs, the last valid sample was received from the cloud at 18:35:36, the data sample was 277 seconds old so must have been sent a few minutes before and it was valid.

As the statetest was 1 (on-line) the integration took another sample 5 minutes later at 18:45:36 but the data age was now 580 seconds and as it was runningState 161 it updated just the status, didn’t update the sensors and switched off-line.

I’ll give it a few more days and then update the release to reflect the last manual change you made and that should be a wrap :)
talal.hassan01
Posts: 32
Joined: Mon Jul 29, 2024 12:39 am

Hey Dave,

Things always keep getting interesting! :D

The inverter was stuck on staying On-Line however, the Running State also decided to be stuck on 162: Checking from 6:40PM onwards.
running.JPG
Statetest is also returning 1, but unfortunately, the Load Power etc. values are still populating instead of moving to "Unknown".
load.JPG
Looking forward to your guidance on what could have been the reason now.

Thanks!
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

Ok I had originally included state 162 as an off-line state but there were valid samples in it so as it ‘should’ be a quick transition I allowed it to stay on-line.
Now I have the age test I can include it back in and valid samples will be recorded but if it gets stuck it will switch off-line.
It might be a couple of days before I can get to it, but I’ll post when I’ve got something ready.
talal.hassan01
Posts: 32
Joined: Mon Jul 29, 2024 12:39 am

Sure thing, looking forward to it! :)
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

talal.hassan01 wrote: Mon Mar 17, 2025 1:23 pm Sure thing, looking forward to it! :)
I’ve been testing it on my dev system, it happened yesterday and stayed on ‘162’ overnight and it works fine - i’ll get that included in the next release as soon as I can.
Dave Foster
Posts: 1786
Joined: Thu Oct 13, 2022 7:21 pm

i've just released v0.45 which introduces this last fix to catch the 162 holding state - enjoy :)
Post Reply