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 :)
Read the statement by Michael Teeuw here.
Posts
-
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
-
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@d3r Dht 22 and 11 series doesnt require one :)
PS: Just saw the post.Was out of town for two weeks…
-
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@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. -
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@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!
-
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@jsyzthz Glad I could help :D :D
-
RE: MagicMirror is voted number 1 in the MagPi Top 50!
Awsome!!
@MichMich Great initiative!!Good news for the community!
Cheers People. \m/ -
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@jsyzthz
I’m not sure whether to rebuild in MMM-Temperature-humidity directory or the Magic Mirror directory.
Try executing in the MagicMirror directory first.npm rebuild --runtime=electron --target=1.4.0 --disturl=https://atom.io/download/atom-shell --build-from-sourceAlso you can find the electron version by : npm list
Just in case, i had this in my commands history :D
npm rebuild --runtime=electron --target=1.3.4 --disturl=https://atom.io/download/atom-shell --abi=49 -d -
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@jsyzthz I ran into the same while setting up!
try this. Go to MMM-Temperature-Humidity,
npm rebuild --runtime=electron --target=1.4.0 --disturl=https://atom.io/download/atom-shell --build-from-sourceMy Electron version is 1.4.0. If yours is different, replace accordingly. :D
This is a known issue which is caused by the serialport module using native code that is built for a different version of Node. You can read a bit more about addons here, if you’re interested; they’re just modules written in C/C++ that can interface with Node so the module can interface with the hardware more easily.
Credits : stackoverflow.com
Note from admin: Please use Markdown on code snippets for easier reading!
-
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@Bangee According to bcm2835 v1.50-
"Running as root
Prior to the release of Raspbian Jessie in Feb 2016, access to any peripheral device via/dev/memon the RPi required the process to run as root. Raspbian Jessie permits non-root users to access the GPIO peripheral (only) via/dev/gpiomem, and this library supports that limited mode of operation.If the library runs with effective UID of 0 (ie root), then
bcm2835_init()will attempt to open/dev/mem, and, if successful, it will permit use of all peripherals and library functions.If the library runs with any other effective UID (ie not root), then
bcm2835_init()will attempt to open/dev/gpiomem, and, if successful, will only permit GPIO operations. In particular,bcm2835_spi_begin()andbcm2835_i2c_begin()will return false and all other non-gpio operations may fail silently or crash."So i guess we have run with sudo until some other library comes up :D
PS: I should!! Its too hot in here… :D :D
@cowboysdude Thanks! Cheers :D
-
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
@cowboysdude DHT11 - This is the sensor that I am using.
It has three pins -
+ve - Connected to 5v
-ve - Ground
Data - Connected to pin 2
@Bangee Now, I am running as sudo npm start. Without sudo, it will throw an exception that says it cannot open dev/mem

This is the module screenshot.

-
RE: MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
oops!! I forgot to post the link. My bad :|
The module can be found here.
-
MMM-Temperature/Humidity Module (DHT11, DHT22 and AM2302 sensors.)
Temperature and Humidity monitoring Module for MagicMirror2 that works for DHT11, DHT22 and AM2302 sensors.
Dependancy : rpi-dht-sensor
For some reason, the module requires elevated permissions to run.(sudo npm start).It would be great if someone could help in this regard.
Hope it comes of use to somebody else.
Cheers.
-
RE: Introduce yourself!
Hey guys! greetings from India.
My name is Prasanth, and I’m 24. Used to be a software engineer. Recently, I got a knee injury while playing football,
had to undergo surgery and I’ll on bed rest till January.So hat’s how I came across magic mirror. Oh! the forum!! this is brimming with creativity. so good to be part of it.
I’m new to pi and nodejs and I’ve been following this for 3 weeks now, and the support seems to be amazing. \m/My raspberry pi is on the way :D. Hopefully I will get to setup one for myself. and some day may be contribute to the community.
I’ve seen some voice recognition modules here. so thought of making one myself using IBM’s watson speech to text API.
I’m still working on it. you can find it here.see you around guys. Cheers.