ESP EasyDoorbell

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mrcage
New user
Posts: 4
Joined: 03 Nov 2017, 23:21

ESP EasyDoorbell

#1 Post by mrcage » 01 Jun 2018, 20:43

Hi Guys,

I created a simple hack with a cheap doorbell from Grundig.
See this demonstration video on youtube. https://www.youtube.com/watch?v=l9GmqCqmAQ0

I modified 1 receiver and catch the led (hi input) using a wemos esp.
This works brilliant as I forward the status to Openhab which sents me a image by Telegram 8-)

The thing is it receives 5 to 8 hi inputs and sents them as seperate events to openhab (mqtt). I want just one event so I want to aggregate to just one event.
I can try to solve it in openhab using a rule, but it seems there is a rule engine in espeasy as well!

Can someone give me a headstart where to begin or what to do?

BTW, I love this software! it's awesome.

mrcage
New user
Posts: 4
Joined: 03 Nov 2017, 23:21

Re: ESP EasyDoorbell

#2 Post by mrcage » 09 Jun 2018, 20:48

120 reads and no replies :roll:

Let me rephrase the question.
I receive multiple events from the input (doorbell)

Should I create a rule which writes the status to a variable?
If The variable is set the other events will be skipped.

Code: Select all

If (input = HIGH){ #rule1 
set variable to 1
sleep 5000
set variable to 0
}

If (variable = 1){ #rule2 
send mqtt message to openhab
}
should this work? Or can't I overrule that the event is already sent to controller?

danmero
Normal user
Posts: 64
Joined: 11 May 2017, 01:19

Re: ESP EasyDoorbell

#3 Post by danmero » 09 Jun 2018, 21:05

Use timer to debounce

Code: Select all

On [Switch1#switch] do
   TimerSet,9,1
EndOn

On Rules#Timer=9 do
  If [Switch1#switch]=1
    // Do-whatever-you-want here
  EndIf
EndOn 
Regards,

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests