ESPeasy Mega running on Sonoff Basic - Bad Behaviour

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#21 Post by Oxyandy » 20 Mar 2018, 00:08

Forcing GPIO14 to zero helped... (makes it safer for my plants)
I added lots more publish commands within rules & there must be something wrong, to me - they shouldn't fire so often..

I now know that this latest release is MOST definitely worse than the earlier one I started with..
I am losing patience with this simple task using ESP Easy... and so are the people around me
I need something that works...

Is there a way - like when device is first powered up - that I can call the true state of my switch
At boot GPIO14 is '1' if my NC switch is not connected & '0' if it is
How can I check in a rule the 'true state' just as I fire the rule ?

Maybe time for a firmware from 3 months ago... just for a try..

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#22 Post by TD-er » 20 Mar 2018, 19:32

I was thinking... do you use pull-up resistors (either internal or external)?
Sometimes a switch may 'hover' around the flipping point. Especially with longer wires.
With a pull-up resistor (or pull down, depending on your schematics) the signal stability may improve a lot.

Later builds are a lot faster in reacting to rules, which may explain why things get worse in your situation.
So please test with pull up/down resistors (depending on your circuit) to see if things get better.
Or post some drawing indicating the circuit used.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#23 Post by Oxyandy » 20 Mar 2018, 22:23

TD-er wrote: 20 Mar 2018, 19:32 I was thinking... do you use pull-up resistors (either internal or external)?
Sometimes a switch may 'hover' around the flipping point. Especially with longer wires.
With a pull-up resistor (or pull down, depending on your schematics) the signal stability may improve a lot.

Later builds are a lot faster in reacting to rules, which may explain why things get worse in your situation.
So please test with pull up/down resistors (depending on your circuit) to see if things get better.
Or post some drawing indicating the circuit used.
Yes:
I have internal ticked
I added a pull-up 4.7K from 3.3v to GPIO14
I added a 0.1uF capacitor from GPIO14 to GND

Switch in it's resting state is 'NC' so pulling GPIO14 down
After the switch rises, the contacts open - for approximately 2 seconds.
then it returns to it's resting state 'closed contacts'
The wires are only short under 50CM & twisted pair..

The addition of extra components made no difference..

My publish commands inside my rules show what is happening...
I wanted to know what rules, fire when & how often

Code: Select all

on button#switch do
  if [button#switch]=1
   GPIO,12,1
   Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"PUMP_START_%systime%"}
  else
   GPIO,12,0
   Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"PUMP_STOP_%systime%"}
  endif
endon 

Code: Select all

on FULL_Tray_4#Switch do
  if [PUMP_Tray_4#Switch]=1
   GPIO,12,0
   Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"FLOAT_SWITCH_1_%systime%"}
  else
   GPIO,12,0
   Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"FLOAT_SWITCH_0_%systime%"}
  endif
endon

Code: Select all

on Clock#Time=All,**:00 do
GPIO,12,1
if [FULL_Tray_4#switch]=1
GPIO,12,0
notify 1
Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"4_FULL_00_%systime%"}
else
Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"4_PUMP_ON_%systime%"}
endif
endon

Code: Select all

on Clock#Time=All,**:03 do
GPIO,12,0
if [FULL_Tray_4#switch]=1
GPIO,14,0
Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"4_CYCLE_SAVED"}
else
Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"4_PUMP_0_FLOAT_0_%systime%"}
endif
endon
Anyway is not unstable on GPIO14, I have switch mounted upside down 'N/O' (open contacts) running on Tasmota firmware
If my installation was going to show ghost triggers they would show on this one..
No resistor or capacitor
the logs show a lot...
especially missing data & lags where the time on the device varies from my PC time and then trouble starts

The logs I know is a LOT to look at, but I have tried to break it up, I probably needs to be looked at bottom to top
This is last night and it tells me my forced state GPIO,14 is at the wrong time & doesn't help..
and yeah I need more logs...
Trigger times 00 15 30 & 45

Code: Select all

20:48:02	4_CYCLE_SAVED
20:48:01	4_CYCLE_SAVED
20:45:02	4_FULL_45_20:45:00
20:45:02	4_FULL_45_20:45:00

20:33:01	4_CYCLE_SAVED
20:33:01	4_CYCLE_SAVED
20:30:02	4_FULL_30_20:30:00
20:30:02	4_FULL_30_20:30:00

20:18:02	4_CYCLE_SAVED
20:18:01	4_CYCLE_SAVED
20:15:03	4_FULL_4_15_20:15:00
20:15:02	4_FULL_4_15_20:15:00

20:03:17	PUMP_STOP_20:03:14
20:03:17	PUMP_STOP_20:03:14
20:03:16	FLOAT_SWITCH_0_20:03:12
20:03:16	FLOAT_SWITCH_0_20:03:12
20:03:16	FLOAT_SWITCH_0_20:03:12
20:03:15	FLOAT_SWITCH_0_20:03:12
20:03:15	FLOAT_SWITCH_0_20:03:02
20:03:15	FLOAT_SWITCH_0_20:03:02
20:03:14	4_CYCLE_SAVED
20:03:14	4_CYCLE_SAVED
20:02:58	FLOAT_SWITCH_0_20:02:56
20:02:58	FLOAT_SWITCH_0_20:02:56
20:02:48	FLOAT_SWITCH_0_20:02:45
20:02:48	FLOAT_SWITCH_0_20:02:45
20:02:45	FLOAT_SWITCH_1_20:02:43
20:02:45	FLOAT_SWITCH_1_20:02:43
20:00:19	PUMP_START_20:00:16
20:00:19	PUMP_START_20:00:10
20:00:18	PUMP_START_20:00:16
20:00:18	PUMP_START_20:00:10
20:00:07	PUMP_START_20:00:04
20:00:06	PUMP_START_20:00:04
20:00:06	PUMP_START_20:00:04
20:00:06	PUMP_START_20:00:04
20:00:04	4_PUMP_ON_20:00:00
20:00:03	4_PUMP_ON_20:00:00

19:52:16	FLOAT_SWITCH_0_19:52:13
19:52:15	FLOAT_SWITCH_0_19:52:13
19:52:15	FLOAT_SWITCH_0_19:52:12
19:52:15	FLOAT_SWITCH_0_19:52:12
19:52:15	FLOAT_SWITCH_0_19:52:11
19:52:14	FLOAT_SWITCH_0_19:52:11
19:52:14	FLOAT_SWITCH_0_19:52:11
19:52:13	FLOAT_SWITCH_0_19:52:11
19:52:12	FLOAT_SWITCH_0_19:52:10
19:52:11	FLOAT_SWITCH_0_19:52:10
19:48:56	PUMP_START_17:45:02
19:48:56	PUMP_START_17:45:02
19:48:56	PUMP_START_17:45:02
19:48:55	PUMP_START_17:45:02
19:48:55	PUMP_START_17:45:02
19:48:55	PUMP_START_17:45:02
19:48:54	PUMP_START_17:45:01
19:48:54	PUMP_START_17:45:01
19:48:53	4_PUMP_ON_17:45:00
19:48:52	4_PUMP_ON_17:45:00

19:36:43	FLOAT_SWITCH_0_17:32:50
19:36:43	FLOAT_SWITCH_0_17:32:50
19:36:41	FLOAT_SWITCH_0_17:32:45
19:36:41	FLOAT_SWITCH_0_17:32:45
19:36:32	FLOAT_SWITCH_0_17:32:39
19:36:32	FLOAT_SWITCH_0_17:32:39
19:36:30	FLOAT_SWITCH_1_17:32:37
19:36:30	FLOAT_SWITCH_1_17:32:37
19:34:08	PUMP_START_17:30:14
19:34:08	PUMP_START_17:30:13
19:34:07	PUMP_START_17:30:14
19:34:07	PUMP_START_17:30:13
19:34:06	PUMP_START_17:30:07
19:34:06	PUMP_START_17:30:07
19:33:55	PUMP_START_17:30:02
19:33:55	PUMP_START_17:30:02
19:33:53	4_PUMP_ON_17:30:00
19:33:53	4_PUMP_ON_17:30:00

19:18:05	PUMP_STOP_19:18:03
19:18:04	PUMP_STOP_19:18:03
19:18:04	PUMP_STOP_19:18:01
19:18:04	PUMP_STOP_19:18:01
19:18:03	PUMP_STOP_19:18:01
19:18:03	PUMP_STOP_19:18:01
19:18:03	PUMP_STOP_19:18:01
19:18:02	PUMP_STOP_19:18:01
19:18:02	4_PUMP_0_FLOAT_0_19:18:00
19:18:01	4_PUMP_0_FLOAT_0_19:18:00
19:15:10	PUMP_START_19:15:08
19:15:09	PUMP_START_19:15:08
19:15:05	PUMP_START_19:15:03
19:15:04	PUMP_START_19:15:03
19:15:04	PUMP_START_19:15:03
19:15:04	PUMP_START_19:15:03
19:15:03	PUMP_START_19:15:01
19:15:03	PUMP_START_19:15:01
19:15:02	4_PUMP_ON_19:15:00
19:15:01	4_PUMP_ON_19:15:00

19:03:05	PUMP_STOP_19:03:02
19:03:05	PUMP_STOP_19:03:02
19:03:04	PUMP_STOP_19:03:02
19:03:04	PUMP_STOP_19:03:02
19:03:04	PUMP_STOP_19:03:01
19:03:03	PUMP_STOP_19:03:01
19:03:02	PUMP_STOP_19:03:01
19:03:02	PUMP_STOP_19:03:01
19:03:01	4_PUMP_0_FLOAT_0_19:03:00
19:03:00	4_PUMP_0_FLOAT_0_19:03:00
19:00:24	PUMP_START_19:00:13
19:00:24	PUMP_START_19:00:13
19:00:12	PUMP_START_19:00:08
19:00:12	PUMP_START_19:00:08
19:00:11	PUMP_START_19:00:07
19:00:11	PUMP_START_19:00:06
19:00:10	PUMP_START_19:00:07
19:00:10	PUMP_START_19:00:06
19:00:02	4_PUMP_ON_19:00:00
19:00:01	4_PUMP_ON_19:00:00

18:48:05	PUMP_STOP_18:48:03
18:48:05	PUMP_STOP_18:48:03
18:48:04	PUMP_STOP_18:48:03
18:48:04	PUMP_STOP_18:48:03
18:48:04	PUMP_STOP_18:48:01
18:48:04	PUMP_STOP_18:48:01
18:48:03	PUMP_STOP_18:48:01
18:48:03	PUMP_STOP_18:48:01
18:48:01	4_PUMP_0_FLOAT_0_18:48:00
18:48:01	4_PUMP_0_FLOAT_0_18:48:00
18:45:09	PUMP_START_18:45:08
18:45:09	PUMP_START_18:45:08
18:45:05	PUMP_START_18:45:02
18:45:04	PUMP_START_18:45:02
18:45:04	PUMP_START_18:45:02
18:45:04	PUMP_START_18:45:02
18:45:03	PUMP_START_18:45:01
18:45:03	PUMP_START_18:45:01
18:45:01	4_PUMP_ON_18:45:00
18:45:01	4_PUMP_ON_18:45:00

18:33:06	PUMP_STOP_18:33:03
18:33:06	PUMP_STOP_18:33:03
18:33:05	PUMP_STOP_18:33:03
18:33:05	PUMP_STOP_18:33:03
18:33:04	PUMP_STOP_18:33:02
18:33:04	PUMP_STOP_18:33:02
18:33:03	PUMP_STOP_18:33:02
18:33:03	PUMP_STOP_18:33:02
18:33:02	4_PUMP_0_FLOAT_0_18:33:00
18:33:01	4_PUMP_0_FLOAT_0_18:33:00
18:30:12	PUMP_START_18:30:08
18:30:12	PUMP_START_18:30:08
18:30:05	PUMP_START_18:30:03
18:30:05	PUMP_START_18:30:03
18:30:04	PUMP_START_18:30:02
18:30:04	PUMP_START_18:30:02
18:30:03	PUMP_START_18:30:02
18:30:03	PUMP_START_18:30:02
18:30:02	4_PUMP_ON_18:30:00
18:30:01	4_PUMP_ON_18:30:00

18:18:19	PUMP_STOP_18:18:09
18:18:19	PUMP_STOP_18:18:09
18:18:12	PUMP_STOP_18:18:09
18:18:12	PUMP_STOP_18:18:09
18:18:11	PUMP_STOP_18:18:09
18:18:11	PUMP_STOP_18:18:09
18:18:06	PUMP_STOP_18:18:03
18:18:05	PUMP_STOP_18:18:03
18:18:02	4_PUMP_0_FLOAT_0_18:18:00
18:18:01	4_PUMP_0_FLOAT_0_18:18:00
18:15:10	PUMP_START_18:15:09
18:15:10	PUMP_START_18:15:09
18:15:05	PUMP_START_18:15:03
18:15:05	PUMP_START_18:15:03
18:15:05	PUMP_START_18:15:02
18:15:04	PUMP_START_18:15:02
18:15:04	PUMP_START_18:15:02
18:15:04	PUMP_START_18:15:02
18:15:02	4_PUMP_ON_18:15:00
18:15:01	4_PUMP_ON_18:15:00

18:03:11	PUMP_STOP_18:03:08
18:03:11	PUMP_STOP_18:03:08
18:03:05	PUMP_STOP_18:03:03
18:03:04	PUMP_STOP_18:03:03
18:03:04	PUMP_STOP_18:03:03
18:03:04	PUMP_STOP_18:03:03
18:03:04	PUMP_STOP_18:03:01
18:03:03	PUMP_STOP_18:03:01
18:03:02	4_PUMP_0_FLOAT_0_18:03:00
18:03:01	4_PUMP_0_FLOAT_0_18:03:00
18:00:11	PUMP_START_18:00:08
18:00:10	PUMP_START_18:00:08
18:00:10	PUMP_START_18:00:08
18:00:10	PUMP_START_18:00:08
18:00:09	PUMP_START_18:00:07
18:00:09	PUMP_START_18:00:07
18:00:05	4_PUMP_ON_18:00:00
18:00:04	4_PUMP_ON_18:00:00

17:48:04	PUMP_STOP_17:48:02
17:48:04	PUMP_STOP_17:48:02
17:48:04	PUMP_STOP_17:48:02
17:48:04	PUMP_STOP_17:48:02
17:48:03	PUMP_STOP_17:48:01
17:48:03	PUMP_STOP_17:48:01
17:48:03	PUMP_STOP_17:48:01
17:48:02	PUMP_STOP_17:48:01
17:48:01	4_PUMP_0_FLOAT_0_17:48:00
17:48:01	4_PUMP_0_FLOAT_0_17:48:00
17:45:06	PUMP_START_17:45:02
17:45:05	PUMP_START_17:45:02
17:45:04	PUMP_START_17:45:02
17:45:04	PUMP_START_17:45:01
17:45:03	PUMP_START_17:45:02
17:45:03	PUMP_START_17:45:01
17:45:01	4_PUMP_ON_17:45:00
17:45:01	4_PUMP_ON_17:45:00

17:33:09	PUMP_STOP_17:33:08
17:33:09	PUMP_STOP_17:33:08
17:33:04	PUMP_STOP_17:33:02
17:33:04	PUMP_STOP_17:33:02
17:33:04	PUMP_STOP_17:33:01
17:33:03	PUMP_STOP_17:33:01
17:33:03	PUMP_STOP_17:33:01
17:33:03	PUMP_STOP_17:33:01
17:33:01	4_PUMP_0_FLOAT_0_17:33:00
17:33:01	4_PUMP_0_FLOAT_0_17:33:00
17:30:03	PUMP_START_17:30:02
17:30:03	PUMP_START_17:30:02
17:30:03	PUMP_START_17:30:02
17:30:03	PUMP_START_17:30:02
17:30:01	4_PUMP_ON_17:30:00
17:30:01	4_PUMP_ON_17:30:00

17:18:08	PUMP_STOP_17:18:04
17:18:08	PUMP_STOP_17:18:04
17:18:07	PUMP_STOP_17:18:03
17:18:07	PUMP_STOP_17:18:03
17:18:06	PUMP_STOP_17:18:03
17:18:05	PUMP_STOP_17:18:03
17:18:04	PUMP_STOP_17:18:02
17:18:04	PUMP_STOP_17:18:02
17:18:01	4_PUMP_0_FLOAT_0_17:18:00
17:18:01	4_PUMP_0_FLOAT_0_17:18:00
17:15:10	PUMP_START_17:15:09
17:15:10	PUMP_START_17:15:09
17:15:09	PUMP_START_17:15:03
17:15:09	PUMP_START_17:15:03
17:15:08	PUMP_START_17:15:02
17:15:08	PUMP_START_17:15:02
17:15:06	PUMP_START_17:15:02
17:15:04	PUMP_START_17:15:02
17:15:02	4_PUMP_ON_17:15:00
17:15:01	4_PUMP_ON_17:15:00

17:03:07	PUMP_STOP_17:03:03
17:03:06	PUMP_STOP_17:03:03
17:03:06	PUMP_STOP_17:03:03
17:03:05	PUMP_STOP_17:03:03
17:03:04	PUMP_STOP_17:03:02
17:03:04	PUMP_STOP_17:03:02
17:03:03	PUMP_STOP_17:03:02
17:03:03	PUMP_STOP_17:03:02
17:03:01	4_PUMP_0_FLOAT_0_17:03:00
17:03:01	4_PUMP_0_FLOAT_0_17:03:00
17:00:05	PUMP_START_17:00:02
17:00:04	PUMP_START_17:00:02
17:00:04	PUMP_START_17:00:02
17:00:04	PUMP_START_17:00:02
17:00:03	PUMP_START_17:00:02
17:00:03	PUMP_START_17:00:02
17:00:02	4_PUMP_ON_17:00:00
17:00:01	4_PUMP_ON_17:00:00

16:48:06	PUMP_STOP_16:48:03
16:48:06	PUMP_STOP_16:48:03
16:48:06	PUMP_STOP_16:48:03
16:48:05	PUMP_STOP_16:48:03
16:48:05	PUMP_STOP_16:48:02
16:48:05	PUMP_STOP_16:48:02
16:48:04	PUMP_STOP_16:48:02
16:48:04	PUMP_STOP_16:48:02
16:48:01	4_PUMP_0_FLOAT_0_16:48:00
16:48:01	4_PUMP_0_FLOAT_0_16:48:00
16:45:31	PUMP_START_16:45:28
16:45:31	PUMP_START_16:45:28
16:45:30	PUMP_START_16:45:28
16:45:30	PUMP_START_16:45:28
16:45:30	PUMP_START_16:45:28
16:45:29	PUMP_START_16:45:28
16:45:29	PUMP_START_16:45:28
16:45:29	PUMP_START_16:45:28
16:45:19	4_PUMP_ON_16:45:12
16:45:18	4_PUMP_ON_16:45:12

16:33:09	PUMP_STOP_16:33:09
16:33:09	PUMP_STOP_16:33:09
16:33:05	PUMP_STOP_16:33:03
16:33:04	PUMP_STOP_16:33:03
16:33:04	PUMP_STOP_16:33:02
16:33:04	PUMP_STOP_16:33:02
16:33:03	PUMP_STOP_16:33:02
16:33:03	PUMP_STOP_16:33:02
16:33:01	4_PUMP_0_FLOAT_0_16:33:00
16:33:01	4_PUMP_0_FLOAT_0_16:33:00
16:30:14	PUMP_START_16:30:12
16:30:14	PUMP_START_16:30:12
16:30:14	PUMP_START_16:30:12
16:30:13	PUMP_START_16:30:12
16:30:13	PUMP_START_16:30:11
16:30:12	PUMP_START_16:30:11
16:30:12	PUMP_START_16:30:10
16:30:12	PUMP_START_16:30:10
16:30:03	4_PUMP_ON_16:30:01
16:30:02	4_PUMP_ON_16:30:01

16:18:06	PUMP_STOP_16:18:03
16:18:06	PUMP_STOP_16:18:03
16:18:05	PUMP_STOP_16:18:03
16:18:05	PUMP_STOP_16:18:03
16:18:05	PUMP_STOP_16:18:02
16:18:04	PUMP_STOP_16:18:02
16:18:04	PUMP_STOP_16:18:02
16:18:03	PUMP_STOP_16:18:02
16:18:01	4_PUMP_0_FLOAT_0_16:18:00
16:18:00	4_PUMP_0_FLOAT_0_16:18:00
16:15:01	4_PUMP_ON_16:15:00
16:15:01	4_PUMP_ON_16:15:00

16:03:06	PUMP_STOP_16:03:02
16:03:05	PUMP_STOP_16:03:02
16:03:05	PUMP_STOP_16:03:02
16:03:04	PUMP_STOP_16:03:02
16:03:04	PUMP_STOP_16:03:02
16:03:03	PUMP_STOP_16:03:02
16:03:02	PUMP_STOP_16:03:01
16:03:02	PUMP_STOP_16:03:01
16:03:01	4_PUMP_0_FLOAT_0_16:03:00
16:03:00	4_PUMP_0_FLOAT_0_16:03:00
16:00:19	PUMP_START_16:00:17
16:00:19	PUMP_START_16:00:17
16:00:18	PUMP_START_16:00:17
16:00:18	PUMP_START_16:00:11
16:00:18	PUMP_START_16:00:17
16:00:18	PUMP_START_16:00:11
16:00:06	PUMP_START_16:00:05
16:00:06	PUMP_START_16:00:05
16:00:03	4_PUMP_ON_16:00:00
16:00:01	4_PUMP_ON_16:00:00

15:47:53	PUMP_STOP_15:47:48
15:47:52	PUMP_STOP_15:47:48
15:47:47	PUMP_STOP_15:47:42
15:47:46	FLOAT_SWITCH_0_15:47:42
15:47:46	FLOAT_SWITCH_0_15:47:42
15:47:45	PUMP_STOP_15:47:42
15:47:45	FLOAT_SWITCH_0_15:47:42
15:47:44	FLOAT_SWITCH_0_15:47:42
15:47:43	FLOAT_SWITCH_0_15:47:40
15:47:42	FLOAT_SWITCH_0_15:47:40
15:47:40	FLOAT_SWITCH_1_15:47:38
15:47:39	FLOAT_SWITCH_1_15:47:38
15:45:07	PUMP_START_15:45:04
15:45:06	PUMP_START_15:45:04
15:45:06	PUMP_START_15:45:03
15:45:05	PUMP_START_15:45:03
15:45:05	PUMP_START_15:45:03
15:45:04	PUMP_START_15:45:03
15:45:04	PUMP_START_15:45:02
15:45:03	PUMP_START_15:45:02
15:45:02	4_PUMP_ON_15:45:00
15:45:01	4_PUMP_ON_15:45:00

15:33:01	4_PUMP_0_FLOAT_0_15:33:00
15:33:01	4_PUMP_0_FLOAT_0_15:33:00
15:30:10	PUMP_START_15:30:09
15:30:10	PUMP_START_15:30:09
15:30:05	PUMP_START_15:30:03
15:30:05	PUMP_START_15:30:03
15:30:04	PUMP_START_15:30:02
15:30:04	PUMP_START_15:30:02
15:30:04	PUMP_START_15:30:02
15:30:03	PUMP_START_15:30:02
15:30:02	4_PUMP_ON_15:30:00
15:30:01	4_PUMP_ON_15:30:00

15:18:10	PUMP_STOP_15:18:09
15:18:10	PUMP_STOP_15:18:09
15:18:10	PUMP_STOP_15:18:08
15:18:09	PUMP_STOP_15:18:08
15:18:03	PUMP_STOP_15:18:02
15:18:03	PUMP_STOP_15:18:02
15:18:02	PUMP_STOP_15:18:01
15:18:02	PUMP_STOP_15:18:01
15:18:01	4_PUMP_0_FLOAT_0_15:18:00
15:18:00	4_PUMP_0_FLOAT_0_15:18:00
15:15:11	PUMP_START_15:15:09
15:15:11	PUMP_START_15:15:09
15:15:04	PUMP_START_15:15:03
15:15:04	PUMP_START_15:15:03
15:15:04	PUMP_START_15:15:02
15:15:03	PUMP_START_15:15:02
15:15:03	PUMP_START_15:15:02
15:15:03	PUMP_START_15:15:02
15:15:01	4_PUMP_ON_15:15:00
15:15:01	4_PUMP_ON_15:15:00

15:03:11	PUMP_STOP_15:03:08
15:03:11	PUMP_STOP_15:03:08
15:03:04	PUMP_STOP_15:03:03
15:03:04	PUMP_STOP_15:03:03
15:03:03	PUMP_STOP_15:03:01
15:03:03	PUMP_STOP_15:03:01
15:03:03	PUMP_STOP_15:03:01
15:03:03	PUMP_STOP_15:03:01
15:03:01	4_PUMP_0_FLOAT_0_15:03:00
15:03:01	4_PUMP_0_FLOAT_0_15:03:00
15:00:56	PUMP_START_15:00:46
15:00:55	PUMP_START_15:00:46
15:00:55	PUMP_START_15:00:46
15:00:54	PUMP_START_15:00:46
15:00:54	PUMP_START_15:00:45
15:00:53	PUMP_START_15:00:45
15:00:53	PUMP_START_15:00:45
15:00:52	PUMP_START_15:00:45
15:00:45	4_PUMP_ON_15:00:00
15:00:44	4_PUMP_ON_15:00:00

14:48:04	PUMP_STOP_14:48:02
14:48:04	PUMP_STOP_14:48:02
14:48:04	PUMP_STOP_14:48:02
14:48:03	PUMP_STOP_14:48:02
14:48:03	PUMP_STOP_14:48:01
14:48:02	PUMP_STOP_14:48:01
14:48:01	4_PUMP_0_FLOAT_0_14:48:00
14:48:00	4_PUMP_0_FLOAT_0_14:48:00
14:45:15	PUMP_START_14:45:09
14:45:14	PUMP_START_14:45:09
14:45:05	PUMP_START_14:45:03
14:45:05	PUMP_START_14:45:03
14:45:04	PUMP_START_14:45:03
14:45:04	PUMP_START_14:45:03
14:45:04	PUMP_START_14:45:02
14:45:04	PUMP_START_14:45:02
14:45:02	4_PUMP_ON_14:45:00
14:45:01	4_PUMP_ON_14:45:00

14:33:13	PUMP_STOP_14:33:08
14:33:13	PUMP_STOP_14:33:08
14:33:04	PUMP_STOP_14:33:02
14:33:04	PUMP_STOP_14:33:02
14:33:04	PUMP_STOP_14:33:02
14:33:03	PUMP_STOP_14:33:02
14:33:03	PUMP_STOP_14:33:01
14:33:03	PUMP_STOP_14:33:01
14:33:01	4_PUMP_0_FLOAT_0_14:33:00
14:33:01	4_PUMP_0_FLOAT_0_14:33:00
14:30:10	PUMP_START_14:30:08
14:30:09	PUMP_START_14:30:08
14:30:04	PUMP_START_14:30:03
14:30:04	PUMP_START_14:30:03
14:30:04	PUMP_START_14:30:01
14:30:04	PUMP_START_14:30:01
14:30:03	PUMP_START_14:30:01
14:30:03	PUMP_START_14:30:01
14:30:02	4_PUMP_ON_14:30:00
14:30:01	4_PUMP_ON_14:30:00

14:18:07	PUMP_STOP_14:18:03
14:18:06	PUMP_STOP_14:18:03
14:18:06	PUMP_STOP_14:18:03
14:18:05	PUMP_STOP_14:18:03
14:18:05	PUMP_STOP_14:18:03
14:18:05	PUMP_STOP_14:18:03
14:18:04	PUMP_STOP_14:18:03
14:18:04	PUMP_STOP_14:18:03
14:18:01	4_PUMP_0_FLOAT_0_14:18:00
14:18:01	4_PUMP_0_FLOAT_0_14:18:00
14:15:10	PUMP_START_14:15:09
14:15:10	PUMP_START_14:15:09
14:15:06	PUMP_START_14:15:03
14:15:05	PUMP_START_14:15:03
14:15:04	PUMP_START_14:15:03
14:15:04	PUMP_START_14:15:03
14:15:04	PUMP_START_14:15:02
14:15:03	PUMP_START_14:15:02
14:15:02	4_PUMP_ON_14:15:00
14:15:01	4_PUMP_ON_14:15:00

14:03:09	PUMP_STOP_14:03:08
14:03:09	PUMP_STOP_14:03:08
14:03:04	PUMP_STOP_14:03:02
14:03:04	PUMP_STOP_14:03:02
14:03:03	PUMP_STOP_14:03:02
14:03:03	PUMP_STOP_14:03:02
14:03:03	PUMP_STOP_14:03:01
14:03:02	PUMP_STOP_14:03:01
14:03:01	4_PUMP_0_FLOAT_0_14:03:00
14:03:01	4_PUMP_0_FLOAT_0_14:03:00
14:00:10	PUMP_START_14:00:03
14:00:09	PUMP_START_14:00:03
14:00:09	PUMP_START_14:00:03
14:00:09	PUMP_START_14:00:03
14:00:08	PUMP_START_14:00:02
14:00:08	PUMP_START_14:00:02
14:00:07	PUMP_START_14:00:02
14:00:05	PUMP_START_14:00:02
14:00:01	4_PUMP_ON_14:00:00
14:00:01	4_PUMP_ON_14:00:00

13:48:07	PUMP_STOP_13:48:03
13:48:07	PUMP_STOP_13:48:03
13:48:06	PUMP_STOP_13:48:03
13:48:05	PUMP_STOP_13:48:03
13:48:05	PUMP_STOP_13:48:03
13:48:04	PUMP_STOP_13:48:03
13:48:04	PUMP_STOP_13:48:03
13:48:04	PUMP_STOP_13:48:03
13:48:01	4_PUMP_0_FLOAT_0_13:48:00
13:48:00	4_PUMP_0_FLOAT_0_13:48:00
13:45:09	PUMP_START_13:45:08
13:45:08	PUMP_START_13:45:08
13:45:04	PUMP_START_13:45:02
13:45:03	PUMP_START_13:45:02
13:45:03	PUMP_START_13:45:02
13:45:03	PUMP_START_13:45:02
13:45:02	PUMP_START_13:45:01
13:45:02	PUMP_START_13:45:01
13:45:01	4_PUMP_ON_13:45:00
13:45:00	4_PUMP_ON_13:45:00

13:33:04	PUMP_STOP_13:33:02
13:33:04	PUMP_STOP_13:33:02
13:33:04	PUMP_STOP_13:33:01
13:33:03	PUMP_STOP_13:33:01
13:33:03	PUMP_STOP_13:33:01
13:33:02	PUMP_STOP_13:33:01
13:33:02	PUMP_STOP_13:33:01
13:33:02	PUMP_STOP_13:33:01
13:33:01	4_PUMP_0_FLOAT_0_13:33:00
13:33:01	4_PUMP_0_FLOAT_0_13:33:00
13:18:12	PUMP_STOP_13:18:07
13:18:12	PUMP_STOP_13:18:07
13:18:03	PUMP_STOP_13:18:01
13:18:03	PUMP_STOP_13:18:01
13:18:03	PUMP_STOP_13:18:01
13:18:02	PUMP_STOP_13:18:01
13:18:02	PUMP_STOP_13:18:01
13:18:02	PUMP_STOP_13:18:01
13:18:01	4_PUMP_0_FLOAT_0_13:18:00
13:18:01	4_PUMP_0_FLOAT_0_13:18:00
13:15:10	PUMP_START_13:15:08
13:15:09	PUMP_START_13:15:08
13:15:04	PUMP_START_13:15:02
13:15:04	PUMP_START_13:15:02
13:15:03	PUMP_START_13:15:02
13:15:03	PUMP_START_13:15:02
13:15:03	PUMP_START_13:15:01
13:15:03	PUMP_START_13:15:01
13:15:01	4_PUMP_ON_13:15:00
13:15:01	4_PUMP_ON_13:15:00

13:03:05	PUMP_STOP_13:03:03
13:03:05	PUMP_STOP_13:03:03
13:03:04	PUMP_STOP_13:03:03
13:03:04	PUMP_STOP_13:03:03
13:03:04	PUMP_STOP_13:03:02
13:03:04	PUMP_STOP_13:03:02
13:03:03	PUMP_STOP_13:03:02
13:03:03	PUMP_STOP_13:03:02
13:03:01	4_PUMP_0_FLOAT_0_13:03:00
13:03:01	4_PUMP_0_FLOAT_0_13:03:00
13:00:09	PUMP_START_13:00:07
13:00:09	PUMP_START_13:00:06
13:00:09	PUMP_START_13:00:04
13:00:09	PUMP_START_13:00:07
13:00:08	PUMP_START_13:00:06
13:00:08	PUMP_START_13:00:04
13:00:08	PUMP_START_13:00:02
13:00:07	PUMP_START_13:00:02
13:00:02	4_PUMP_ON_13:00:00
13:00:01	4_PUMP_ON_13:00:00

12:48:07	PUMP_STOP_12:48:02
12:48:06	PUMP_STOP_12:48:02
12:48:06	PUMP_STOP_12:48:02
12:48:06	PUMP_STOP_12:48:02
12:48:05	PUMP_STOP_12:48:01
12:48:05	PUMP_STOP_12:48:01
12:48:05	PUMP_STOP_12:48:01
12:48:05	PUMP_STOP_12:48:01
12:48:04	4_PUMP_0_FLOAT_0_12:48:00
12:48:03	4_PUMP_0_FLOAT_0_12:48:00
12:45:12	PUMP_START_12:45:07
12:45:12	PUMP_START_12:45:07
12:45:06	PUMP_START_12:45:02
12:45:05	PUMP_START_12:45:02
12:45:05	PUMP_START_12:45:01
12:45:05	PUMP_START_12:45:01
12:45:05	PUMP_START_12:45:01
12:45:04	PUMP_START_12:45:01
12:45:03	4_PUMP_ON_12:45:00
12:45:03	4_PUMP_ON_12:45:00

12:33:13	PUMP_STOP_12:33:08
12:33:13	PUMP_STOP_12:33:08
12:33:06	PUMP_STOP_12:33:03
12:33:06	PUMP_STOP_12:33:03
12:33:05	PUMP_STOP_12:33:01
12:33:05	PUMP_STOP_12:33:01
12:33:05	PUMP_STOP_12:33:01
12:33:04	PUMP_STOP_12:33:01
12:33:03	4_PUMP_0_FLOAT_0_12:33:00
12:33:03	4_PUMP_0_FLOAT_0_12:33:00
12:30:11	PUMP_START_12:30:08
12:30:11	PUMP_START_12:30:08
12:30:06	PUMP_START_12:30:02
12:30:05	PUMP_START_12:30:02
12:30:05	PUMP_START_12:30:02
12:30:05	PUMP_START_12:30:02
12:30:05	PUMP_START_12:30:01
12:30:04	PUMP_START_12:30:01
12:30:03	4_PUMP_ON_12:30:00
12:30:03	4_PUMP_ON_12:30:00

12:18:08	PUMP_STOP_12:18:03
12:18:08	PUMP_STOP_12:18:03
12:18:07	PUMP_STOP_12:18:02
12:18:06	PUMP_STOP_12:18:02
12:18:06	PUMP_STOP_12:18:02
12:18:06	PUMP_STOP_12:18:02
12:18:05	PUMP_STOP_12:18:01
12:18:05	PUMP_STOP_12:18:01
12:18:04	4_PUMP_0_FLOAT_0_12:18:00
12:18:03	4_PUMP_0_FLOAT_0_12:18:00
12:15:14	PUMP_START_12:15:08
12:15:14	PUMP_START_12:15:08
12:15:05	PUMP_START_12:15:02
12:15:05	PUMP_START_12:15:02
12:15:05	PUMP_START_12:15:01
12:15:04	PUMP_START_12:15:01
12:15:04	PUMP_START_12:15:01
12:15:04	PUMP_START_12:15:01
12:15:03	4_PUMP_ON_12:15:00
12:15:02	4_PUMP_ON_12:15:00

12:03:16	PUMP_STOP_12:03:09
12:03:15	PUMP_STOP_12:03:09
12:03:07	PUMP_STOP_12:03:03
12:03:06	PUMP_STOP_12:03:03
12:03:06	PUMP_STOP_12:03:02
12:03:05	PUMP_STOP_12:03:02
12:03:05	PUMP_STOP_12:03:02
12:03:05	PUMP_STOP_12:03:02
12:03:03	4_PUMP_0_FLOAT_0_12:03:00
12:03:03	4_PUMP_0_FLOAT_0_12:03:00
12:00:08	PUMP_START_12:00:04
12:00:08	PUMP_START_12:00:04
12:00:08	PUMP_START_12:00:04
12:00:07	PUMP_START_12:00:04
12:00:07	PUMP_START_12:00:03
12:00:07	PUMP_START_12:00:03
12:00:06	PUMP_START_12:00:03
12:00:06	PUMP_START_12:00:03
12:00:04	4_PUMP_ON_12:00:00
12:00:03	4_PUMP_ON_12:00:00

11:48:08	PUMP_STOP_11:48:02
11:48:07	PUMP_STOP_11:48:02
11:48:06	PUMP_STOP_11:48:01
11:48:06	PUMP_STOP_11:48:01
11:48:05	PUMP_STOP_11:48:01
11:48:05	PUMP_STOP_11:48:01
11:48:04	PUMP_STOP_11:48:01
11:48:04	PUMP_STOP_11:48:01
11:48:03	4_PUMP_0_FLOAT_0_11:48:00
11:48:02	4_PUMP_0_FLOAT_0_11:48:00
11:45:11	PUMP_START_11:45:08
11:45:10	PUMP_START_11:45:08
11:45:06	PUMP_START_11:45:02
11:45:06	PUMP_START_11:45:02
11:45:06	PUMP_START_11:45:02
11:45:05	PUMP_START_11:45:02
11:45:05	PUMP_START_11:45:01
11:45:05	PUMP_START_11:45:01
11:45:03	4_PUMP_ON_11:45:00
11:45:02	4_PUMP_ON_11:45:00

11:33:16	PUMP_STOP_11:33:08
11:33:16	PUMP_STOP_11:33:08
11:33:06	PUMP_STOP_11:33:02
11:33:05	PUMP_STOP_11:33:02
11:33:05	PUMP_STOP_11:33:01
11:33:05	PUMP_STOP_11:33:01
11:33:04	PUMP_STOP_11:33:01
11:33:04	PUMP_STOP_11:33:01
11:33:03	4_PUMP_0_FLOAT_0_11:33:00
11:33:02	4_PUMP_0_FLOAT_0_11:33:00
11:30:19	PUMP_START_11:30:16
11:30:18	PUMP_START_11:30:16
11:30:14	PUMP_START_11:30:10
11:30:13	PUMP_START_11:30:10
11:30:03	4_PUMP_ON_11:30:00
11:30:02	4_PUMP_ON_11:30:00

11:18:12	PUMP_STOP_11:18:08
11:18:12	PUMP_STOP_11:18:08
11:18:06	PUMP_STOP_11:18:02
11:18:06	PUMP_STOP_11:18:02
11:18:05	PUMP_STOP_11:18:01
11:18:05	PUMP_STOP_11:18:01
11:18:05	PUMP_STOP_11:18:01
11:18:04	PUMP_STOP_11:18:01
11:18:03	4_PUMP_0_FLOAT_0_11:18:00
11:18:03	4_PUMP_0_FLOAT_0_11:18:00
11:15:11	PUMP_START_11:15:08
11:15:11	PUMP_START_11:15:08
11:15:06	PUMP_START_11:15:02
11:15:06	PUMP_START_11:15:02
11:15:05	PUMP_START_11:15:02
11:15:05	PUMP_START_11:15:02
11:15:05	PUMP_START_11:15:01
11:15:04	PUMP_START_11:15:01
11:15:03	4_PUMP_ON_11:15:00
11:15:03	4_PUMP_ON_11:15:00

11:03:03	4_PUMP_0_FLOAT_0_11:03:00
11:03:03	4_PUMP_0_FLOAT_0_11:03:00

10:48:11	PUMP_STOP_10:48:08
10:48:11	PUMP_STOP_10:48:08
10:48:06	PUMP_STOP_10:48:03
10:48:06	PUMP_STOP_10:48:03
10:48:05	PUMP_STOP_10:48:01
10:48:05	PUMP_STOP_10:48:01
10:48:05	PUMP_STOP_10:48:01
10:48:04	PUMP_STOP_10:48:01
10:48:03	4_PUMP_0_FLOAT_0_10:48:00
10:48:03	4_PUMP_0_FLOAT_0_10:48:00
10:45:06	PUMP_START_10:45:02
10:45:06	PUMP_START_10:45:02
10:45:06	PUMP_START_10:45:02
10:45:05	PUMP_START_10:45:02
10:45:05	PUMP_START_10:45:01
10:45:05	PUMP_START_10:45:01
10:45:04	PUMP_START_10:45:01
10:45:04	PUMP_START_10:45:01
10:45:03	4_PUMP_ON_45_10:45:00
10:45:03	4_PUMP_ON_45_10:45:00

10:33:04	4_PUMP_0_FLOAT_0_10:33:00
10:33:03	4_PUMP_0_FLOAT_0_10:33:00
10:30:12	PUMP_START_10:30:09
10:30:12	PUMP_START_10:30:09
10:30:07	PUMP_START_10:30:04
10:30:07	PUMP_START_10:30:04
10:30:06	PUMP_START_10:30:02
10:30:06	PUMP_START_10:30:02
10:30:06	PUMP_START_10:30:02
10:30:06	PUMP_START_10:30:02
10:30:03	4_PUMP_ON_30_10:30:00
10:30:03	4_PUMP_ON_30_10:30:00
What is mostly missing is "FLOAT_SWITCH_1_%systime%"
This is when the water rises pushing float switch up, stopping the pump
Going out to watch a cycle now due 8.30AM is 8.28 off I run

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#24 Post by Oxyandy » 20 Mar 2018, 22:42

I still say this is too busy, I see float switch '1' is missing, I watched and it nearly flooded over
I am using this Sonoff in a real world use, flooding over has been a problem, a big problem - so I have added bits to prevent that, including shortening the timer cycle, it was 5 minutes, now 3..
I am now going to do a run without the pull-up because I am worried it is now helping the GPIO stay high,
either there was a lag or the switch did not respond properly..
8.45 cycle about to begin, I want to watch auto not manual

Code: Select all

2018-03-21 08:33:06	PUMP_STOP_08:33:03
2018-03-21 08:33:06	PUMP_STOP_08:33:03
2018-03-21 08:33:05	PUMP_STOP_08:33:03
2018-03-21 08:33:05	PUMP_STOP_08:33:03
2018-03-21 08:33:04	PUMP_STOP_08:33:01
2018-03-21 08:33:04	PUMP_STOP_08:33:01
2018-03-21 08:33:03	PUMP_STOP_08:33:01
2018-03-21 08:33:03	PUMP_STOP_08:33:01
2018-03-21 08:33:03	4_PUMP_0_FLOAT_0_08:33:00
2018-03-21 08:33:02	4_PUMP_0_FLOAT_0_08:33:00
2018-03-21 08:30:11	PUMP_START_08:30:08
2018-03-21 08:30:11	PUMP_START_08:30:08
2018-03-21 08:30:05	PUMP_START_08:30:02
2018-03-21 08:30:04	PUMP_START_08:30:02
2018-03-21 08:30:04	PUMP_START_08:30:01
2018-03-21 08:30:04	PUMP_START_08:30:01
2018-03-21 08:30:03	PUMP_START_08:30:01
2018-03-21 08:30:03	PUMP_START_08:30:01

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#25 Post by Oxyandy » 21 Mar 2018, 00:05

So somewhere, something was wrong...
as i said on github
It was not until I cold booted that it resolved, how a log of a single cycle should look
PUMP_STOP_ seems missing too, I will need to do more cycles & check SYSLOG too

Code: Select all

2018-03-21 09:47:48	FLOAT_0_09:47:44
2018-03-21 09:47:47	FLOAT_SWITCH_0_09:47:44
2018-03-21 09:47:47	FLOAT_0_09:47:44               <<- _0 = '0' state after float switch lowered
2018-03-21 09:47:46	FLOAT_SWITCH_0_09:47:44 <<- '0' state
2018-03-21 09:47:45	FLOAT_1_09:47:41
2018-03-21 09:47:45	FLOAT_1_09:47:41               <<- '1' state
2018-03-21 09:47:44	FLOAT_SWITCH_1_09:47:41
2018-03-21 09:47:44	FLOAT_SWITCH_1_09:47:41 <<- _1 = '1' state
2018-03-21 09:45:05	PUMP_START_09:45:02
2018-03-21 09:45:05	PUMP_START_09:45:02
2018-03-21 09:45:05	PUMP_START_09:45:02
2018-03-21 09:45:04	PUMP_START_09:45:02
2018-03-21 09:45:04	PUMP_START_09:45:01
2018-03-21 09:45:04	PUMP_START_09:45:01
2018-03-21 09:45:03	PUMP_START_09:45:01
2018-03-21 09:45:03	PUMP_START_09:45:01
2018-03-21 09:45:02	4_PUMP_ON_09:45:00
2018-03-21 09:45:02	4_PUMP_ON_09:45:00

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#26 Post by TD-er » 22 Mar 2018, 00:45

Just curious, did you ever cold-boot the ESP after flashing?
There's something fishy on the ESP state after flashing. For example the pin states may sometimes be incorrect and some features do not work properly like OTA.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#27 Post by Oxyandy » 22 Mar 2018, 01:49

Yes mate, flashed inside, then taken to be used outside..
I was told on github - "We know about some issues with inverted state of switch, just use as normal and will be fine."
Great nice to know, but I do not use 'inverted'
Ungggtitled.jpg
Ungggtitled.jpg (56.48 KiB) Viewed 25484 times
So I will clarify, I finally discovered that after some time (logs & lot's of CAREFUL observation)
some of my rules actually stop working..
(or maybe VERY slow responding - hmm will look again, very closely - further thought NAH, the entries are completely missing from the logs, not just late)
How I noticed the rules stopped working:
  • 1. The float switch across GPIO14 stopped showing in my logs. (completely missing from the logs, not just late)
  • 2. I manually started pump, manually raised float switch across GPIO14, (closed to open contacts) - nothing - pump kept on going..
So I removed cables going to switch from the circuit board..
manually started pump & 'then' bridged GPIO14's header pin to ground with a jumper cable between the 2 header pins..
omg, pump just kept on running...
Removed jumper cable between the header pins GND & GPIO14
Powered Sonoff down, 'cold botted' & tried again - then it responded properly
Last edited by Oxyandy on 22 Mar 2018, 06:57, edited 3 times in total.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#28 Post by Oxyandy » 22 Mar 2018, 02:38

TD-er
And in hindsight, I should have noticed sooner because quite simply the manual button becomes painful to use to turn relay on..
Do you have a sonoff basic @TD-er

Code: Select all

 on button#switch do
  if [button#switch]=1
   GPIO,12,1
  else
   GPIO,12,0
  endif
 endon 
The rule for the manual button above. This stops responding too !
So to replicate you should only need to work with the button..
Make a Sonoff's button respond properly & you might have solved the problem

I will do the rest of the testing for you...

The on Clock#Time= seems to work very well - logs show this..
I hope this helps you pin down the cause..
I can upload whole 1meg back-ups of existing firmware if helps, just ask

EDIT: maybe you need my rules running too ?
I should try replicate with basics, that way I know you can replicate it too, I do not want you to waste your time.
Last edited by Oxyandy on 22 Mar 2018, 03:26, edited 1 time in total.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#29 Post by Oxyandy » 22 Mar 2018, 02:46

TD-er wrote: 22 Mar 2018, 00:45 Just curious, did you ever cold-boot the ESP after flashing?
There's something fishy on the ESP state after flashing. For example the pin states may sometimes be incorrect and some features do not work properly like OTA.
And everything seems OK for a while after Cold-Booting, then problems start..
and this happens on every board I flash, I have many - it is not isolated to a single unit
and every firmware release since I started playing with Sonoffs, not that long really
Thanks
Andy

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#30 Post by Oxyandy » 22 Mar 2018, 08:21

Pathetic.jpg
Pathetic.jpg (55.68 KiB) Viewed 25467 times
Current firmware I am trying, it is so bad all I need to do is:
Cold Boot
Check devices page, GPIO14,0 -good
Manually move switch up to 'open circuit switch' and hold.
load devices page, GPIO14,1 -good
Allow switch to return to resting position GPIO14,0
Try reload devices page to check if GPIO14 is 0
No response from web server for a while
When it finally loads GPIO14,1 on devices page =fail
It's stuck...

Using ESP_Easy_mega-20180322_normal_ESP8266_1024.bin

Then it stays '1' in the device page
Then rules like this are ignored, the firmware will not respond to a change, even if I stand there slowly moving the switch up/down - on/off

Code: Select all

on FULL_Tray_4#Switch do //my float switch
if [PUMP_Tray_4#Switch]=1 //my pump (relay)
   GPIO,12,0
  endif
endon

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#31 Post by TD-er » 22 Mar 2018, 20:16

Last week I was looking into the effects of WiFi reconnects on the overall responsiveness of the device and changed the way how WiFi is working.
until 20180316 it was using the 'old' wifi implementation.
Since then, it is using the new WiFi implementation I made. However some rather nasty issues are reported by others. Issues I cannot all reproduce yet.

So I'm also very busy pinpointing those issues.
Things might be related to what you see, but not sure yet.
I really have no clue why your rules stop working.
In the later builds a download button has been added for the rules, since there was also an issue with the formatting of the rules, which cannot be seen from the web interface. (e.g. mixing Linux/Windows line endings, spaces, tabs, etc.)

You could download the rules in binary format and open that in Notepad++ and activate "show all characters".

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#32 Post by Oxyandy » 23 Mar 2018, 06:55

So a rule.txt file
Could be a different encoding UTF-8 or ANSI or something else
New lines could be CRLF or just LF
HEX 0D0A vs 0A
Great, are you saying that something in the code can not ignore illegal characters or convert EOL characters as a rules.txt is uploaded ?
Brings the question which format can the rules engine handle ?

At present I am re-formatting all EOLs to just LF on all rules*.txt files and then uploading them.
But should they be ANSI ? Hmmm

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#33 Post by Oxyandy » 23 Mar 2018, 10:32

Using ESP_Easy_mega-20180322_normal_ESP8266_1024.bin on a Sonoff Basic

Rules.txt files are formatted EOL (Unix) LF & are UTF-8 without BOM..
Even & especially the last line of text in each rule.txt even has a LF
there are no spaces at the end of lines, but there are some spaces at beginning of lines to make the formatting 'pretty' - no TABs used & no comments

Code: Select all

on rules#engine=working do
  if [really#working]=1
   Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":"PARTY_TIME"}
  else
   Publish domoticz/in,{"idx":26,"nvalue":0,"svalue":PARTY_STOP"}
  endif
endon
Ok so I have done that.
They were uploaded and the unit was tested
Cold boot with switch connected:
GPIO14,0 - good
Cold boot with switch disconnected:
GPIO14,1 - good
system#boot notify 1 trigger ? - it has stopped triggering
On previous very recent versions, this worked fine, tried 5 times, not once did it send an email....

Opened Notify 1, clicked test it went straight through..
I also use Onclock with notify 1, tested that, still works..

I have still seen my GPIO14 get stuck on '1' since I have uploaded new rules.txt with LF
I am not stopping - next 'change' is a bit radical, I will do lots of edits to the switch names, case (all lowercase), spaces, formatting, remove underscores, turn off SYSLOG & ANSI encoding all at once, and try yet again..
Tell me what to do, what to upload, what to log, what to change & I will do it..
Last edited by Oxyandy on 23 Mar 2018, 12:28, edited 3 times in total.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#34 Post by Oxyandy » 23 Mar 2018, 11:18

Nope, all that and no obvious benefit.

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#35 Post by TD-er » 23 Mar 2018, 11:29

There is also an issue to report to the user when things are set which may cause issues (e.g. name duplication, use of spaces, etc)
And the rules parser still has to be made more resilient to parse errors. (e.g. allow spaces/tabs at end of line, allow CRLF and just CR)

The thing is, there are way more issues than active developers and the error reporting/remote debugging takes a lot of time, which is really sparse.

Take me for example:
- 40h/week job
- 10 - 15h/week commute
- Daughter of 4.
- Lots of issues regarding the house, which alone would take hours to explain.

And on top of that there has to be some time to sleep, pay attention to GF and program ESPeasy.
So please have some patience with me, since there are only 168 hours a week and this week even an hour less. ;)

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#36 Post by Oxyandy » 23 Mar 2018, 12:55

In my last post I wrote:
"Nope, all that and no obvious benefit."
I will admit I was impatient when I wrote that, in Melbourne, Australia here it was getting dark, I am working on things outdoors...
Maybe, just maybe, things have improved from my 'all at once changes'.. Are thing working better ???
Time will tell & some careful observation, if so - I will back track changes & see if I can pin the cause
I really need time to observe properly & do some logging of data.. Cause well, thing have changed.

on boot notify has failed, this is likely caused by some of the changes you made to WiFi, something for you to test ???

I am not impatient with you TD-er, but I am extremely frustrated now with the tech, because these failures are harming my prize strawberry plants
I DO love the potential this firmware has :roll:
I am trying SO hard to nail it.. like my last post said I changed a lot - the exact 'same rules', only converted to lowercase, removed underscores (see previous post) etc
I want a fool proof easy way for you to replicate & confirm easily what I am seeing.. so you can see & see it guaranteed = no wasted time !
I have coding experience so I know 'nailing it' will help heaps..

YES you must not ignore your family !
They should be #1
You have my utmost respect for even answering me
Most of my posts go unanswered, haha
see here https://github.com/arendst/Sonoff-Tasmota/issues/1991
I will have a coffee, chill a bit, then wander outside to observe things patiently & closely
Initial observation is GPIO14 is NOT stuck '1' :o - so I reset my logs & everything is running on auto

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#37 Post by Oxyandy » 23 Mar 2018, 21:36

Wow, all night & my switch never got stuck as '1'
So I have not 'nailed it', but I have most definitely 'narrowed it' down
I have just woke it is 7.26AM and although sun is not up, is light enough to see out there
The uptime is not looking good
chart.png
chart.png (82.2 KiB) Viewed 25610 times
Maybe the resets are what keeps it from breaking :lol: the first part of this graph would have been before, then initial testing of most recent changes I made
Not much more to say right now, I will again back track, first thing will be to back-up everything 'as is'
Then I think I will add the underscores back to see if there is any change

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#38 Post by Oxyandy » 23 Mar 2018, 22:42

I swear I have done nothing except load the device page & walk outside to view the reservoir level !
The reservoir was topped up last night & it's level is better than any logs, (quick summary of real operation)
if level has dropped dramatically then pump has not turned off when it should.. System has then overflowed over the sides...
The new chart... and 3 emails from OnClock to tell me when pump went to start GPIO14, my float switch was stuck '1'...... again
Maybe I was right about those resets keeping everything working: - the new chart below
chart (3).jpg
chart (3).jpg (68.95 KiB) Viewed 25607 times
Ok, I already know with OnBoot the email does not get through...
See my "1" in the chart, it looks like WiFi took a little bit to reconnect, maybe the same thing has now happened then but that email never made it..
Then it seems to have reset and fixed itself.
This time as chart shows, uptime is growing.. while fault exists
I now have 4 emails
7.45AM 8.00AM 8.15AM 8.30AM
So loading the devices page upset it's operation that much ? wow - initial observation only
So to be clear since my last post GPIO14 is again stuck '1'
Last edited by Oxyandy on 23 Mar 2018, 23:03, edited 2 times in total.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#39 Post by Oxyandy » 23 Mar 2018, 22:51

Just when I thought I was making 'real progress'
<head bowed & hands covering face>
What to do next ?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#40 Post by grovkillen » 23 Mar 2018, 23:17

I have a feeling that setting a relay to a device/task (switch plugin) is not working properly on later releases. I have now changed a rule to also have a TaskValueSet to make sure the gpio state is updated on the device list. If I go to pin state buffer I could see that actually the pin is correct but the device value showed wrong.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#41 Post by Oxyandy » 23 Mar 2018, 23:47

I have not seen any issue with my relay on GPIO12, it has always turned on when it has meant to & always shown the correct state in the device page.
It is only my switch on GPIO14 that has been a problem..

The OnClock rules seem to work really well.
I have not been able to open an issue 'to cover everything I see going wrong' on GitHub because I am still not sure how to make it easily replicable for developers..
I guess I could break the issues into 'blocks', see if those issues can be improved upon and the impact it has on other issues rather than try and show everything I see all at once = information overload..
I am growing weary of trying to have a workable module

I am open to any suggestion & can supply any data that anyone might consider helpful to a resolution.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#42 Post by Oxyandy » 24 Mar 2018, 00:26

Somewhere recently I Cold Booted - I looked down and the reservoir level was low, great another overflow.....
And so... I was just out there, an onClock event started - obviously ignoring my rule to not pump if GPIO14 was '1'
well actually, I had to pull the power cord to stop more water loss, was it a lag in response to change in GPIO14's state ????? or whatever..
Now I have pulled the power I can not easily even tell...
Enough grief, it's costing me too much time and making ME look like a complete idiot in front of my wife..
Time for other alternatives

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#43 Post by TD-er » 24 Mar 2018, 01:47

I've been working all afternoon (well until now, almost 2 am) on these WiFi issues.
See PR: https://github.com/letscontrolit/ESPEasy/pull/1165
The thing is, the reconnect of WiFi may take a lot of resources from the ESP unit, which has all kinds of side-effects.
For this approach the WiFi will be managed completely event based and no longer polling.

Still, the possible issue @Grovkillen mentioned with the recorded state of pins is not being dealt with yet.

And there is also another PR ready to improve the handling speed of commands (you also execute commands from rules)

So we're working on getting the thing as stable as soon as possible, although it is still a few months waiting for us literally on the other side of the planet, before we can expect some strawberries in our garden.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#44 Post by Oxyandy » 24 Mar 2018, 02:51

Again, please do not misunderstand me, I know you are not paid...
If you want to point me in the direction of something, anything to replace the existing firmware then supply feedback, by all means do so..
Something to test for you ? Ok too...
email me if that helps - oxyandy at google's service ;)

Happy to help where I can, but as my most recent posts reflect, just when I thought I was getting somewhere BAM something happens which devastates me..
It is completely true that I have my wife looking over my shoulder & completely true that she 100% lays blame on me for stupidity, she is not good with technical things & can only see I am getting nowhere...
I sometimes feel excited that I am getting somewhere & share that with her, only to fall flat on my face..
I installed an access point (outdoor hacked up old ADSL router) and log WiFi strength it has been great...
Remember I said that firing a rule - the logs get too busy ?
I still stand by that, what the logs show now looks like a resource pig..
I think they should be

Code: Select all

12:00:00 OnClock timer start 
12:00:00 Pump On
12:02:54 Float Switch '1'
12:02:54 Pump Off
12:02:56 Float Switch '0'
12:05:00 OnClock timer stop
But instead is normally

Code: Select all

2x OnClock timer start
8x Pump On
8x (msgs) about Float Switch
8x Pump Off
2x OnClock timer stop
All sent via WiFi cause I added 'publish' in middle of rules, but it was the same when I was using SYSLOG, the new style just easier to examine at a glance..
But yeah I know, you have other tasks to do...
Not trying to push you TD-er ... That would just be rude..
Is simply like a diary of my 'real experience' & frustrations over my experience & observations.

User avatar
Methuselah
Normal user
Posts: 45
Joined: 04 Feb 2018, 01:39
Location: Boston, MA

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#45 Post by Methuselah » 24 Mar 2018, 09:59

Oxyandy wrote: 24 Mar 2018, 02:51 just when I thought I was getting somewhere BAM something happens which devastates me..
It’s been apparent to me (and many other readers) for a long time that ESPEasy is not the product for you. It simply isn’t going to have the level of stability, and support, you need for your application.
N00b to the world of ESPEasy, but I've been programming since the days of punch cards and paper tape :)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#46 Post by grovkillen » 24 Mar 2018, 11:09

Methuselah wrote: 24 Mar 2018, 09:59
Oxyandy wrote: 24 Mar 2018, 02:51 just when I thought I was getting somewhere BAM something happens which devastates me..
It’s been apparent to me (and many other readers) for a long time that ESPEasy is not the product for you. It simply isn’t going to have the level of stability, and support, you need for your application.
We're trying our best to make sure that the FW is top notch but major rewrite of code is done and with that bugs will be showing up. Maybe you'll have to wait and come back here at a later stage.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#47 Post by Oxyandy » 24 Mar 2018, 21:48

Methuselah wrote: 24 Mar 2018, 09:59
Oxyandy wrote: 24 Mar 2018, 02:51 just when I thought I was getting somewhere BAM something happens which devastates me..
It’s been apparent to me (and many other readers) for a long time that ESPEasy is not the product for you. It simply isn’t going to have the level of stability, and support, you need for your application.
Quite the opposite, this is not a dead project.. No other firmware comes close to meeting my needs !
I am keeping an eye on the development and it is making awesome progress !
My goal was to be able to spell out my experiences and make careful enough observations - to pin down the points of failure in an easy repeatable way,
making developers lives as easy as possible to then initiate positive change, but that is were I have been getting stuck.
TD-er has taken note, provided feedback and offered a solution, for this I am grateful, it's just testing in a 'real life' situation was harmful to my plants, so as I said.. yesterday I made an alternative way to keep my plants happy, so that will save me a lot of time looking after them, so I can focus better on modules

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#48 Post by Oxyandy » 24 Mar 2018, 22:11

grovkillen yes, I have been reading, it is clear the development is constant..
You are forever posting on the Git Hub side and replying here on this forum..
You are a huge asset to the team, I have been looking over TD-er's recent WiFi changes
Updated the code direct from TD-er, compiled while everyone on your side of the globe was sleeping..
First thing I noticed was I can click through pages on the web-config and they are 'just there'
even from one page I tried to open links in new tabs, when I went to those tabs everything was open,
previously I would be seeing blank pages..
For me is quite noticeable, well done TD-er
Weather was awful but I managed to setup a back-up system to take care of my strawberry plants,
I set up another system so I can use it test modules in a real life task, but as it has no plants or nutrient solution, so no grief.. is only water

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#49 Post by Oxyandy » 24 Mar 2018, 23:25

TD-er wrote: 24 Mar 2018, 01:47 And there is also another PR ready to improve the handling speed of commands (you also execute commands from rules)
I think with my recent experience, I'd be an ideal candidate to test & log anything as a result of any changes..
Point me in the direction, thanks

I did not get much time yesterday as weather was terrible, but managed to get a firmware compiled & flashed
Tried notify 1 OnBoot & it fails..
I will in fairness flash the BIN image you uploaded to drop box, I guess - dev_ESP8266_1024
and begin a routine of tests, beginning with boot tests - then put it into a working situation & log data

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#50 Post by grovkillen » 24 Mar 2018, 23:31

Oxyandy wrote: 24 Mar 2018, 23:25 ...
Tried notify 1 OnBoot & it fails..
...
At system boot you may not have connection to the wifi. Please use WiFi#Connected instead.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
Methuselah
Normal user
Posts: 45
Joined: 04 Feb 2018, 01:39
Location: Boston, MA

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#51 Post by Methuselah » 25 Mar 2018, 12:49

grovkillen wrote: 24 Mar 2018, 11:09 We're trying our best to make sure that the FW is top notch but major rewrite of code is done and with that bugs will be showing up.
I for one appreciate the effort. The ESPEasy firmware has made several of my automation tasks much easier, both in my home and in my ham shack. I wish I could contribute more, but my applications are extremely limited so I do not think I could contribute much.

Oxyandy wrote: 24 Mar 2018, 21:48 Quite the opposite, this is not a dead project.. No other firmware comes close to meeting my needs !
I did not say the project is dead. However, it seems you need commercial, instrumentation-level control for your application. That's not something you're going to get with ESPEasy.... yet.

For a bunch of volunteers, the devs on this project have done an amazing job.
N00b to the world of ESPEasy, but I've been programming since the days of punch cards and paper tape :)

moebius
Normal user
Posts: 35
Joined: 22 May 2017, 19:36

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#52 Post by moebius » 25 Mar 2018, 13:14

@Oxyandy: I also think you put pretty much pressure on the voluntary developers here. From your shouting and posts, one would think your problems are the only ones here.

You should really consider the suggestion of @Methusalem and not use espeasy for your precious plants, until you extensively tested it by yourself and make sure it does what you need.
Also, there are older (proven) versions of espeasy - why you have to use a bleeding edge version in a production environment?

With a commercial and paid product you also can claim its proper function.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#53 Post by Oxyandy » 25 Mar 2018, 23:20

moebius wrote: 25 Mar 2018, 13:14 Also, there are older (proven) versions of espeasy - why you have to use a bleeding edge version in a production environment?
So does this mean you are posting to suggest to me a particular firmware that I should try ?
Something which I could provide Developers feedback on, so changes can be back-tracked ?
Such as 'was working in release XXX', but then stopped in every version there-after ?
Sure, I can try - Happy to hear your suggestion, thanks

moebius
Normal user
Posts: 35
Joined: 22 May 2017, 19:36

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#54 Post by moebius » 26 Mar 2018, 16:34

This version works for me with a reed switch on gpio-13: v2.0.0-dev12

I would suspect a hardware problem - to exclude that, the tests should first happen without switching a heavy inductive load (like a big water pump). Maybe even not with a sonoff, but rather a nodemcu or wemos board with a good power supply. Only after you are able to detect the pulses from the switch reliable, you should add more components (hard and software) step by step (relay, rules, etc) and check for failure - with the pump at last.

You tried also the tasmota firmware, but i didnt understand the result...was it working?

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#55 Post by Oxyandy » 26 Mar 2018, 21:47

Tasmota firmware works fine 99.9%, but the timer cycles are not internal & are dependant on a back-end such as Domoticz to fire the cycles & then Domoticz rules to then stop the pump.. And of course a constant WiFi signal...
The 'Tasmota way' simply has more points of failure than something with a complete 'internal process' which only relies on WiFi for data logging & error reporting.
If a point of failure occurs and I am say 'camping' I can use another reservoir / pump / ESP module to replace the primary via the dashboard,
or even automate it in such a way that it becomes the primary system.

Timer cycles & rules Internal to ESPeasy are therefore just what I need.
When I first found ESPeasy (see my join date here) as an alternative to Tasmota, I read there were 2 branches Release & development,
thinking my task was simple & wanting reliability I downloaded a release V2 firmware..
I never knew 'release was Beta' & 'old was Alpha', that defies logic.
I am now using an ancient release (R_xxx series) & compared to the current releases I have been using -- is like a turbo charged ESP on steroids,
everything 'just works' as it should.. wow what a contrast.
I could list the differences.. a long list after learning the quirks of what I have been using.
I (when I get time or find a fault) will start stepping up release versions by reading change logs & merging in parts of the source & compiling homebrew as I go..
My pumps use 30W @240V, no drama there, even my sump pump @5 amps has no issue..
Because you have been a member here much longer than n00b me, I think you could have been a bit nicer to me, helped me maybe ?
By simply telling me to try an older release such as v2.0.0-dev12 sooner ?
Anyhow help is still help & I think you are a legend for steering me in the right direction, old is good, just like me

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#56 Post by Oxyandy » 27 Mar 2018, 04:46

moebius wrote: 26 Mar 2018, 16:34 GIT version: v2.0.0-dev12
Oh, I like it, it looks & drives just the recent versions I started with..
Time to put it on test, log data & test how it behaves, again thanks.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#57 Post by Oxyandy » 30 Mar 2018, 00:54

I have been building up a 'tool box' of tools,
first - 'working OTA Sonoff firmware updating', tick done.
second - a full set of all firmwares since inspection and each's source-code, tick done.
third - modify all those firmwares so they are also fully compatible with OTA Sonoff firmware updating, tick done.
fourth - Using the oldest firmware I can, OTA install and then test & log data carefully, compare many variables & carefully examine function /performance etc.
Slowly getting done, is a time consuming task, observations need to be done carefully over time, then reset, start over again to confirm those observations..
A few key issues with the most recent releases do NOT appear in some of these older releases..
I then need to look carefully and determine exactly when and what source changes were made which had negative impact, I can say I have done some narrowing down, such as Dev 4 seems (only seems) cause I must verify everything over & over.. but seems like it works, many things I am comparing

Code: Select all

2018-03-30 09:20:03	Timer_OFF_ 9:20
2018-03-30 09:20:03	Timer_OFF_ 9:20
2018-03-30 09:17:55	Float_Switch_0 9:17
2018-03-30 09:17:55	Float_Switch_0 9:17
2018-03-30 09:17:53	Float_Switch_1 9:17
2018-03-30 09:17:53	Float_Switch_1 9:17
2018-03-30 09:15:03	Timer_ON_ 9:15
2018-03-30 09:15:03	Timer_ON_ 9:15
This is very consistent 'expected' behaviour
On Clock#timer, turns on pump, level rises until float goes from closed circuit to open circuit, rules fires before timer ends turning off pump, float returns to stop (NC) & then timer ends.
Uptime is excellent, no data missing in logs & logs not showing 8 of each event, only 2..
About 2, I am not sure if this is intentional or not, there maybe reasons for 2 duplicate log entries for everything ??
IE

Code: Select all

2018-03-30 09:20:03	Timer_OFF_ 9:20
2018-03-30 09:20:03	Timer_OFF_ 9:20
See appears twice, I would rather see only once, but again not sure if 2 is intentional, and if so the reasons for 2 ??
If you have followed my previous posts, on newer firmware many have 8 duplicate log entries
Yet to find the exact point 2 became 8, but I am on a mission and I will.
Then I will attempt to merge newer source changes over the older more predictable 'working as expected version'..

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#58 Post by TD-er » 30 Mar 2018, 18:44

If you find some version after which the switch doesn't work anymore, please include that in the appropriate (new?) issue on Github.
FYI. I started working on ESPeasy around -dev12.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#59 Post by Oxyandy » 30 Mar 2018, 18:53

Yes, no problem TD-er, I have a plan and everything is coming together very nicely..
Which reminds me I have several things to do if I want faster progress.
I had better stop everything I am doing now and focus on those menial tasks..
Thank for the distraction @3.51AM
I want this done...

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#60 Post by Oxyandy » 18 Apr 2018, 17:31

And so I backed tracked the first bug...
The GPIO14 showing wrongly all started in Dev_11, Dev_10 & older firmwares older work just fine..
Next bug to backtrack, is the excessive reporting
Serial output from removing a jumper cable between GPIO14 & GND - wait - Then replacing it

Code: Select all

SW   : Switch state 0 Output value 0
EVENT: FULL_Tray_2#Switch=0.00
EVENT: FULL_Tray_2#Switch=0.00
EVENT: FULL_Tray_2#Switch=0.00
EVENT: FULL_Tray_2#Switch=0.00
EVENT: FULL_Tray_2#Switch=0.00
SW   : Switch state 1 Output value 1
EVENT: FULL_Tray_2#Switch=1.00
EVENT: FULL_Tray_2#Switch=1.00
EVENT: FULL_Tray_2#Switch=1.00
EVENT: FULL_Tray_2#Switch=1.00
EVENT: FULL_Tray_2#Switch=1.00

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#61 Post by Oxyandy » 18 Apr 2018, 17:44

Oh nice, first firmware I try is:
ESP_Easy_mega-20180112_normal_ESP8266_1024.bin
Serial output from removing a jumper cable between GPIO14 & GND - wait - Then replacing it

Code: Select all

SW   : Switch state 0 Output value 0
EVENT: FULL_Tray_2#Switch=0.00
SW   : Switch state 1 Output value 1
EVENT: FULL_Tray_2#Switch=1.00
That's what I am looking for, now when was it introduced ?
Fortunately is a bug that is always there, so takes seconds to check :)

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#62 Post by grovkillen » 18 Apr 2018, 18:15

Much appreciation for your thoroughness!
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#63 Post by Oxyandy » 18 Apr 2018, 18:36

No problems Grovkillen !
These bugs are resource hogs I am sure, their impact can cause roll on effects,
such as Wifi disconnects, reporting over loads & even reboots..
While active in current releases I am sure it makes debugging 'other issues' harder too..

I have several more bugs I have noticed that need the same treatment, one at a time I will get through them.
Last edited by Oxyandy on 19 Apr 2018, 01:20, edited 1 time in total.

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Excessive Reporting Bug

#64 Post by Oxyandy » 19 Apr 2018, 00:50

A fresh firmware flash, NTP, Wifi connection, DHCP, Domoticz MQTT controller
a switch with send boot state, not inverted, internal pull up ticked
Nothing else needed to replicate.

The point this 'excessive reporting bug' was introduced
Jumper cable between GPIO14 & GND, no need to touch the jumper
Simply tick "Send Boot state" and cold boot, the serial output shows the bug in seconds.
ESP_Easy_mega-20180212_normal_ESP8266_1024_DOUT.bin
OK

Code: Select all

Subscribed to: domoticz/out
EVENT: System#Boot
SW   : Switch state 0 Output value 0
EVENT: FULL_Tray_2#Switch=0.00 <- ONLY ONCE
WD   : Uptime 0 ConnectFailures 0 FreeMem 20744
EVENT: Clock#Time=Thu,05:32
ESP_Easy_mega-20180213_normal_ESP8266_1024_DOUT.bin
BAD starts too much reporting -

Code: Select all

Subscribed to: domoticz/out
EVENT: System#Boot
SW   : Switch state 0 Output value 0
EVENT: FULL_Tray_2#Switch=0.00 <- Correct: as above
WD   : Uptime 0 ConnectFailures 0 FreeMem 20448
EVENT: Clock#Time=Thu,05:29
EVENT: FULL_Tray_2#Switch=0.00 <-EXTRA
EVENT: FULL_Tray_2#Switch=0.00 <-EXTRA
EVENT: FULL_Tray_2#Switch=0.00 <-EXTRA
EVENT: FULL_Tray_2#Switch=0.00 <-EXTRA
This 'excessive reporting' is still a bug in:
ESP_Easy_mega-20180403_normal_ESP8266_1024.bin
However, I have not been able to test any firmwares released after this date, because the web server has not been loading.
The CRC : Settings CRC ...FAIL, started in the next firmware after mega-20180403.

Albertus
New user
Posts: 8
Joined: 22 Apr 2018, 09:52

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#65 Post by Albertus » 23 Apr 2018, 18:32

Good Day

Could someone send me a ESPEasy settings file for sonoff basic + mqtt (albertusgeyser@gmail.com).

Thank you

Albertus Geyser

User avatar
Methuselah
Normal user
Posts: 45
Joined: 04 Feb 2018, 01:39
Location: Boston, MA

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#66 Post by Methuselah » 24 Apr 2018, 19:30

Albertus wrote: 23 Apr 2018, 18:32 Could someone send me a ESPEasy settings file for sonoff basic + mqtt (albertusgeyser@gmail.com).
The forum search feature is your friend.
N00b to the world of ESPEasy, but I've been programming since the days of punch cards and paper tape :)

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#67 Post by Oxyandy » 26 Apr 2018, 05:31

Albertus, this will be useful if you still need to get up and working.
There is no 'one config' suits all, we all need different things.
https://www.letscontrolit.com/wiki/index.php/ESPEasy
Any questions, please open a fresh topic
thanks

Albertus
New user
Posts: 8
Joined: 22 Apr 2018, 09:52

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#68 Post by Albertus » 28 Apr 2018, 07:24

Good Day

Thank You Did get my solution:

Openhab to control relay with EasyESP on Sonoff Basic:

Switch Relay1 "Light" <light> {mqtt=">[mosquitto:/UnitName/GPIO/12:command:ON:1],>[mosquitto:/UnitName/GPIO/12:command:OFF:0],<[mosquitto:/UnitName/Device/state:state:default]"}

Thank You

Albertus Geyser

Oxyandy
Normal user
Posts: 95
Joined: 09 Mar 2018, 08:45

Re: ESPeasy Mega running on Sonoff Basic - Bad Behaviour

#69 Post by Oxyandy » 28 Apr 2018, 07:51

Hi Albertus,
As I said "Any questions, please open a fresh topic"
I have no experience with "Openhab"
I use "Domoticz" for simple data logging & some complex rules for alerts for alarm / fault situations
I can help with general questions about Sonoff Basic units, but again "New Topic"
thanks
Had you opened a fresh "New Topic" your question would get greater exposure..

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 98 guests