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

AppDaemon HASS plugin incompatible with numpy 2.0.0 #243

Open
swests opened this issue Jun 17, 2024 · 20 comments
Open

AppDaemon HASS plugin incompatible with numpy 2.0.0 #243

swests opened this issue Jun 17, 2024 · 20 comments

Comments

@swests
Copy link

swests commented Jun 17, 2024

Describe the bug
Trying to start the integration after upgrades and get the following, stopping the app from running:
ERROR: id_consumption_today : Neither the entities listed in the YAML sensor.solmod_house_load_today nor the system default of sensor.solmod_house_load_today exist in HA.

Expected behavior
App to start

** Versions**
HA: 2024.06.3
PV_OPT: v3.15.1
Solcast: 4.0.31 (new version)
Solis SolAX Modbus integration

Error in AppDaemon Log:
WARNING pv_opt: Traceback (most recent call last): File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 162, in initialize_app await utils.run_in_executor(self, init) File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor response = future.result() ^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.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 521, in initialize self._load_args() File "/homeassistant/appdaemon/apps/pv_opt/pv_opt.py", line 1205, in _load_args raise ValueError(e) ValueError: id_consumption_today : Neither the entities listed in the YAML sensor.solmod_house_load_today nor the system default of sensor.solmod_house_load_today exist in HA.

I've checked again in HA:
image

@dolce08
Copy link

dolce08 commented Jun 17, 2024

Same issue, started today. Tried rolling back to HA 2024.6.2 but still getting the same error.

@swests
Copy link
Author

swests commented Jun 17, 2024

Rolled back to 2024.05.5 but still the same. App won’t start.

@Bart39
Copy link

Bart39 commented Jun 17, 2024

Same here also for solax house load today

@swests
Copy link
Author

swests commented Jun 18, 2024

Also see this when I restart AppDaemon
WARNING: pv_opt: Entity sensor.pvopt_status not found in namespace default

@fboundy
Copy link
Owner

fboundy commented Jun 18, 2024 via email

@Bart39
Copy link

Bart39 commented Jun 18, 2024 via email

@Bart39
Copy link

Bart39 commented Jun 18, 2024

pv_opt (1).log
error (1).log

Using ha solax modbus - yes it appears to be working

@swests
Copy link
Author

swests commented Jun 18, 2024

Using the Solax solis modus integration and its reporting all entities. Will upload logs shortly

@swests
Copy link
Author

swests commented Jun 18, 2024

I stopped AppDaemon, cleared the logs and restarted AppDaemon. Logs below.

error.log
main.log
pv_opt.log

@swests
Copy link
Author

swests commented Jun 18, 2024

New set of logs. I uninstalled PV_OPT, restarted and then installed the latest, with the default config. Made minor edits to config.yaml to pick up my entities (device_name: solmod). Still get the same issue. Attached config, and logs

error.log
pv_opt.log
main.log
config.yaml.txt

@fboundy
Copy link
Owner

fboundy commented Jun 18, 2024 via email

@swests
Copy link
Author

swests commented Jun 18, 2024

Detailed version info:
HA: 2024.5.5
AppDaemon: 0.16.6
PV_OPT: 3.15.1
OE: 11.0.2
SolaX Inverter Modbus: 2024.05.7
Solcast: 4.0.31 (new repo by BJReplay)
MQTT: 6.4.1

@fboundy
Copy link
Owner

fboundy commented Jun 18, 2024

Thanks for the logs. The issue appears to be with the HASS plugin for AppDaemon as shown in the AppDaemon log here:

09:13:01 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
09:13:01 WARNING AppDaemon: error loading plugin: HASS - ignoring
09:13:01 WARNING AppDaemon: ------------------------------------------------------------
09:13:01 WARNING AppDaemon: Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/appdaemon/plugin_management.py", line 140, in __init__
    mod = __import__(full_module_name, globals(), locals(), [module_name], 0)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/appdaemon/plugins/hass/hassplugin.py", line 14, in <module>
    from deepdiff import DeepDiff
  File "/usr/lib/python3.11/site-packages/deepdiff/__init__.py", line 10, in <module>
    from .diff import DeepDiff
  File "/usr/lib/python3.11/site-packages/deepdiff/diff.py", line 18, in <module>
    from deepdiff.helper import (strings, bytes_type, numbers, uuids, times, ListItemRemovedOrAdded, notpresent,
  File "/usr/lib/python3.11/site-packages/deepdiff/helper.py", line 63, in <module>
    np_float_ = np.float_
                ^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.

09:13:01 WARNING AppDaemon: ------------------------------------------------------------

I may need to raise an issue on the AppDaemon or AppDaemon add-on repos as this isn't a PV_OPT issue.

@fboundy
Copy link
Owner

fboundy commented Jun 18, 2024

This is an incompatibility between the version of deepdiff installed with HA and the 2.0.0 release of numpy.

As a fix please add numpy==1.26.4 to the AppDaemon config page. In due couse I expect versions will be bumped to fix this.

image

@dolce08
Copy link

dolce08 commented Jun 18, 2024

The fix worked. As always thanks for your work and the great integration.

@fboundy
Copy link
Owner

fboundy commented Jun 18, 2024

This is the root cause issue with deepdiff: seperman/deepdiff#464

@fboundy
Copy link
Owner

fboundy commented Jun 18, 2024

Also raised as an issue on the AppDaemon addon: hassio-addons/addon-appdaemon#345

@fboundy fboundy changed the title ERROR: id_consumption_today : Neither the entities listed in the YAML sensor.solmod_house_load_today nor the system default of sensor.solmod_house_load_today exist in HA. AppDaemon HASS plugin incompatible with numpy 2.0.0 Jun 18, 2024
@swests
Copy link
Author

swests commented Jun 18, 2024

Perfect! Thank-you for jumping right in. Working again...

Did you want to keep it open to track the downstream issue?

@stjohncanning
Copy link

Had same issue, now fixed. Thanks for quick response for a great program

@fboundy
Copy link
Owner

fboundy commented Jun 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants