Page 1 of 1

Wishfull thinking

Posted: 25 Nov 2015, 23:34
by costo
I am thinking of this:

Near my frontdoor a ESPEasy with a few inputs and outputs that will make connection to my Domoticz server.

As Inputs:
A: lux meter.
B: distance sensor.
C: switch for the doorbell contact.
D: switch for the letterbox.

As Output(s)
A: Switch to control the frontdoor light.

If it is dark and someone approaches the door to say 3 meter than the frontdoorlight needs to be activated.
This can be easy done in Domoticz by some sort of script. The problem (i think) is that Domoticz executes scripts only at the start of a new minute and not immediately. So in Domoticz it will take something between 1 and 60 seconds to turn on the light plus about a extra 5 seconds for the wifi message to go through the network.
That can be a very long time when your visitor is seeking the doorbell pushbutton in the dark. :lol:

So I was thinking that it would be nice if there could be a very rudimentary way of decision making logic dependant on a few inputs to control an output, like this: IF ((Input A<= 200lux) AND (Input B<= 300 cm)) THEN Output A=ON ELSE Output A=OFF
build into the ESPEasy sketch.

This is just an example that can also be solved by installing a I.R. sensor light near the frontdoor but it certainly would be a usefull extension for a ESPEasy to do some fast comparisions to decide the state of an Output depending on the state or value of some Input(s).

Anyone any thoughts about this?

Re: Wishfull thinking

Posted: 26 Nov 2015, 01:02
by BerndJ
Hi,

yes, done since version 042 in test phase.

It would be nice if the developer could explain a little bit to these level control device in the Basic sketches in the homepage.

But i thing it´s not possible to make an AND or OR check to two values, it´s look that only one value is possible.

I dream that i can use php snippets.

best wishes

Re: Wishfull thinking

Posted: 26 Nov 2015, 20:33
by BertB
costo wrote:I am thinking of this:

Near my frontdoor a ESPEasy with a few inputs and outputs that will make connection to my Domoticz server.

etc ...

Anyone any thoughts about this?

This kind of wishes could be handled by the big, but somewhat neglected, brother of Easy. It's name is Connexio.
Connexio has the ability to act upon inputs to control outputs, thru a script.

Having said that, Easy has grown so fast, it left Connexio in its shadow.
Furthermore, Connexio is more difficult to use than Easy.

Maybe it is possible to give Connexio a new life?

Re: Wishfull thinking

Posted: 27 Nov 2015, 11:24
by costo
tnx for the feedback.
BertB wrote:
costo wrote:I am thinking of this:
......
Having said that, Easy has grown so fast, it left Connexio in its shadow.
Furthermore, Connexio is more difficult to use than Easy.

Maybe it is possible to give Connexio a new life?
Had a look at the Connexio project, from github.com
It is a bit outdated, written with the 1.6.1 IDE and before the IDE had the boardmanager.
So that gives me compile errors.

Ofcourse I can program 'the function' I want into an arduino board and use that to process the inputs and feed its output into the ESPEasy board and also to a Lamp. That is easier to do i think.