A Module for MagicMirror designed to control a relay base on the date and time (usefull to power on and off the screen for example).
Clone the repository into MagicMirror/modules directory
cd ~/MagicMirror/modules
git clone https://github.com/OscarVsp/MMM-Relay-Timer.git
Install the dependencies
cd /MMM-Relay-Timer
npm install
Basic Example:
{
module: 'MMM-Relay-Timer',
position: 'bottom_left',
},
Property | Description |
---|---|
refreshInterval |
The interval with which the url is queried and your values are updated.
Type: int (milliseconds)
Default: 60,000 => 1 minute
|
relayPin |
The pin used for the relay.
Type: int GPIO number of the pin.
Default: 14
|
daysOff |
The days during which the relay should be always turn off.
Type: array
Possible values: 0 -> 6 , with 0 corresonding to monday.
Default: [5,6]
|
startTime |
The time of the day after which the relay should be turn on.
Type: int The time in minute from 0:00
Default: 8*60 + 30 => 8:30
|
endTime |
The time of the day after which the relay should be turn off.
Type: int The time in minute from 0:00
Default: 18*60 + 30 => 18:30
|