@sdetweil You are absolutly right. But it is a totally different aproach. Hiding the modules to get the background as dark as possible does not save the same energy as turning off the screen. I am one of the lucky guys that uses a Benq monitor which shuts off in a second after turning off the signal and is back in less than three when turning it on again.
I think your module is the perfect solution for people who are not that lucky
Read the statement by Michael Teeuw here.
Posts made by wishmaster270
-
RE: [MMM-Screen-Powersave-Notification] A module which (de)activates the screen based on delay and notifications
-
RE: MMM-PIR-Sensor black screen
@Stef Hi, yesterday i added two Modules to the Showcase Area. On that monitors GPIO Pins and one which controls the Monitor.
My usecase is exactly like yours. I use an PIR sensor to detect user presence and want the screen to be turned off after a configurable timeout.
If you want to try them:
MMM-Screen-Powersave-Notification
and
MMM-GPIO-Notifications -
RE: Can't get pm2 to auto launch after reboot
Hi,
i had the same problem the last weeks.
It looks like pm2 creates the startup script for systemd with wrong parameters.
You should check if there exists a file “/etc/systemd/systemd/pm2-pi.service”
In my case the file existed but contained the following lines:USER=root which should be USER=pi
Environment=PM2_HOME=/root/.pm2 which should be Environment=PM2_HOME=/home/pi/.pm2
PIDFile=/root/.pm2/pm2.pid which should be PIDFile=/home/pi/.pm2/pm2.pidIf the file does not exist you can create it with:
sudo pm2 startup systemd -u piBut you need to check the values again after creating it.
In the end you can enable the script with:
sudo systemd enable pm2-pi.serviceThe parts in described by @Chris are needed as well
-
RE: MMM-Volume
@Sean All things i needed are merged now; i archived my repostory and added a hint to yours to the readme
-
[MMM-Screen-Powersave-Notification] A module which (de)activates the screen based on delay and notifications
Description:
This module is inspired by https://github.com/mboskamp/MMM-PIR and https://github.com/mboskamp/MMM-PIR but is controlled by notifications;
Based on “USER_PRESENCE”, “SCREEN_ON”, “SCREEN_OFF” and “SCREEN_TOGGLE” notifications the screen is controlled; By default “vcgencmd” command is used to turn the screen on or off and also to check the current status but it can be changed in the config file;
After the configured delay (which can be changed during rutime with an “SCREEN_POWERSAVE” notification) the screen will be turned off if no “USER_PRESENCE” notification had been send;
If needed custom scripts can be run after switching the screen on or off;Download:
MMM-Screen-Powersave-Notification
[card:Tom-Hirschberger/MMM-Screen-Powersave-Notification]
0.0.9
- the DOM objects now only will be updated if a position is set in the configuration
- fixed all issues reported by the new automatic module scanning script developed by @KristjanESPERANTO
0.0.8
- using
spawnSync
andspawn
instead ofexecSync
andexec
now. the old commands caused “Error: write EFAULT” exceptions in installations with current nodejs and electron versions
0.0.7
- added scripts and description of how to use
xrandr
ortvservice
as an alternative to the defaultvcgencmd
command to control the screen.xrandr
is the only solution working with current “vc4-kms-v3d” driver used in Raspberry Bullseye operating system. - fixed reset of screen timeout in “hideInsteadShutoff” mode.
- the screen will be turned on if USER_PRESENCE notification is received, now. No need to send “USER_PRESENCE” and “SCREEN_ON” notifications, now.
- the forced option in the payload of the notifications can be set either as string or as boolean value (String was need for notifications send by MMM-RemoteControl)
- the html DOM objects now only will be updated if the module has a position set, now.
0.0.6
- fixed “hideInsteadShutoff” feature
- added a new option to change to a specific profile before the “normal” action is triggered
0.0.5
- it now is possible to change to configured profile instead of shutting off the screen
0.0.4
- a new config option “hideInsteadShutoff” only hides/shows the modules instead of shutting off /on the display; the additional scripts can be used as if shutting down / on
0.0.3
- It is now possible to display an countdown if an module position is configured
0.0.2
- It is now possible to define different delays for different profiles (MMM-ProfileSwitcher)
0.0.1
- Supports “USER_PRESENCE”, “SCREEN_ON”, “SCREEN_OFF”, “SCREEN_TOGGLE” and “SCREEN_POWERSAVE” notifications
- Scripts can be run after turning the screen on or off (i.e. to (de)activate a microphone)
- Forced down/up is supported (i.e. to ignore an PIR event)
-
[MMM-GPIO-Notifications] Sends notifications based on GPIO events on multiple pins
Description:
This module monitores multiple configurable GPIO pins for state changes; if one of the pins changes to the configured state the notifcations which are specified will be send.
I wrote this module to send “USER_PRESENCE” notifications based on PIR Sensors.Download:
MMM-GPIO-Notifications
[card:Tom-Hirschberger/MMM-GPIO-Notifications]Example:
I recently added an example on how to connect a HC-SR501 PIR sensor to GPIO4 and send a SCREEN_ON notification to the MMM-Screen-Powersave-Notification module.
Version 0.2.4
- fixed another issue in the stop function which de-registers all pins during shutdown
Version 0.2.3
- fixed a bug which caused the stop function of node_helper.js to throw an error
Version 0.2.2
- As the new version of the opengpio library contains the GPIO information of most of the Raspberry devices now, the module tries to use the information of the library in a first mannwe. Only if no information is available for the used model the information generated during installation in gpioinfo.json is used.
- added exception handling. Now console messages are printed instead of killing the whole application if a pin is already used or no information about the chip and lane to use are available.
- the module releases all registered pins during shutdown now.
Version 0.2.1
- Now not only GPIOs which are named “GPIOX” (where X is the number of the GPIO) in the output of
gpioinfo
can be used but also named GPIOs. - added more output to log to show if a GPIO could be registered or not.
Version 0.2.0
- changed the “under the hood” library from onoff to opengpio to make it possible to use GPIO with kernels >= 6.6
- totally rewrite of the GPIO handling
- totally rewrite of the installation process
- the required library gets installed with apt
- the required toolset gets installed with apt
- a python script automatically creates a configuration file with your GPIO info inside. The file will be used by the module to determine which GPIO chipset and GPIO line needs to be used for a specific GPIO number
- removed the test scripts in the example folder and added some new one to either monitor GPIO ports or test a rotary encoder
BREAKING CHANGES
- dropped “gpio_debounce” option as the new library does not support debounce (at the moment). Please use delays as an alternative.
Version 0.1.0
- it is possible to use rotary encoders with this module now
- added a hint about how to use the module in a container setup to the readme
Version 0.0.9
- it is possible to set different delays for high and low state now
- the default value of
gpio_debounce
is now set to0
- the old syntax using
gpio_state
andnotifications
options is deprecated now. Usenotifications_low
andnotifications_high
instead. - add examples and a own section about the difference between
gpio_debounce
and the optionsdelay
,delay_low
anddelay_high
to the README
Version 0.0.8
- It is possible to send notifications for both states of a watched pin now
Version 0.0.7
- Changed the way the necessary re-compile is handled during the installation (electron-rebuild problem). Removed the magicmirror-rebuild dependency and changed back to offical @electron/rebuild. Instead of installing electron-rebuild in the module directory it will be installed to the main MagicMirror project now and will be called from there.
Version 0.0.6
- changed the way electron-rebuild is called in the post-installation step to avoid problems if the electron version of the mirror changes
Version 0.0.3
- it is now possible to send different notifications based on profiles
Version 0.0.2
- introduced an delay option which can be used to suppress notifications if they happen to quick after another (PIR-Sensor without option to configure a hold time)
Version 0.0.1
- A first version of the module which montiores different GPIO pins and sends notifications based on the events
-
[MMM-Serial-Notifications] Sends notications based on messages on serial interfaces
Description:
This module is based on the ideas of the module https://github.com/thobach/MMM-Gestures but uses a newer version of the “serialport” library. Because of this it does not need an additional webserver but connects directly to multiple, configurable serial ports. If an configured message is received on the configured serial port the configured notifications will be send to all modules.
The repository also contains two Arudino examples (testet on UNO R3 and Mega 2560) which use APDS-9960 and HC-SR04 sensors to send messages.Download:
MMM-Serial-Notifications
[card:Tom-Hirschberger/MMM-Serial-Notifications]
Example:
Today (2020-03-29) i added a more complex example with all stuff needed (.ino, wireringplan, description, example configuration) which uses an APDS-9960 and three VL53L1X sensors to detect hand gestures and hand presence with an Arduino Nano v3. The results will be transmitted to the Raspberry via USB Serial Interface and trigger some notifications.
Version 0.0.8
- updated the postinstall script
- fixed all issues reported by the new automatic module scanning script developed by @KristjanESPERANTO
Version 0.0.7
- changed the way electron-rebuild is called in the post-installation step to avoid problems if the electron version of the mirror changes
Version 0.0.3
- it is now possible to send different notifications based on profiles; the same sensor can trigger different things if different profiles are active
Version 0.0.2
- it is now possible to replace strings in the payload with strings based on the received serial message
Version 0.0.1
- it is possible to configure notifications for multiple serial consoles
-
RE: MMM-Volume
@Sean I wish i had seen your Module a view days earlier. Last week i desided to develop a volume control Module by my self (https://github.com/Tom-Hirschberger/MMM-VolumeControl). Your Module has nearly the same functionaltiy but looks nicer than mine. Mayby we can join forces. I try to take a closer look to your Module the next days. If something is missing i try to add it and make a pull request?