Read the statement by Michael Teeuw here.
MMM-DHT22
-
@lif It’s requiring tools no longer available, so dead module. Use something else.
https://github.com/Tom-Hirschberger/MMM-Temperature is what I used when I had a module hooked up to it.
-
@lif It’s requiring tools no longer available, so dead module. Use something else.
https://github.com/Tom-Hirschberger/MMM-Temperature is what I used when I had a module hooked up to it.
Thanks, I’ve given it a try but get an error in the last stage of the installation
~/MagicMirror/modules/MMM-Temperature/scripts $ ./venvWrapper.py --venv-name py-venv --run ./dht22 Traceback (most recent call last): File "/home/pi/MagicMirror/modules/MMM-Temperature/scripts/./dht22", line 6, in <module> import board File "/home/pi/MagicMirror/modules/MMM-Temperature/scripts/py-venv/lib/python3.11/site-packages/board.py", line 51, in <module> from adafruit_blinka.board.raspberrypi.raspi_40pin import * File "/home/pi/MagicMirror/modules/MMM-Temperature/scripts/py-venv/lib/python3.11/site-packages/adafruit_blinka/board/raspberrypi/raspi_40pin.py", line 6, in <module> from adafruit_blinka.microcontroller.bcm283x import pin File "/home/pi/MagicMirror/modules/MMM-Temperature/scripts/py-venv/lib/python3.11/site-packages/adafruit_blinka/microcontroller/bcm283x/pin.py", line 7, in <module> from adafruit_blinka.microcontroller.generic_linux.rpi_gpio_pin import Pin File "/home/pi/MagicMirror/modules/MMM-Temperature/scripts/py-venv/lib/python3.11/site-packages/adafruit_blinka/microcontroller/generic_linux/rpi_gpio_pin.py", line 6, in <module> from RPi import GPIO ModuleNotFoundError: No module named 'RPi'
-
@lif I’m not sure on that, @wishmaster270 (Tom) would know more.
-
Thanks, not the end of the world if I can’t use it.
-
@lif Hi. Great you want to try one of my modules.
Can you try installing a additional python system package with
sudo apt install python3-rpi-lgpio
I tried the scripts on my newly installed system with Bookworm and everything worked as expected.
Maybe the missing package had been installed with something else I installed on my system. -
@wishmaster270 said in MMM-DHT22:
@lif Hi. Great you want to try one of my modules.
Can you try installing a additional python system package with
sudo apt install python3-rpi-lgpio
I tried the scripts on my newly installed system with Bookworm and everything worked as expected.
Maybe the missing package had been installed with something else I installed on my system.Thanks, that was already installed
sudo apt install python3-rpi-lgpio Reading package lists... Done Building dependency tree... Done Reading state information... Done python3-rpi-lgpio is already the newest version (0.6-0~rpt1). 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
This is on Bookworm
-
@lif
That’s strange…Can you try to start with a new, fresh virtual python environment and install the needed libs again?Remove old virtual environment:
rm -rf /home/pi/MagicMirror/modules/MMM-Temperature/scripts/py-venv
Install the needed system libs:
sudo apt -y update && sudo apt -y install python3-venv libgpiod2
Re-Create the virtual environment:
cd ~/MagicMirror/modules/MMM-Temperature/scripts ./venvWrapper.py --verbose --venv-name py-venv --create
Re-Install the libs:
cd ~/MagicMirror/modules/MMM-Temperature/scripts ./venvWrapper.py --venv-name py-venv --install-libs adafruit-circuitpython-dht
Run the test again:
cd ~/MagicMirror/modules/MMM-Temperature/scripts ./venvWrapper.py --venv-name py-venv --run ./dht22
If it fails again. Can you please provide the output of
cd ~/MagicMirror/modules/MMM-Temperature/scripts source py-venv/bin/activate pip freeze deactivate
The output should look something like:
Adafruit-Blinka==8.66.1 Adafruit-Blinka-Raspberry-Pi5-Neopixel==1.0.0rc2 adafruit-circuitpython-busdevice==5.2.13 adafruit-circuitpython-connectionmanager==3.1.5 adafruit-circuitpython-dht==4.0.9 adafruit-circuitpython-requests==4.1.13 adafruit-circuitpython-typing==1.12.2 Adafruit-PlatformDetect==3.83.2 Adafruit-PureIO==1.1.11 binho-host-adapter==0.1.6 lgpio==0.2.2.0 pyftdi==0.57.1 pyserial==3.5 pyusb==1.3.1 rpi-ws281x==5.0.0 RPi.GPIO==0.7.1 sysv-ipc==1.1.0 typing_extensions==4.15.0
-
@wishmaster270 AND you must enable the virtual env in the script if pm2 starts MagicMirror
-
@sdetweil Hi sam. My wrapper script will use the python binary in the virtual environment folder. This way the environment will be activated automatically.
-
@wishmaster270 cool, you have the venv in the module folder