Meek MP1 : Meek Presence detection with 1 output.
This switch is equipped with a high sensitive doppler radar. It can detect movement up to 5 meters in a 360 degree angle. It can detect movement without direct line of sight. It can even detect movement thru a brick wall.
- Fully programmable timers
- RTTTL support (Buzzer)
- Preprogrammed Alarm modus
- Compatible with the majority of Home Automation Systems
- Flashed with ESPEasy
- Fully programmable LED push button
- Speech Recognition (IFTTT)
- Wi-Fi enabled
Hardwire:
Input Touch Button: GPIO13
Switch Output 1 (230V): GPIO4
Input Presence Detection: GPI12
Buzzer: GPIO5
LED (Neopixel): GPIO14
Pre-programmed events :
http://<espeasyip>/control?cmd=event,toggle
http://<espeasyip>/control?cmd=event,Sunny
http://<espeasyip>/control?cmd=event,Dark
http://<espeasyip>/control?cmd=event,AlarmOn
http://<espeasyip>/control?cmd=event,AlarmOff
http://<espeasyip>/control?cmd=event,Alarm
http://<espeasyip>/control?cmd=event,DoorBell
http://<espeasyip>/control?cmd=event,StarWars
Results:
Toggle Lights on or off
Disable lights when pressence detected
Enable lights when presence detected
Enable alarm
Disable alarm
Initiate alarm and blink the lights on and off repeatedly
Sound buzzer and blink the lights
Just because we can 🙂 RTTTL
Rules1
on Presence#Detection=1 do
if [Meek#DisableDetection]=0 and [Meek#Presence]=0 and [Meek#Alarm]=0
gpio 4,1
neopixel,1,250,0,250 // Purple
TaskValueSet 3,4,1
TaskValueSet 5,1,1
timerSet,1,35
timerSet,2,0
SendToHTTP 192.168.0.105,8080,/json.htm?type=command¶m=udevice&idx=77&nvalue=1
rtttl,5:d=10,o=6,b=180,c,e,g
endif
endon
on Presence#Detection=1 do
if [Meek#DisableDetection]=0 and [Meek#Presence]=1 and [Meek#Alarm]=0
neopixel,1,250,0,250 // Purple
timerSet,1,25
timerSet,2,0
endif
endon
on Rules#Timer=1 do
else
neopixel,1,0,0,250 // Blue
timerSet,2,25
endif
endon
on Rules#Timer=2 do
else
neopixel,1,250,250,250 // White
TaskValueSet 3,4,0
SendToHTTP 192.168.0.105,8080,/json.htm?type=command¶m=udevice&idx=77&nvalue=0
gpio 4,0
TaskValueSet 5,1,0
rtttl,5:d=10,o=6,b=180,g,1,c
endif
endon
on Sunny do
TaskValueSet 3,2,0
endon
on Dark do
TaskValueSet 3,2,1
endon
on AlarmOn do
TaskValueSet 3,3,1
endon
on AlarmOff do
TaskValueSet 3,3,0
endon
on toggle do
if [Meek#Presence]=0
gpio 4,1
TaskValueSet 5,1,1
TaskValueSet 3,4,1
Neopixel,1,250,0,250 // green
SendToHTTP 192.168.0.105,8080,/json.htm?type=command¶m=udevice&idx=77&nvalue=1
else
timerSet,2,0
timerSet,1,0
gpio 4,0
TaskValueSet 5,1,0
TaskValueSet 3,4,0
Neopixel,1,250,250,250 // white
SendToHTTP 192.168.0.105,8080,/json.htm?type=command¶m=udevice&idx=77&nvalue=0
endif
endon
Rules2
on Touch#Button=1 do
timerSet,5,2
timerSet,6,0
timerSet,1,0
timerSet,2,0
if [Meek#Touch]=0 and [Meek#Alarm]=0
gpio 4,1
TaskValueSet 5,1,1
TaskValueSet 3,1,1
Neopixel,1,0,250,0
SendToHTTP 192.168.0.105,8080,/json.htm?type=command¶m=udevice&idx=77&nvalue=1
rtttl,5:d=10,o=6,b=180,c,e,g
else
gpio 4,0
TaskValueSet 5,1,0
TaskValueSet 3,1,0
Neopixel,1,0,250,250
SendToHTTP 192.168.0.105,8080,/json.htm?type=command¶m=udevice&idx=77&nvalue=0
rtttl,5:d=10,o=6,b=180,g,e,c
endif
endon
On Rules#Timer=5 do
if [Touch#Button]=1 and [Meek#DisableDetection]=0 and [Meek#Alarm]=0
TaskValueSet 3,2,1
timerSet,2,0
timerSet,1,0
Neopixel,1,0,250,250
tone,5,800,1000
else
timerSet,6,1
endif
endon
On Rules#Timer=6 do
if [Touch#Button]=1 and [Meek#DisableDetection]=1
TaskValueSet 3,2,0
timerSet,2,0
timerSet,1,0
Neopixel,1,200,150,50
tone,5,1800,1000
timerSet,5,0
endif
endon
Rules3
on Touch#Button=1 do
if [Meek#Alarm]=1
TaskValueSet 3,3,0
endif
endon
on Alarm do
if [Meek#Alarm]=1
timerSet,3,2
gpio,4,1
neopixel,1,250,250,250 // White
rtttl,5:d=8,o=5,b=132:4d-6,a-.
gpio,4,0
neopixel,1,250,0,0 // Red
rtttl,5:d=8,o=5,b=132:4d-6,a-.
gpio,4,1
neopixel,1,250,250,250 // White
rtttl,5:d=8,o=5,b=132:4d-6,a-.
gpio,4,0
neopixel,1,250,0,0 // Red
rtttl,5:d=8,o=5,b=132:4d-6,a-.
endif
endon
on Rules#Timer=3 do
if [Meek#Alarm]=1
gpio,4,1
neopixel,1,250,250,250 // White
rtttl,5:d=8,o=5,b=132:4d-6,a-.
gpio,4,0
neopixel,1,250,0,0 // Red
rtttl,5:d=8,o=5,b=132:4d-6,a-.
gpio,4,1
neopixel,1,250,250,250 // White
rtttl,5:d=8,o=5,b=132:4d-6,a-.
gpio,4,0
neopixel,1,250,0,0 // Red
rtttl,5:d=8,o=5,b=132:4d-6,a-.
event,Alarm
endif
endon
on Presence#Detection=1 do
if [Meek#Alarm]=1
timerSet,1,0
timerSet,2,0
timerSet,5,0
timerSet,6,0
event,Alarm
endif
endon
Rules4
on System#Boot do
neopixel,1,250,250,250
endon
on StarWars do
rtttl,5:d=4,o=5,b=180:8f,8f,8f,2a-,2f,6,8d-6,8d6,8c6,2a-.6,f,6,8d-6,8d6,8c6,2a#.6,f.6,8d#6,8d6,8d#6,2c6,p,8f,8f,8f,2a#.,2f.6,8d#6,8d6,8c6,2a#.6,f.6,8d#6,8d6,8c6,2a#.6,f.6,8d#6,8d6,8d#6,2c6
endon
on Axel do
rtttl,5:d=8,o=5,b=125:16g,16g,a-.,16g,16p,16g,c6,g,f,4g,d.6,16g,16p,16g,d-6,d6,a-,g,d6,g6,16g,16f,16p,16f,d,a-,2g,4p,16f6,d6,c6,a-,4g,a-.,16g,16p,16g,c6,g,f,4g,d.6,16g,16p,16g,d-6,d6,a-,g,d6,g6,16g,16f,16p,16f,d,a-,2g
endon
on 007 do
rtttl,5:d=4,o=5,b=320:c,8d,8d,d,2d,c,c,c,c,8d-,8d-,2d-,d,d,d,c,8d,8d,d,2d,c,c,c,c,8d-,8d-,d-,2d-,d,c-,c,c6,1b.,g,f,1g.
endon
on Muppets do
rtttl,5:d=4,o=5,b=250:c6,c6,a,b,8a,b,g,p,c6,c6,a,8b,8a,8p,g.,p,e,e,g,f,8e,f,8c6,8c,8d,e,8e,8e,8p,8e,g,2p,c6,c6,a,b,8a,b,g,p,c6,c6,a,8b,a,g.,p,e,e,g,f,8e,f,8c6,8c,8d,e,8e,d,8d,c
endon
on Star do
rtttl,5:d=8,o=6,b=180:f5,f5,f5,2a-5.,2f.,d-,d,c,2a-.,4f.,d-,d,c,2a-.,4f.,d-,d,d-,2c,4p,f5,f5,f5,2a-5.,2f.,d-,d,c,2a-.,4f.,d-,d,c,2a-.,4f.,d-,d,d-,2c
endon
on Ateam do
rtttl,5:d=8,o=5,b=132:4d-6,a-,2d-6,16p,g-,4a-,4d-.,p,16g,16a-,d-6,a-,f6,2d-6,16p,c-.6,16c6,16a-,g-.,2a-.
endon
on DoorBell do
if [Light#Status]=0
gpio 4,1
rtttl,5:d=10,o=6,b=180,a
gpio 4,0
rtttl,5:d=10,o=6,b=180,g
gpio 4,1
rtttl,5:d=10,o=6,b=180,a
gpio 4,0
rtttl,5:d=10,o=6,b=180,g
gpio 4,1
rtttl,5:d=10,o=6,b=180,a
gpio 4,0
else
gpio 4,0
rtttl,5:d=10,o=6,b=180,a
gpio 4,1
rtttl,5:d=10,o=6,b=180,g
gpio 4,0
rtttl,5:d=10,o=6,b=180,a
gpio 4,1
rtttl,5:d=10,o=6,b=180,g
gpio 4,0
rtttl,5:d=10,o=6,b=180,a
gpio 4,1
endif
endon