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

Unable to load since 2022.6 #32

Closed
Minims opened this issue Jun 6, 2022 · 16 comments
Closed

Unable to load since 2022.6 #32

Minims opened this issue Jun 6, 2022 · 16 comments

Comments

@Minims
Copy link
Contributor

Minims commented Jun 6, 2022

Version of the custom_component

Configuration

2022-06-06 08:44:45 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration argon40 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-06 08:44:57 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration argon40: Unable to import component: cannot import name 'SMBus' from 'smbus' (/usr/local/lib/python3.9/site-packages/smbus/__init__.py)
2022-06-06 08:48:25 ERROR (MainThread) [homeassistant.components.automation.argon_one_fan_speed_0_50degc] Argon One: Fan speed 0% (<50°C): Error executing script. Service not found for call_service at pos 1: Unable to find service argon40.set_fan_speed
2022-06-06 08:48:25 ERROR (MainThread) [homeassistant.components.automation.argon_one_fan_speed_0_50degc] Error while executing automation automation.argon_one_fan_speed_0_50degc: Unable to find service argon40.set_fan_speed

Describe the bug

The integration cannot be load because this python module cannot be found :

Unable to import component: cannot import name 'SMBus' from 'smbus' (/usr/local/lib/python3.9/site-packages/smbus/__init__.py

Debug log


Add your logs here.

@Minims
Copy link
Contributor Author

Minims commented Jun 6, 2022

@Misiu
Copy link
Owner

Misiu commented Jun 6, 2022

@Minims yes, I think this is related, since from 2022.6 RPI.GPIO isn't loaded.
Please try adding https://github.com/thecode/ha-rpi_gpio, I hope this will help.
Report back and I'll add a proper description or will continue to investigate.

@Minims
Copy link
Contributor Author

Minims commented Jun 6, 2022

It doesn't help, and I think this is normal.
This integration will be loaded in my custom_component folder, and I think your code will try to load the smbus module from HA core.

3 ideas to check :

  • if ha-rpi_gpio make the job, maybe your code can load the lib from this repo ?
  • you can add a fix version of smbuslib in your repo, update imports and use it ?
  • create a supervisor add-on instead like argon40toMQTTinstead of a hacs integration.

@stale
Copy link

stale bot commented Jul 7, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 7, 2022
@Minims Minims closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2022
@viiy
Copy link

viiy commented Jul 7, 2022

So, unable fix that?

@Misiu
Copy link
Owner

Misiu commented Jul 7, 2022

Didn't have time (newborn at home), I'll try to find time as soon as I can

@Misiu Misiu reopened this Jul 7, 2022
@stale stale bot removed the stale label Jul 7, 2022
@Minims
Copy link
Contributor Author

Minims commented Jul 7, 2022

GPIO need an update since 2022.07.0. See PR #33
If you have issue after upgrading HA, delete and remove the add-on from HACS. It will reinstall the libs.
I think HA uninstall GPIO libs on upgrade

@viiy
Copy link

viiy commented Jul 8, 2022

Didn't have time (newborn at home), I'll try to find time as soon as I can

Сongratulations!

@viiy
Copy link

viiy commented Jul 8, 2022

GPIO need an update since 2022.07.0. See PR #33 If you have issue after upgrading HA, delete and remove the add-on from HACS. It will reinstall the libs. I think HA uninstall GPIO libs on upgrade

Unable to install package RPi.GPIO==0.7.1a4: error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [15 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-cpython-310 creating build/lib.linux-aarch64-cpython-310/RPi copying RPi/init.py -> build/lib.linux-aarch64-cpython-310/RPi creating build/lib.linux-aarch64-cpython-310/RPi/GPIO copying RPi/GPIO/init.py -> build/lib.linux-aarch64-cpython-310/RPi/GPIO running build_ext building 'RPi._GPIO' extension creating build/temp.linux-aarch64-cpython-310 creating build/temp.linux-aarch64-cpython-310/source gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.10 -c source/c_gpio.c -o build/temp.linux-aarch64-cpython-310/source/c_gpio.o error: command 'gcc' failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for RPi.GPIO error: subprocess-exited-with-error × Running setup.py install for RPi.GPIO did not run successfully. │ exit code: 1 ╰─> [17 lines of output] running install /usr/local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build/lib.linux-aarch64-cpython-310 creating build/lib.linux-aarch64-cpython-310/RPi copying RPi/init.py -> build/lib.linux-aarch64-cpython-310/RPi creating build/lib.linux-aarch64-cpython-310/RPi/GPIO copying RPi/GPIO/init.py -> build/lib.linux-aarch64-cpython-310/RPi/GPIO running build_ext building 'RPi._GPIO' extension creating build/temp.linux-aarch64-cpython-310 creating build/temp.linux-aarch64-cpython-310/source gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.10 -c source/c_gpio.c -o build/temp.linux-aarch64-cpython-310/source/c_gpio.o error: command 'gcc' failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> RPi.GPIO note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

@Minims
Copy link
Contributor Author

Minims commented Jul 8, 2022

RPi.GPIO==0.7.1a4 need to be set to 0.7.1 like in my PR. Waiting for merge

@ChrisHaPunkt
Copy link

Confirmed working again with updated dependency

@Misiu
Copy link
Owner

Misiu commented Jul 8, 2022

Thank you for solving this issue. I'll merge the PR and release new version

@Misiu
Copy link
Owner

Misiu commented Jul 10, 2022

A new release is on the way

@viiy
Copy link

viiy commented Jul 11, 2022

HA 2022.7.3 all work!
Thank you!

@Misiu
Copy link
Owner

Misiu commented Jul 11, 2022

@Minims I'm waiting for your feedback before closing this issue.

@Minims
Copy link
Contributor Author

Minims commented Jul 11, 2022

@Misiu All is Ok. Thanks !

@Misiu Misiu closed this as completed Jul 11, 2022
@Misiu Misiu mentioned this issue Jul 21, 2022
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

4 participants