-
Notifications
You must be signed in to change notification settings - Fork 6
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
Unexpected error in worker for App pv_opt: #296
Comments
It’s not loading the consumption data correctly. Does the source you are using look correct?
…On 17 Nov 2024 at 08:27 +0000, philicibine ***@***.***>, wrote:
Hi. My PV opt doesnt appear to be charging according to the schedule it sets. Recently for a few mornings I have woken up to the battery being at 20% which is unusual. Having looked in the app daemon error logs i am seeing the following.
07:50:05 WARNING pv_opt: ------------------------------------------------------------
07:50:05 WARNING pv_opt: Unexpected error in worker for App pv_opt:
07:50:05 WARNING pv_opt: Worker Ags: {'id': '28e141cf029f4b3cbc8770702a717b6d', 'name': 'pv_opt', 'objectid': 'b922d7baae0044dc8030cd7835b8036c', 'type': 'scheduler', 'function': <bound method PVOpt.optimise_time of <pv_opt.PVOpt object at 0x7f7c1579d0>>, 'pin_app': True, 'pin_thread': 0, 'kwargs': {'interval': 600, '__thread_id': 'thread-0'}}
07:50:05 WARNING pv_opt: ------------------------------------------------------------
07:50:05 WARNING pv_opt: Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/threading.py", line 1022, in worker
funcref(self.AD.sched.sanitize_timer_kwargs(app, args["kwargs"]))
File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock
return f(*args, **kw)
^^^^^^^^^^^^^^
File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1622, in optimise_time
self.optimise()
File "/usr/lib/python3.11/site-packages/appdaemon/adbase.py", line 35, in f_app_lock
return f(*args, **kw)
^^^^^^^^^^^^^^
File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1694, in optimise
consumption = self.load_consumption(
^^^^^^^^^^^^^^^^^^^^^^
File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 2468, in load_consumption
power = self.riemann_avg(power)
^^^^^^^^^^^^^^^^^^^^^^^
File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 2980, in riemann_avg
dt = x.index.diff().total_seconds().fillna(0)
^^^^^^^
AttributeError: 'NoneType' object has no attribute 'index'
07:50:05 WARNING pv_opt: ------------------------------------------------------------
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
The source is correct. It seems this is an intermittent issue as it is getting the consumption history fine now. That log was from 7.50am this morning.. it then doesn't happen again until 2.55pm and then happens for several runs but stops erroring out at about 3.40pm. Very strange. Don't know what happened. EDIT: Oh wait.... I turned off the power to my sockets this afternoon for DIY work! Doesn't explain the morning log though. Will see what happens tomorrow. Maybe it's an issue with my router? |
It looks like the error is because the consumption array has zero length so it may be that the day isn’t being properly transferred to appDaemon from HA. What is your overall setup? ie what hardware are you running HA on? Are you using the default database (I’ve seen issues with MariaDB)?
…On 17 Nov 2024 at 21:40 +0000, philicibine ***@***.***>, wrote:
The source is correct. It seems this is an intermittent issue as it is getting the consumption history fine now. That log was from 7.50am this morning.. it then doesnt happen again until 2.55pm and then happens for several runs but stops erroring out at about 3.40pm. Very strange. Don't know what happened.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Just checked and i seem to be using sqlite. Overall setup is a pi4 1gb, running solax modbus. |
Yes - that’s the default.
…On 17 Nov 2024 at 22:30 +0000, philicibine ***@***.***>, wrote:
Just checked and i seem to be using sqlite
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
How frequently do you record inverter data?
…On 17 Nov 2024 at 22:30 +0000, philicibine ***@***.***>, wrote:
Just checked and i seem to be using sqlite
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
I think it polls every 30s. Not really sure how to check. Just checked the error logs and it has happened overnight again. Right before it had scheduled a charge. Do you think it might be worth clearing the database? Had a look and my database is only 275mb. Have setup the recorder section in my config.yaml to auto purge but keep 14 days. Not sure if this will make much difference though. The database is recording data every 5 seconds.. which is apparently the default. |
It’ll be in the setup of whatever integration you use to communicate with the inverter
…On 18 Nov 2024 at 07:40 +0000, philicibine ***@***.***>, wrote:
I think it polls every 30s. Not really sure how to check.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Sorry .. I'm using Solax Modbus to communicate with the inverter. It polls every 60s. Which again is the default. The Modbus device I'm using is an esp32 with a modbus TCP gateway flashed onto it |
Good morning. I have seen this error this morning. I guess this is why it isnt charging.
How can i debug this? It does appear to be reading from the inverter ok
|
What inverter firmware version do you have?
…On 19 Nov 2024 at 04:58 +0000, philicibine ***@***.***>, wrote:
Good morning. I have seen this error this morning. I guess this is why it isnt charging.
04:56:45 INFO: Entity: number.solax_timed_charge_start_hours Value: 4.0 Old State: 0.0 New state: 0.0 Diff: 4.0 Tol: 0.0
04:56:45 ERROR: Failed to write charge start hours to inverter
^[c04:56:47 INFO: Entity: number.solax_timed_charge_start_minutes Value: 56.0 Old State: 0.0 New state: 0.0 Diff: 56.0 Tol: 0.0
04:56:47 ERROR: Failed to write charge start minutes to inverter
04:56:50 INFO: Entity: number.solax_timed_charge_end_hours Value: 6.0 Old State: 0.0 New state: 0.0 Diff: 6.0 Tol: 0.0
04:56:50 ERROR: Failed to write charge end hours to inverter
04:56:50 INFO: Inverter already at correct time settings
04:56:50 INFO: Power 6000 = 100.0A at 52.9V
04:56:50 INFO: Inverter already at correct current
04:56:50 INFO: Waiting for inverter Read cycle: 18 seconds
How can i debug this?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi, the issue appears to have resolved itself for now. Will check the firmware version next time I go up into my loft. I did a full reset of the modbus adapter and the pi. It seemed to charge last night. |
Hi. My PV opt doesnt appear to be charging according to the schedule it sets. Recently for a few mornings I have woken up to the battery being at 20% which is unusual. Having looked in the app daemon error logs i am seeing the following.
The text was updated successfully, but these errors were encountered: