Hi,
I would suggest the solution of @sdetweil as well.
An other, but much more complicate version would be to use my PythonLedControl and control it with the MMM-MQTTbridge module.
Hi,
I would suggest the solution of @sdetweil as well.
An other, but much more complicate version would be to use my PythonLedControl and control it with the MMM-MQTTbridge module.
@sdetweil Hi, i did a fresh install and added the module manually. I do not use MMM-PIR-Sensor but some other users had the same problem with MMM-Gestures (which i do not use either). Did a clean install of MagicMirror on a development Pi with your script and added modules manually.
I generally suggest the same as bugsoutnet…The best way would be to use one of the other PIR modules.
But i also found an solution which worked in my setup. I used the sdetweil script to install the current version of MagicMirror.
In the module directory of MMM-PIR-Sensor you need to delete package-lock.json and the node_modules folder:
rm -rf ~/MagicMirror/modules/MMM-PIR-Sensor/node_modules
rm -rf ~/MagicMirror/modules/MMM-PIR-Sensor/package-lock.json
Then you need to replace the whole content of package.json file with the following one that uses the MagicMirror-rebuild library of bugsounet…
{
"name": "Magic-Mirror-Module-PIR-Sensor",
"version": "1.1.0",
"description": "PIR motion sensor module for the Magic Mirror.",
"repository": {
"type": "git",
"url": "git+https://github.com/paviro/MMM-PIR-Sensor"
},
"keywords": [
"magic mirror",
"smart mirror",
"PIR-Sensor",
"module",
"motion"
],
"author": "Paul-Vincent Roll",
"contributors": "https://github.com/paviro/MMM-PIR-Sensor/graphs/contributors",
"license": "MIT",
"bugs": {
"url": "https://github.com/paviro/MMM-PIR-Sensor/issues"
},
"homepage": "https://github.com/paviro/MMM-PIR-Sensor#readme",
"scripts": {
"postinstall": "node_modules/.bin/MagicMirror-rebuild"
},
"dependencies": {
"onoff": "latest",
"magicmirror-rebuild": "latest"
}
}
Then you need to run npm install
npm install
@tanvir586
Hi,
i use MMM-WebView (Repository) to display my NodeRed-Dashboard. Did a quick check and it looks like the Webpage you want to show on your mirror gets displayed.
Maybe you want to give it a try.
Make sure you set the electron options as suggested in the Readme.
I use this configuration:
electronOptions: {
webPreferences: {
webSecurity: false,
webviewTag: true,
}
},
{
module: 'MMM-WebView',
position: 'top_center',
config: {
url: 'https://www.bbc.co.uk/iplayer/live/bbcone',
width: '500px',
height: '1000px',
},
},
Edit: Checked the Mega-Link as well and it works too.
@bkeyport My favorites are BME280 and Htu21 because they are fast and reliable. If a waterproof sensor is needed i only know the DS18B20. My module provides scripts to read the values of all of them.
@willbuden Hi, my MMM-Temperature module support different sensor types. The values get read by calling external python scripts. An example script to read values of DHT11 sensors is included.
@michel-0
Hi, i can provide two possible solutions…
Some time ago i wrote a module which listens to serial sockets and sends notifications based on text messages (MMM-Serial-Notifications) received on the console. My gesture sensors are connected to arduino nano boards (with some additional laser distance sensor) which send messages to the pi via usb. The sketches to program the arduino are provided in the example folder.
As an alternative i recently connected an APDS-9660 sensor directly to my pi (attention 3,3V) and wrote a small python script (gesture.py) which reads the gestures and sends notifications via the HTTP API of MMM-RemoteControl. The script is not documented at the moment but the configuration is separated to second file.
Ich kann zwei Alternativen anbieten.
Vor einiger Zeit hab ich ein Modul geschrieben (MMM-Serial-Notifications) , das an seriellen Konsolen lauscht und anhand von empfangenen Textnachrichten Benachrichtigungen an den Spiegel schickt. Meine Gestensensoren hab ich zusammen mit Laser-Distanz-Sensoren an Arduino Nano Boards angeschlossen, die Nachrichten über USB an den Pi schicken. Die Beispiel-Sketches für die Arduino Programmierung sind im “examples” Ordner enthalten.
Vor ein paar Tagen hab ich einen APDS-9660 Sensor direkt an den Pi angeschlossen (Achtung 3,3V) und ein kleines Python Skript (gesture.py) geschrieben, dass die Gesten ausliest und über die HTTP-API von MMM-RemoteControl an die Module schickt. Das mehr ein Programmierübung war ist das Skript noch nicht wirklich dokumentiert. Die Konfiguration ist aber in eine separate Datei ausgelagert.
For me it worked to install a self compiled version of vips…
sudo apt install -y build-essential libglib2.0 libjpeg9 libopenjp2-7 librsvg2-dev imagemagick libtiff5-dev
wget https://github.com/libvips/libvips/releases/download/v8.12.1/vips-8.12.1.tar.gz
tar xfvz vips-8.12.1.tar.gz
cd vips-8.12.1
./configure
make
sudo make install
sudo ldconfig
npm install
It will take a while to compile the library and a lot of disk space will be used.
@jalibu Hi, danke für das Update. Klappt bei mir super.
Kleine Anmerkung: In der Readme ist ein Tippfehler: “downgradeLhpServerity” muss “downgradeLhpSeverity” sein.
@bugsounet Thanks for this lib. Integrated it into two of my modules yesterday because I couldn’t get them compiled with electron-rebuild.