Read the statement by Michael Teeuw here.
MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
-
@psk i use the first command. it woks now.thx!
-
@jsyzthz Glad I could help :D :D
-
Hi, i am really new on this, someone can help me, with the code on config.js file?
{ module: 'MMM-Temperature-Humidity', position: 'bottom_bar', config: { var dht = new rpiDhtSensor.DHT11(21); } },thanks
-
@H3L1o150
No, you need to edit the file node_helper.js in the modules folder
Currently you cannot define the pin and the sensor type in the config section. But I think this should be improved in a future release -
-
I never played around with this module. But I would use this:
{ module: 'MMM-Temperature-Humidity', position: 'top_right' }And then you edit node_helper.js to set for DHT11 or DHT22 and the correct pin in ( )
-
@yawns Tanks for the help
maybe i’m wrong in code. with me show a white screen
-
@H3L1o150 currently, to define the pin to which sensor is connected, you need to edit the
node_helper.jsfile ind MMM-Temperature-Humidity directory and edit line number 12.
var dht = new rpiDhtSensor.DHT11(2);tovar dht = new rpiDhtSensor.DHT11(21);you can leave the config as
{ module: 'MMM-Temperature-Humidity', position: 'bottom_right', config: { refreshInterval: 10000, temperaturePrefix: "Room temperature: ", temperatureSuffix: "°C", humidityPrefix: "Humidity: ", humiditySuffix: "%" } },guess this needs to be improved in future release… :D
Note from admin: Please use Markdown on code snippets for easier reading!
-
Tanks @psk
-
i found MMM cannot auto startup if use it. because it must be run with sudo. but i don’t know how to run sudo with ‘DISPLAY=:0’? @psk
-
-
@jsyzthz Unfortunately neither did I have any luck executing with sudo while using ‘DISPLAY=:0’ .
For auto start I used PM2.
This is my mm.sh file
cd ~/MagicMirror DISPLAY=:0 sudo npm startP.S : I haven’t yet tried this alternative by Bangee. But it sure looks promising in this scenario where we need the mirror to start from ssh(or Terminal) while specifying the display device.
If i come across any workarounds, I’ll update.
Cheers. -
@psk , when i execute your command in my pi3 from putty. will get below error.

-
I’m going to order the dht-22 soon. I was reading about the sensor set up and most guides mention using a resistor. Do you guys have one in your set up?
-
@d3r Dht 22 and 11 series doesnt require one :)
PS: Just saw the post.Was out of town for two weeks…
-
@psk
That depends on the sensor you buy. If you use a sensor with 4 pins you need the resistor. If you use the sensor with 3 pins mounted to a circuit board you don’t need the resistor. -
This was my reference. Both the models are similar, though the one without the PCB(4 pin model) might require some resistance. Not sure though…Need to dig Deeper :D
Cheers :) -
Right. I have the 4 pin version and this requires a resistor
-
This post is deleted! -
Apparently, this project is dead. modules are missing all over the place, and unable to install…
rpi-dht-sensor not found.
npm install falls all over itself.Just a mess.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login