Page 1 of 1

Paper-mail with email project

Posted: 08 Apr 2018, 10:21
by remko2000
I have completed the mailbox project https://www.letscontrolit.com/wiki/inde ... ifications and that works. However, I notice that when the mailbox is opened and closed quickly, the miniwemos D1 (ESP Easy version v2.0.0-dev12) does not reset and therefore does not give a message. If the mailbox is opened and closed more slowly, I get a message. Can this be solved so that the reactiontime is shorter?

Re: Paper-mail with email project

Posted: 08 Apr 2018, 10:26
by grovkillen
Change message delay to 100-200 instead of default 1000?

Found under advanced page.

Re: Paper-mail with email project

Posted: 08 Apr 2018, 16:07
by remko2000
I have adjusted the delay to 100 but no change. This seems to be a setting for the speed of sending message. My problem is different. It seems that the magnetic microswitch that needs a certain amount of time to be able to perceive that it is ' open' .

I use this switches:
https://nl.aliexpress.com/item/5pcs-MC- ... 0.0.QX921q

Is there another way to solve this?

Re: Paper-mail with email project

Posted: 08 Apr 2018, 16:09
by grovkillen
I would try a micro switch instead.

5PCS 3 pins Micro Touch Switches NO NC 3a/5a 125VAC 250VAC Mini limit Switch Micro Switch Microswitches With 48mm Long Lever
http://s.aliexpress.com/AVBFZzUv?fromSns=Copy to Clipboard

Re: Paper-mail with email project

Posted: 08 Apr 2018, 16:18
by remko2000
That is a good plan B but this should also be able to work properly? A magnetic switch I can put in the lid of my mailbox, a touchswitch not I am afraid.

Re: Paper-mail with email project

Posted: 08 Apr 2018, 23:21
by cyberclwn
remko2000 wrote: 08 Apr 2018, 16:07 It seems that the magnetic microswitch that needs a certain amount of time to be able to perceive that it is ' open' .

Is there another way to solve this?
Can you try a different location of the switch on the mailbox?
Close to hinge is short detection time, the further away, the longer.

Not sure if it is possible, but just trying to think along.

Re: Paper-mail with email project

Posted: 20 Apr 2018, 15:53
by vader
No problems with that. I use a reed switch for that and set MQTT delay to 0. Works over a year now like a charm... ;)

Re: Paper-mail with email project

Posted: 31 Aug 2018, 15:10
by Gilles
I am working on the same project with my mailbox.

My question is: As the open/close lasts around one second, how much time the esp07S will be powered ? I know that I can configure a static ip to save time, but it still needs some time anyway to connect to the ssid and to send a mail.
I have applied the recommended settings ( https://www.letscontrolit.com/wiki/inde ... ifications )

I am using a esp07S with espeasy V2.xxx powred with 2 x AA batteries

Thanks
Gilles

Re: Paper-mail with email project

Posted: 31 Aug 2018, 15:21
by grovkillen
I would suspect you need around 10 seconds for the entire process, at maximum 15 seconds.

Re: Paper-mail with email project

Posted: 31 Aug 2018, 15:27
by Gilles
yes, you are right.
I think so, but how/where to configure the time the esp will be up, these 10 or 15 seconds that I need for the ESP to boot, connect to the network and send the email?

Re: Paper-mail with email project

Posted: 31 Aug 2018, 18:34
by grovkillen
If you use rules you can use events to know when the publish is done. Exactly how you go about that I don't know (I'm writing this on my phone, from the rural Sweden, preparing for moose hunt).

Re: Paper-mail with email project

Posted: 31 Aug 2018, 19:27
by Gilles
I apologize for my bad english. Let me rephrase.
Let's say the ESP is in deep sleep. It will be awaken when the switch will detect that the door is open even for one second. How much time the ESP will stay up before going again to the deep sleep? Is there a way to configure the time that the ESP will stay up before going back to sleep ?

Re: Paper-mail with email project

Posted: 31 Aug 2018, 19:33
by grovkillen
You set the awake time in the settings.

Re: Paper-mail with email project

Posted: 31 Aug 2018, 20:12
by Gilles
The easyNotification "guide" (https://www.letscontrolit.com/wiki/inde ... ifications) says:

Enable deep sleep with a sleep time of 0 seconds. (this way it only wakes up manually by the switch)
Enable Sleep on connection failure
Set message delay to 0.

What settings are you talking about?

Re: Paper-mail with email project

Posted: 31 Aug 2018, 20:17
by grovkillen
The wiki is a bit behind the schedule. The settings is there in the GUI. Install and see ;)

Re: Paper-mail with email project

Posted: 01 Sep 2018, 08:16
by Gilles
wow. I have found this in the forum:
The attachment awake.PNG is no longer available
but I only have this: I need to check why.
awake.PNG
awake.PNG (14.66 KiB) Viewed 10133 times
I will be driving all the day (while some other will be hunting :).

I will check tomorrow what went wrong, but I wil not be at home so I will not be able to test.

I may have a version issue. I run v2.0-20180126 compiled with the FEATURE_ADC_VCC to get the battery level.
Thanks
Gilles

Re: Paper-mail with email project

Posted: 01 Sep 2018, 08:18
by Gilles
the png has disappeared. Here is what I have:
Config.PNG
Config.PNG (5.45 KiB) Viewed 10131 times

Re: Paper-mail with email project

Posted: 01 Sep 2018, 08:33
by grovkillen
Yes, the problem is that you're running an "ancient" version.

We really need to stress that you should always provide what version you're using.