fbpx
107 Views

Automatizare sonerie scoala

Am folosit un modul releu ESP-01s

Instalam Easy ESP pe modului ESP8266

Folosim un programator usb 2 serial

Scriem firmware la modul.

Dupa ce setam reteaua wireless ne logam pe modul si setam in Tools/Advanced
-activam RULES
-activam NTP
-setam serverul NTP si diferenta de fus orar

In rules scriem regulile

on System#Boot do
delay 5000
GPIO,0,0
endon
On Clock#Time=All,08:00 do
timerSet,1,1
endon
On Clock#Time=All,08:55 do
timerSet,1,1
endon
On Clock#Time=All,09:00 do
timerSet,1,1
endon
On Clock#Time=All,09:55 do
timerSet,1,1
endon
On Clock#Time=All,10:05 do
timerSet,1,1
endon
On Clock#Time=All,11:00 do
timerSet,1,1
endon
On Clock#Time=All,11:05 do
timerSet,1,1
endon
On Clock#Time=All,12:00 do
timerSet,1,1
endon
On Clock#Time=All,12:05 do
timerSet,1,1
endon
On Clock#Time=All,13:00 do
timerSet,1,1
endon
On Clock#Time=All,13:05 do
timerSet,1,1
endon
On Clock#Time=All,14:00 do
timerSet,1,1
endon
On Clock#Time=All,14:05 do
timerSet,1,1
endon
On Clock#Time=All,15:00 do
timerSet,1,1
endon
On Rules#timer=1 do
if %sysweekday% <7 and %sysweekday% >1
gpio,0,1
delay 5000
gpio,0,0
delay 3000
gpio,0,1
delay 5000
gpio,0,0
endif
endon

Configuram releu ( optional)

Varianta 2 Folosim un Releu wireless Sonoff Basic, 10A

Lipim conexiuni pentru a scrie firmware

ATENȚIE scriere unui firmware custom este ireversibila si nu veti mai putea folosi eWeLink cu acest dispozitiv

GPIO 12-releu

GPIO13-LED

GPIO 0 buton

GPIO13 il folosim pentru status Wifi

on System#Boot do
delay 5000
GPIO,12,0
endon
On Clock#Time=All,08:00 do
timerSet,1,1
endon
On Clock#Time=All,08:50 do
timerSet,1,1
endon
On Clock#Time=All,09:00 do
timerSet,1,1
endon
On Clock#Time=All,09:50 do
timerSet,1,1
endon
On Clock#Time=All,10:10 do
timerSet,1,1
endon
On Clock#Time=All,11:00 do
timerSet,1,1
endon
On Clock#Time=All,11:10 do
timerSet,1,1
endon
On Clock#Time=All,12:00 do
timerSet,1,1
endon
On Clock#Time=All,12:10 do
timerSet,1,1
endon
On Clock#Time=All,13:00 do
timerSet,1,1
endon
On Clock#Time=All,13:10 do
timerSet,1,1
endon
On Clock#Time=All,14:00 do
timerSet,1,1
endon
On Clock#Time=All,14:10 do
timerSet,1,1
endon
On Clock#Time=All,15:00 do
timerSet,1,1
endon
On Rules#timer=1 do
if %sysweekday% <7 and %sysweekday% >1
gpio,12,1
delay 5000
gpio,12,0
delay 3000
gpio,12,1
delay 5000
gpio,12,0
endif
endon

Leave a Reply

Your email address will not be published. Required fields are marked *