Page 1 of 1

Timer Timer and time questions SOLVED

Posted: 09 Feb 2018, 21:27
by HomeJCL
Hi

As I’m a noob ESP EASY was the holy grail for what I’m looking to get ready by the summer.
I have a bunch of boards and tested them, @time tested NodeMCU V3 and Wemos D1 Mini Pro.
I have encountered something funny and at the same time puzzling.

I did try the rule Start Watering, I did change the value of the Timer from 600 to 60 (from what is posted in examples of the commands and rules in the Wiki)
As far I’m concerned I still get for a timer = 60 sec a real elapsed time of around 105s (not really close to 60s)

Further it seems that the uptime has a very elastic way of recording the uptime in respect to real uptime.

Going on with the « examples » the plain blink 10s ON/OFF routine from the rules also does not work as expected.

Could you confirm some stuff or are all of my boards defective or is it the way I interpret it ?

Thanks

Re: Timer Timer and time questions

Posted: 09 Feb 2018, 21:44
by grovkillen
I will try myself and get back to you.

Re: Timer Timer and time questions

Posted: 09 Feb 2018, 23:09
by TD-er
Please also check the CPU clock frequency on the info page.
And try to run without NTP set enabled and watch in the log to see if the uptime (in minutes) is also off.

Re: Timer Timer and time questions

Posted: 10 Feb 2018, 00:00
by grovkillen
I have tested on a Wemos D1 Mini and I cannot reproduce the timing issue you describe.

Code: Select all

On Rules#Timer=1 Do
 longpulse,2,0,5
 TimerSet,1,60
Endon
This rule is triggered by sending a command "TimerSet,1,1". The onboard LED will then lit up for approx 5 seconds. This will be repeated every 60 seconds. I looped this for 5 minutes and the LED lit up spot on 60 seconds (the longpulse did not make the LED shine for exactly 5 seconds but this is a known shortcoming of longpulse).

Re: Timer Timer and time questions

Posted: 10 Feb 2018, 20:34
by HomeJCL
Error in posting hence edit/delete

Re: Timer Timer and time questions

Posted: 10 Feb 2018, 20:39
by HomeJCL
Hi

CPU FREQ = 80 MHz
Flash IDE says 40 MHz

Since the post last night after rebooting without NTP
I have an uptime of 3h43

As far as I remember it seems before checking timer and rules everything was I think OK
It was after I hooked up 2 BME280 that it started to behave that way, I will try to reflash the boards to original FW or burn an empty file before reflashing ESP EASY and redo the testing

Hope to find some time to « reboot » tomorrow afternoon

Thanks

Re: Timer Timer and time questions

Posted: 10 Feb 2018, 22:01
by TD-er
Hmm, can you try using only one BME280? (also not set the other task enabled)
I never tested that one using >1 sensor.

Re: Timer Timer and time questions

Posted: 11 Feb 2018, 22:06
by HomeJCL
Hi

Haven't tested all FW yet.
Anyway, it seems that as soon a BME280 is on the I2C bus, it becomes difficult if not impossible to get it to work in a stable way. (Rules and NTP)

Before rules even with NTP, it is like magic, not to the second but OK for what I'm thinking todo.

2x BME280 is a nogo, NTP does not work at all.

BME280 I tried are of the 6 pin type.

Re: Timer Timer and time questions

Posted: 11 Feb 2018, 23:24
by TD-er
What is the I2C address of the BME sensor?
I know there are module boards out there that use a different setup on selecting the I2C address.
Also double check the pins of SCL and SDA are on the correct lines.
And perhaps add 10k resistors to both lines and connect them to 3V3 as pull up.

Re: Timer Timer and time questions

Posted: 12 Feb 2018, 10:47
by HomeJCL
Will try

Addresses are default 76 with SDO and VCC 77

Re: Timer Timer and time questions

Posted: 14 Feb 2018, 20:37
by HomeJCL
Alas,

Just tried with pull ups (although on the print there are SMD 103’s, 10k)

Anyway time is not OK and rules do not start at programmed time

I did look in the log and after reading the BME it posts a « timeout on read input data »

Re: Timer Timer and time questions

Posted: 19 Feb 2018, 19:15
by HomeJCL
Hi

Did some additional tests and got this.
On a pristine system (latest FW) w/o BMx280 everything is OK, On CLock and On Timer works as should.

Adding a BME280 and it still works OK. And if triggered repeatedly everything OK.
Sensor data are ok and retrieved, same for the rules timing works.

Then hit reboot or cycle power, and ... alas it no longer works as intended.

Timer has time of itself same for the on clock with longpulse, it does work when it happens to work with some delay, not that I need to the second but more annoying is the pulse length no longer as it was programmed +/- x1,7 set time.
Uptime is well no longer significant

Any pointers ? Thanks

Re: Timer Timer and time questions

Posted: 19 Feb 2018, 20:38
by TD-er
So it happens both with a warm reboot (reset) and a cold reboot (power cycle).

Could you also check with a v2.0 firmware, since the support for BME280 is different between both versions.

Re: Timer Timer and time questions. SOLVED

Posted: 07 Mar 2018, 17:55
by HomeJCL
Solved

Did I say I was a NooB :oops:

ESP is not Petaflops computer.

Everything works as expected :D

Many thanks for all

Patience is worth more than we think :idea:

Re: Timer Timer and time questions. SOLVED

Posted: 07 Mar 2018, 20:18
by TD-er
HomeJCL wrote: 07 Mar 2018, 17:55 [...]
ESP is not Petaflops computer.
[...]
Well, with all the ESP's sold, we may be way past that number ;)