Read the statement by Michael Teeuw here.
Another PIR sensor
-
@DaVinki said in Another PIR sensor:
{ module: 'MMM-ProfileSwitcher', config: { // See 'Configuration options' for more information. { // < ----- what is that ? module: 'MMM-Wallpaper', classes: 'pageOneEveryone', }, // < ----- what is that? } }
seems there are too many {}
-
@sdetweil said in Another PIR sensor:
{
Code directly taken from the module page https://github.com/tosti007/MMM-ProfileSwitcher. Seems to me you need the bracket for a per module assignment of the class.
-
@sdetweil said in Another PIR sensor:
@DaVinki said in Another PIR sensor:
{ module: 'MMM-ProfileSwitcher', config: { // See 'Configuration options' for more information. { // < ----- what is that ? module: 'MMM-Wallpaper', classes: 'pageOneEveryone', }, // < ----- what is that? } }
seems there are too many {}
Removing the brackets results in a black screen. Assigning the wallpaper module to IgnoredModules class doesn’t change that. Using square brackets [] also breaks the config.
I Checked for comma’s, opening and closing brackets, the usual suspects, but as far as I can see I didn’t miss any.
-
@DaVinki said in Another PIR sensor:
MMM-GPIO-Notifications
do
cd ~/MagicMirror npm config:check
black screen, open the developers console, ctrl-shift-i on the keyboard,
and select the tab labeled ‘console’ and scroll up to see any errors, usually red text. -
@sdetweil said in Another PIR sensor:
@DaVinki said in Another PIR sensor:
MMM-GPIO-Notifications
do
cd ~/MagicMirror npm config:check
black screen, open the developers console, ctrl-shift-i on the keyboard,
and select the tab labeled ‘console’ and scroll up to see any errors, usually red text.npm config:check is an incorrect command.
The black screen shows no errors. It states that the modules are hidden. Even the wallpaper module, which should be ignored.
MMM-Wallpaper is suspended. module.js:198:7 MMM-Wallpaper is hidden. MMM-ProfileSwitcher.js:113:25
-
@DaVinki said in Another PIR sensor:
npm config:check is an incorrect command.
yeh,
npm run config:check
i would disable each module one at a time til I found the one hiding everything
add
disabled: true,
after the module statement{
module: name,
disabled: true,
position:
config: {
}
} -
@sdetweil said in Another PIR sensor:
@DaVinki said in Another PIR sensor:
npm config:check is an incorrect command.
yeh,
npm run config:check
i would disable each module one at a time yil I found the one hiding everything
add
disabled: true,
after the module statement{
module: name,
disabled: true,
position:
config: {
}
}Yeah, the culprit is MMM-ProfileSwitcher. Somehow I can not get that config working.
-
@DaVinki said in Another PIR sensor:
MMM-ProfileSwitcher
Hi,
your configuration of MMM-ProfileSwitcher is wrong. In your case it will simply look like this:{ module: 'MMM-ProfileSwitcher', config: { // See 'Configuration options' for more information. } }
But you need to add the classes part to your MMM-Wallpaper module:
{ module: 'MMM-Wallpaper', config: { ... } classes: 'pageOneEveryone', },
So your config will look like this:
{ module: 'MMM-ProfileSwitcher', config: { defaultClass: "pageOneEveryone", ignoreModules: ["moduleVisiableOnEveryPageOne", "moduleVisibleOnEveryPageTwo"] } }, { module: 'MMM-Wallpaper', config: { //Add your wallpaper config here } classes: 'pageOneEveryone', }, { module: 'MMM-ProfileControl', position: 'bottom_bar', config: { profiles: [ ['pageOneEveryone'], ['pageTwoEveryone'], ], } }, { module: 'MMM-GPIO-Notifications', config: { '22': { gpio_state: 1, gpio_debounce: 10, delay: 1000, notifications: [ { notification: 'PROFILE_DECREMENT_HORIZONTAL', }, ] } } },
The result will be two pages “pageOneEveryone” and “pageTwoEveryone”.
Every time your PIR triggers an “1” the GPIO Module will send an Notification to switch to the next page (and start again with “pageOneEveryone” if the end is reached).You then can add “classes: ‘pageOneEveryone’,” to every module you want to be displayed an “pageOneEveryone” and “classes: ‘pageTwoEveryone’,” to every module you want to be displayed on “pageTwoEveryone”.
If you want to have modules displayed on every page you can add them to the ignore list of MMM-ProfileSwitcher.
-
@wishmaster270 Hi,
Almost there. :-) . I’ve got two pages, PIR sensor is working. I can see notifications switching from page one to page two. However, the sensor seems to bounce. I can see the “enter” notification for page two, and almost immediately see the “leave” notification for page two. Sometimes it indeed accidentally switches to page two though, so the mechanism itself is working.
I Have been playing around with the debounce and delay timers, with no success.
What I’m trying to accomplish is switch to page two when the PIR is triggered, and return to page one using a timer in ProfileSwitcher.
Current config for GPIO-Notifications:
{ module: 'MMM-GPIO-Notifications', config: { '22': { gpio_state: 1, gpio_debounce: 1000, delay: 1000 * 20, notifications: [ { 'notification': 'PROFILE_DECREMENT_HORIZONTAL', 'profiles': 'pageOneEveryone', }, ] } } },
Doesn’t the “profiles” flag only trigger an action when that specific profile is active?
-
Sorry, my mistake. Sure the profiles option in the GPIO config will cause the module to only fire the notification on pageOneEveryone.
What kind of PIR are you using, a HC-SR501? Maybe your jumper is set to pulse a signal as long as a object is in distance.