richardzone / homeassistant-dht

Support for Adafruit DHT temperature and humidity sensor
Apache License 2.0
10 stars 7 forks source link

Issue with HA update 2024.06 #133

Open DanieleNeo opened 5 months ago

DanieleNeo commented 5 months ago

I don't know if it's an dht issue but after updating HA to last release dht is not working and I have these in the log

2024-06-22 01:18:23.096 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package adafruit-circuitpython-dht==3.7.0: error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [15 lines of output]
******************************************************************************
* Setup can't determine the value of PAGE_SIZE on your system, so it will
* default to 4096 which may not be correct.
*
* Please report this message and your operating system info to the package
* maintainer listed in the README file.
******************************************************************************
running bdist_wheel
running build
running build_ext
building 'sysv_ipc' extension
creating build
creating build/temp.linux-aarch64-cpython-312
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -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.12 -c common.c -o build/temp.linux-aarch64-cpython-312/common.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.

Thanks D.

fer4droid commented 5 months ago

I have the same issue since yesterday.

599316527 commented 5 months ago

I have the same issue.

Platform error 'sensor' from integration 'dht' - Requirements for dht not found: ['adafruit-circuitpython-dht==3.7.0'].
Core               2024.6.4
Supervisor         2024.06.0
Operating System   12.4
Frontend           20240610.1
bilguun0203 commented 4 months ago

I had the same problem and fixed it by installing gcc, musl-dev, and linux-headers in the homeassistant container.

  1. SSH into HA
  2. Install necessary packages docker exec homeassistant apk add gcc musl-dev linux-headers (Edit: updated command docker exec homeassistant apk add build-base)
  3. (Optional) If you are using Raspberry Pi, add the use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.
  4. Restart HA
DanieleNeo commented 4 months ago

I had the same problem and fixed it by installing gcc, musl-dev, and linux-headers in the homeassistant container.

  1. SSH into HA
  2. Install necessary packages docker exec homeassistant apk add gcc musl-dev linux-headers
  3. (Optional) If you are using Raspberry Pi, add the use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.
  4. Restart HA

Hi @bilguun0203,

thanks for your solution but I'm using HAOS, and I think that this is not working for me. I tried docker exec homeassistant apk add gcc musl-dev linux-headers, but I got "docker command not found".

D.

github-actions[bot] commented 4 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

stegno commented 4 months ago

The same issue. Unfortunately integration doesn't work nomore...

stegno commented 4 months ago

I had the same problem and fixed it by installing gcc, musl-dev, and linux-headers in the homeassistant container.

  1. SSH into HA
  2. Install necessary packages docker exec homeassistant apk add gcc musl-dev linux-headers
  3. (Optional) If you are using Raspberry Pi, add the use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.
  4. Restart HA

I made it, but it did not resolve the issue. Using HAOS.

bilguun0203 commented 4 months ago

I had the same problem and fixed it by installing gcc, musl-dev, and linux-headers in the homeassistant container.

  1. SSH into HA
  2. Install necessary packages docker exec homeassistant apk add gcc musl-dev linux-headers
  3. (Optional) If you are using Raspberry Pi, add the use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.
  4. Restart HA

I made it, but it did not resolve the issue. Using HAOS.

Can you show me the error log related to dht from home assistant logs?

If it's related to installing the sysv_ipc package (which has happened to me since the last home assistant update), the workaround I currently use is to download and extract the source (sysv_ipc-1.1.0.tar.gz) to the homeassistant container and install it manually by using python setup.py install command inside the container. (https://github.com/osvenskan/sysv_ipc/issues/6)

Core            2024.7.3
Supervisor      2024.06.2
Operating System    12.4
Frontend        20240710.0
bilguun0203 commented 4 months ago

I had the same problem and fixed it by installing gcc, musl-dev, and linux-headers in the homeassistant container.

  1. SSH into HA
  2. Install necessary packages docker exec homeassistant apk add gcc musl-dev linux-headers
  3. (Optional) If you are using Raspberry Pi, add the use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.
  4. Restart HA

Hi @bilguun0203,

thanks for your solution but I'm using HAOS, and I think that this is not working for me. I tried docker exec homeassistant apk add gcc musl-dev linux-headers, but I got "docker command not found".

D.

Sorry for the late reply. I'm using HAOS as well, and the docker command runs fine. Did you ssh directly into HAOS using port 22222?

Here is mine:

image

stegno commented 3 months ago

Did anyone find some solution?

Tried to roll-back to previous HA core versions and it did not work for me unfortunately..

Pavel-Demidyuk commented 3 months ago

I had the same problem and fixed it by installing gcc, musl-dev, and linux-headers in the homeassistant container.

  1. SSH into HA
  2. Install necessary packages docker exec homeassistant apk add gcc musl-dev linux-headers
  3. (Optional) If you are using Raspberry Pi, add the use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.
  4. Restart HA

Hi @bilguun0203, thanks for your solution but I'm using HAOS, and I think that this is not working for me. I tried docker exec homeassistant apk add gcc musl-dev linux-headers, but I got "docker command not found". D.

Sorry for the late reply. I'm using HAOS as well, and the docker command runs fine. Did you ssh directly into HAOS using port 22222?

Here is mine:

image

I'm using HAOS, and I'm able to ssh to 22222 port and run docker there, but "apk add gcc musl-dev linux-header" does nothing - still getting same errors:

Unable to install package adafruit-circuitpython-dht==3.7.0: error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/setup.py", line 40, in <module> prober.probe() File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/prober.py", line 138, in probe d["PAGE_SIZE"] = probe_page_size() ^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/prober.py", line 111, in probe_page_size page_size = compile_and_run("probe_page_size.c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/prober.py", line 82, in compile_and_run s = subprocess.Popen(["./prober/foo"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: './prober/foo' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
DanieleNeo commented 3 months ago

I had the same problem and fixed it by installing gcc, musl-dev, and linux-headers in the homeassistant container.

  1. SSH into HA
  2. Install necessary packages docker exec homeassistant apk add gcc musl-dev linux-headers
  3. (Optional) If you are using Raspberry Pi, add the use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.
  4. Restart HA

Hi @bilguun0203, thanks for your solution but I'm using HAOS, and I think that this is not working for me. I tried docker exec homeassistant apk add gcc musl-dev linux-headers, but I got "docker command not found". D.

Sorry for the late reply. I'm using HAOS as well, and the docker command runs fine. Did you ssh directly into HAOS using port 22222? Here is mine: image

I'm using HAOS, and I'm able to ssh to 22222 port and run docker there, but "apk add gcc musl-dev linux-header" does nothing - still getting same errors:

Unable to install package adafruit-circuitpython-dht==3.7.0: error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "<string>", line 2, in <module> File "<pip-setuptools-caller>", line 34, in <module> File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/setup.py", line 40, in <module> prober.probe() File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/prober.py", line 138, in probe d["PAGE_SIZE"] = probe_page_size() ^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/prober.py", line 111, in probe_page_size page_size = compile_and_run("probe_page_size.c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-9on0ybas/sysv-ipc_a5a6d61af134454eaa4f6398e7bb9220/prober.py", line 82, in compile_and_run s = subprocess.Popen(["./prober/foo"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: './prober/foo' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Same problem for me

`Registratore: homeassistant.util.package Fonte: util/package.py:123 Prima occorrenza: 21:57:57 (3 occorrenze) Ultima registrazione: 21:58:40

Unable to install package adafruit-circuitpython-dht==3.7.0: error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-56t85bk2/sysv-ipc_dcf2ff3c836d45e19aad7eb7e60adfb3/setup.py", line 40, in prober.probe() File "/tmp/pip-install-56t85bk2/sysv-ipc_dcf2ff3c836d45e19aad7eb7e60adfb3/prober.py", line 138, in probe d["PAGE_SIZE"] = probe_page_size() ^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-56t85bk2/sysv-ipc_dcf2ff3c836d45e19aad7eb7e60adfb3/prober.py", line 111, in probe_page_size page_size = compile_and_run("probe_page_size.c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-56t85bk2/sysv-ipc_dcf2ff3c836d45e19aad7eb7e60adfb3/prober.py", line 82, in compile_and_run s = subprocess.Popen(["./prober/foo"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: './prober/foo' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. Unable to install package adafruit-circuitpython-dht==3.7.0: error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-2mo8mrna/sysv-ipc_c6d3c3dddcaa4812bbe32bf72c64bb43/setup.py", line 40, in prober.probe() File "/tmp/pip-install-2mo8mrna/sysv-ipc_c6d3c3dddcaa4812bbe32bf72c64bb43/prober.py", line 138, in probe d["PAGE_SIZE"] = probe_page_size() ^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-2mo8mrna/sysv-ipc_c6d3c3dddcaa4812bbe32bf72c64bb43/prober.py", line 111, in probe_page_size page_size = compile_and_run("probe_page_size.c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-2mo8mrna/sysv-ipc_c6d3c3dddcaa4812bbe32bf72c64bb43/prober.py", line 82, in compile_and_run s = subprocess.Popen(["./prober/foo"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: './prober/foo' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. Unable to install package adafruit-circuitpython-dht==3.7.0: error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [19 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-om_x4a0d/sysv-ipc_2c63fe8f949740e3852e3d3c576ed071/setup.py", line 40, in prober.probe() File "/tmp/pip-install-om_x4a0d/sysv-ipc_2c63fe8f949740e3852e3d3c576ed071/prober.py", line 138, in probe d["PAGE_SIZE"] = probe_page_size() ^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-om_x4a0d/sysv-ipc_2c63fe8f949740e3852e3d3c576ed071/prober.py", line 111, in probe_page_size page_size = compile_and_run("probe_page_size.c") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-install-om_x4a0d/sysv-ipc_2c63fe8f949740e3852e3d3c576ed071/prober.py", line 82, in compile_and_run s = subprocess.Popen(["./prober/foo"], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/local/lib/python3.12/subprocess.py", line 1955, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: './prober/foo' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.`

bilguun0203 commented 3 months ago

Found a (cleaner) workaround to the sysv_ipc permission denied problem. The /tmp directory is mounted with the noexec option on HAOS, so it cannot be used for compiling (ref comment). To see the workaround, see the fourth step below.


Here are the complete steps for the workaround:

  1. Access the HAOS shell using one of the following methods:
  2. Access HA container shell docker exec -it homeassistant bash.
  3. Install build dependencies apk add build-base.
  4. Create a new /tmp directory (tmpfs).
    apk add e2fsprogs
    fallocate -l 1G /usr/tmp-disk
    mkfs.ext4 /usr/tmp-disk
    mount -o loop -t ext4 /usr/tmp-disk /tmp
  5. Restart Home Assistant.

Note: If you are using Raspberry Pi and the installation was successful, but failed to read the temperature, try adding use_pulseio=False parameter to the initialization of the DHT sensor in sensor.py at line 191.

stegno commented 3 months ago
  1. Restart Home Assistant.

Unfortunately still no data from sensors.

github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

stegno commented 2 months ago

Issue still not resolved..

github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

stegno commented 2 months ago

issue still not resolved :-(

Iakovosv commented 2 months ago

Same problem here. will there be any solution? it's been months with the problem

github-actions[bot] commented 1 month ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

DanieleNeo commented 1 month ago

But is there any hope that this problem will be solved (if it is considered a problem) or do I have to transfer my DHT sensors to an EspHome solution?

Iakovosv commented 1 month ago

unfortunately the problem remains even after the ha update to 2024.10.2. As an error I get Configuration warnings Platform error 'sensor' from integration 'dht' - Requirements for dht not found: ['adafruit-circuitpython-dht==3.7.0']. It is not convenient for me in the specific case to put esp since I have the rpi4 I tried to manually install the library but could not. Is something happening with an integration update? Στις Σάββατο 12 Οκτωβρίου 2024 στις 02:56:18 μ.μ. EEST, ο χρήστης DanieleNeo @.***> έγραψε:

But is there any hope that this problem will be solved (if it is considered a problem) or do I have to transfer my DHT sensors to an EspHome solution?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

github-actions[bot] commented 3 weeks ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!

Iakovosv commented 3 weeks ago

issue still not resolved

Iakovosv commented 2 weeks ago

will there be a solution or should I stop doing it?

RPatriziDesign commented 2 weeks ago

It is just a microcontroller (raspberry pi) and just a pin, it must work! If I am right in understanding the issue, the IO library is not still compatible with the rest of the environment; however, an official upgrade of the adafruit library probably won't be officially available since reading one wire devices is a consuming task for the system. I am too busy at this time but I will try to do something before the end of Christmas hollyday if no one will fix the issue in the meantime... I can't assure you anithing...

github-actions[bot] commented 5 days ago

There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!