Great stuff. People shouldn’t discount a faulty PIR either. The one I had on the shelf for ages wasn’t detecting quite right so I ordered another one and the difference in detection is huge. I’m not sure if these have a shelf life or what but yeah, that was my recent experience.
Read the statement by Michael Teeuw here.
Best posts made by jc21
-
RE: MMM-PIR-Sensor tuning
-
MMM-IFTTT - If-This-Then-That Maker Notifications
Description
This is my first module so don’t expect too much :p
This enables realtime notifications from IFTTT to your MagicMirror install, via a JSON POST endpoint of the mirror. Full instructions in the project:
Technically, this module could be used for any webhook service such as Zapier too.
Download
[card:jc21/MMM-IFTTT]
-
RE: Unable to sendSocketNotification from node_helper to Module
Wow that is not obvious or documented.
However, that worked :) Thanks heaps!
-
RE: Issues with electron.js on installation
Try:
sudo npm install -g electron
If you get any errors with that command then something needs fixing outside of the MagicMirror package and installation.
-
RE: MMM-PiLights - Control a LPD8806 Led Strip on a Raspberry Pi
This guide should cover it. Although that is for older raspberry pi models but still worth a read.
For raspberry pi 3 I’ve connected the pins [DI to 20] and [CI to 24] as labelled in this image.
-
RE: MMM-IFTTT - If-This-Then-That Maker Notifications
Update: Added support for my new MMM-Sounds module. Notification integration instructions are in the updated MMM-IFTTT readme.
-
RE: MMM-PIR-Sensor tuning
@shgmongohh I have forked the original
MMM-Pir-Sensor
repo and made some mods to debug my own sensor last week.https://github.com/jc21/MMM-PIR-Sensor
If you add
debug: true
to the config of my forked code, you’ll get console info about when the sensor detects motion and when it doesn’t. Also note, I’ve renamed thesensorPIN
config item tosensorGpio
to more accurately indicate the numeric determination.[MMM-PIR] [2016-10-04 09:31:07] Watching on GPIO #25 ... [MMM-PIR] [2016-10-04 09:34:15] Motion no longer detected [MMM-PIR] [2016-10-04 09:34:15] Turning Screen OFF in 30 seconds [MMM-PIR] [2016-10-04 09:34:18] Motion detected [MMM-PIR] [2016-10-04 09:34:18] Not turning monitor ON, its already ON
-
RE: MMM-IFTTT - If-This-Then-That Maker Notifications
@paulocarrasco Pull again now.
Made the noob mistake of not testing, I wasn’t near my mirror at the time. All good now.
Latest posts made by jc21
-
RE: MMM-PiLights - Control a LPD8806 Led Strip on a Raspberry Pi
@schmo90 It should work fine, there is no logic prior to that switch that filters possible values.
What does the server console log report after the text
[PiLights] Incoming:
?req.query.sequence
should contain the string name of the sequence you’re requesting. -
RE: MMM-PiLights - Control a LPD8806 Led Strip on a Raspberry Pi
Hi schmo90, good to see you’re contributing :)
Assuming your tests with
curl -X GET "http://yourmagicmirror/PiLights?sequence=blue_pulse"
still don’t work, I think I’d need to see all of your changes. If you’ve forked my repo on github can you please link it? -
RE: MMM-PIR-Sensor tuning
Great stuff. People shouldn’t discount a faulty PIR either. The one I had on the shelf for ages wasn’t detecting quite right so I ordered another one and the difference in detection is huge. I’m not sure if these have a shelf life or what but yeah, that was my recent experience.
-
RE: MMM-PIR-Sensor tuning
Sounds like you’re on top of that then.
Just fyi, the latest code for the original pir sensor module will rebuild the compiled dependencies for you as part of the
npm install
command in the module. There should be no reason to run npm rebuild manually unless you get those pesky “expected version xx but got xx” errors. -
RE: MMM-PIR-Sensor tuning
@open_book Very strange, it seems the module is trying to activate/deactive the monitor using the Relay, but you haven’t specified a relay to use.
I have noticed however, that
sensorPIN
of3
shouldn’t work. This variable is incorrectly named, it is not actually the pin number of the header, but the GPIO number instead. Refer to this Pi 3 image showing which “pins” correspond to “gpio” numbers. You should be using one of 4, 5, 6, 12, 13, 18, 22, 23, 24, 25, 26 or 27.For example, a
sensorPIN
of4
would require the PIR io cable plugged in to pin header 7. -
RE: MMM-PIR-Sensor tuning
@open_book Few things,
- What version of Raspbian are you using? The
onoff
npm module has issues with some releases.
Hint:cat /etc/os-release
- What does your config look like for the pir module, exactly?
- What version of Raspbian are you using? The
-
RE: Need help using an API
A quick look on that website and I found an API they provide. When you get more advanced you can hook into that.
-
RE: MMM-PIR-Senor shut off usb port(s)
From the quick googling I’ve done, it may be possible to disable/enable raspberry pi usb power with commands:
Disable
echo 0x0 > /sys/devices/platform/bcm2708_usb/buspower
Enable
echo 0x1 > /sys/devices/platform/bcm2708_usb/buspower
However I haven’t tested. I’d recommend writing a new module that handles this and listens for the
USER_PRESENCE
event notification that the Pir module triggers. -
RE: New Module Debugging
Depends on your module I guess. If the part you want to debug is in the interface, turning dev console on is the way:
electron js/electron.js dev
But if you want to debug
node_helper
side,console.log
everything. -
RE: MMM-IFTTT - If-This-Then-That Maker Notifications
@paulocarrasco Pull again now.
Made the noob mistake of not testing, I wasn’t near my mirror at the time. All good now.