Slow with MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Slow with MQTT

#1 Post by BertB » 14 Apr 2018, 15:12

Hi,
I have the latest stable on all my Wemos devices.
They now tend to be somewhat slower ?

But it is virtually impossible to get a connection to the web interface, while using MQTT.
It also seems to loose the connection to MQTT
Log
9910210 : IMPT : [MQTT1#Solar_a] subscribed to Solar/Actual
9910213 : IMPT : [MQTT1#Solar_t] subscribed to Solar/Total
9910216 : IMPT : [MQTT1#RFLWsTH_t] subscribed to RFLWsTH/Temp
9915218 : IMPT : Error subscribing to RFLWsTH/Humidity
9931755 : WD : Uptime 160 ConnectFailures 5 FreeMem 11592
10028161 : WD : Uptime 160 ConnectFailures 4 FreeMem 4888
10028365 : EVENT: Clock#Time=Sat,14:08
10034575 : IMPT : MQTT 037 Connection lost
10035606 : IMPT : Connected to MQTT broker with Client ID=E16NEXTION-Import
10035611 : IMPT : [MQTT1#Solar_a] subscribed to Solar/Actual
10035615 : IMPT : [MQTT1#Solar_t] subscribed to Solar/Total
10035619 : IMPT : [MQTT1#RFLWsTH_t] subscribed to RFLWsTH/Temp
10035623 : IMPT : [MQTT1#RFLWsTH_h] subscribed to RFLWsTH/Humidity
10035874 : MQTT : Connection lost
10035905 : MQTT : Connected to broker with client ID: ESPClient_5C:CF:7F:C3:AC:5F
10035909 : Subscribed to: domoticz/out
10035913 : EVENT: MQTT#Connected
10053985 : EVENT: Clock#Time=Sat,14:09
10058160 : WD : Uptime 161 ConnectFailures 5 FreeMem 6512
10089523 : WD : Uptime 161 ConnectFailures 4 FreeMem 6256

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

Re: Slow with MQTT

#2 Post by TD-er » 14 Apr 2018, 20:36

Do you send a lot of publish commands?
There was a change in the last 2 or 3 builds to lower the process interval to "now" when a MQTT message has to be published from ESPeasy.
Maybe that's a bit too much and should be increased to somewhat like 10 msec delay as absolute minimum.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#3 Post by BertB » 15 Apr 2018, 11:47

TD-er wrote: 14 Apr 2018, 20:36 Do you send a lot of publish commands?
There was a change in the last 2 or 3 builds to lower the process interval to "now" when a MQTT message has to be published from ESPeasy.
Maybe that's a bit too much and should be increased to somewhat like 10 msec delay as absolute minimum.
I am not sure what you mean here.
I only use MQTT for the MQTT import in order to receive messages from Domoticz.

Protocol:
❔
Locate Controller:
Controller IP: xxxxxxx
Controller Port: 1883
Controller User: xxxxxxx
Controller Password: xxxxxx
Controller Subscribe:domoticz/out
Controller Publish: domoticz/in
Enabled:

As far as I know, the ESP publishes nothing.

To make it worse, it is virtually impossible to communicatie with the ESP. As if MQTT is blocking the rest.
It would be nice to have some kind of an emergency brake :-)

Now, I managed to disable MQTT on the ESP and it is much more responsive, but still a lot slower in showing the web interface pages than it used to be.
So, I went back with one ESP with MQTT import and it is fast again. Current version now is ESPEasy-2.0-20180116

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

Re: Slow with MQTT

#4 Post by TD-er » 15 Apr 2018, 12:33

This MQTT import module is one of the thing that really need attention.
Yesterday we set the minimal delay for normal MQTT to 10 msec instead of 0 msec and that helped also a bit.
I will look into the MQTT import to see if I see something obvious which would make it less responsive.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#5 Post by BertB » 15 Apr 2018, 12:36

Thanks,
But also devices without MQTT are much slower than before.
There is a big speed difference between the versions ESPEasy_v2.0-20180322 and ESPEasy-2.0-20180116.

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

Re: Slow with MQTT

#6 Post by TD-er » 15 Apr 2018, 12:57

Do you see wifi disconnects in the log?
Build 0322 was still using the core 2.3.0.
There have been a lot of changes between those 2 versions, which makes it hard to tell what could cause the slowdown.

One of the things already present in that newer version was the "chunked transfer" webserver.
With core 2.3.0 and some Windows environments (including my own laptop) the web pages respond quite slow with load times around 2 sec.
On the mobile and my Chromebook the pages load quite fast.
Core 2.3.0 did not support chunked transfers, so that was a bit of a hack to get it working, but it looks like some OS'es or virusscanners may not like it.
In the last few days the normal build uses core 2.4.0, which supports chunked transfers and now on my laptop the load times of a page are around 300 msec.

So it may be related to these changes, which appear more apparent when MQTT traffic is also using the wifi.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#7 Post by BertB » 15 Apr 2018, 14:14

I did not see connection disconnects.

So, I loaded 2.4.0 on the Arduino IDE, downloaded ESPEasy_mega-20180415
Compiled it and it is a lot faster.
But, it does not allow me to choose my own IP. It sticks to ... 114, no matter what I do.

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

Re: Slow with MQTT

#8 Post by TD-er » 15 Apr 2018, 14:32

Hmm, that's something I did not check myself, static IP.
I will test it here.

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

Re: Slow with MQTT

#9 Post by TD-er » 15 Apr 2018, 14:44

I checked it here and static IP is working just fine.
Make sure you set all the values, not only the IP address.
Or else the subnet is undefined and then the IP filtering may prevent you from connecting the web interface.
Also check is that's not keeping you out, if you set the static IP to another subnet.

Code: Select all

29256 : WIFI : Connecting Lurch2 attempt #0
30573 : WD   : Uptime 1 ConnectFailures 0 FreeMem 15632
30697 : WIFI : Connected! AP: Lurch2 (5C:49:79:4D:7B:39) Ch: 1 Duration: 1337 ms
30698 : IP   : Static IP : 192.168.1.182 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
30702 : WIFI : Static IP: 192.168.1.182 (CO2-defect-1) GW: 192.168.1.1 SN: 255.255.255.0   duration: 1 ms
30721 : EVENT: WiFi#Connected

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#10 Post by BertB » 15 Apr 2018, 15:37

I had to remove the complete address first en then re enter it completely, now it is fine, indeed.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#11 Post by BertB » 15 Apr 2018, 16:26

I have to come back on my previous remark.
No matter what I do, ESP refuses to accept the fixed IP

Code: Select all

1216 : WIFI : Connecting Spoon attempt #0
1333 : WIFI : Disconnected! Reason: 'No AP found' Connected for 340 ms
1342 : WD : Uptime 0 ConnectFailures 0 FreeMem 18336
1467 : DS : Temperature: 15.06 (28-ff-4a-af-a1-15-3-83)
1595 : DHT : Temperature: 17.20
1596 : DHT : Humidity: 55.40
4984 : WIFI : Connected! AP: xxxxx Ch: 7 Duration: 3767 ms
4984 : IP : Static IP :1174448320
5006 : WIFI : Static IP: xxxx.119 (10-Garage-10) GW: xxxx.1 SN: 255.255.255.0 duration: 22 ms
31342 : WD : Uptime 1 ConnectFailures 0 FreeMem 16656
61465 : WD : Uptime 1 ConnectFailures 0 FreeMem 12256
61782 : DS : Temperature: 15.13 (28-ff-4a-af-a1-15-3-83)
61811 : Domoticz: Sensortype: 1 idx: 220 values: 15.13
61870 : DHT : Temperature: 17.20
61870 : DHT : Humidity: 55.40
62877 : Domoticz: Sensortype: 2 idx: 219 values: 17.20;55.40;1
65965 : Current Time Zone: DST time start: 2018-03-25 02:00:00 offset: 

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#12 Post by BertB » 15 Apr 2018, 19:05

Somewhere in the process of updating, I lost the ability to change a device ...
As you can see, the pull down option disappeared.
ESPEasy_mega-20180415.PNG
ESPEasy_mega-20180415.PNG (28.82 KiB) Viewed 18611 times

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

Re: Slow with MQTT

#13 Post by grovkillen » 15 Apr 2018, 19:31

Pulldown menus are removed due to memory use. You need to delete the device.
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:

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

Re: Slow with MQTT

#14 Post by TD-er » 15 Apr 2018, 22:26

There is indeed something fishy going on with static IP.
I've set the IP static on one of my nodes when we discussed it earlier today.
The node has a display, so I can see it is still considering itself connected. But access to the node via the webinterface is not possible at the moment, but MQTT is still working. It is sending data to Domoticz.

I'll open an issue for it on Github.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#15 Post by BertB » 17 Apr 2018, 20:26

I tested Release mega-20180417.
It still randomly connects with fixed IP or DHCP. Fixed IP ends with 76.
Also, it seems to fail to pick up NTP.

6003 : MQTT : Failed to connect to broker
9234 : IMPT : MQTT 037 Intentional reconnect
9597 : WIFI : Static IP: xxxxxx.118 (E16NEXTION-16) GW: xxxxxx.1 SN: 255.255.255.0 duration: 2030 ms
9608 : EVENT: WiFi#Connected
10666 : IMPT : MQTT 037 Intentional reconnect
10944 : IMPT : Connected to MQTT broker with Client ID=E16NEXTION-Import
10945 : EVENT: MQTTimport#Connected
10979 : IMPT : [MQTT1#Solar_a] subscribed to Solar/Actual
10980 : IMPT : [MQTT1#Solar_t] subscribed to Solar/Total
10983 : IMPT : [MQTT1#RFLWsTH_t] subscribed to RFLWsTH/Te

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

Re: Slow with MQTT

#16 Post by TD-er » 17 Apr 2018, 20:57

I have seen some strange things with static IP.
Sometimes it seems to be connected, but no traffic possible.
DNS requests fail, no connection to NTP and MQTT broker.
Press reset and problems are gone.

Something similar happens when you start loading the webpage before the wifi has connection.
This happened also with the previous implementation of WiFi, before the major changes I made.
It looks like trying to transfer data before init is complete will break the wifi.
So maybe I should add some delay between connection and trying to transfer data.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#17 Post by BertB » 20 Apr 2018, 17:09

This is with Release mega-20180420

Code: Select all


INIT : Booting version: (custom) (core 2_4_0)
59 : INIT : Warm boot #327
60 : FS   : Mounting...
85 : FS   : Mount successful, used 76053 bytes of 957314
100 : CRC  : No program memory checksum found. Check output of crc2.py
104 : CRC  : Settings CRC           ...FAIL
106 : CRC  : SecuritySettings CRC   ...OK 
211 : INIT : Free RAM:20088
212 : INIT : I2C
212 : INIT : SPI not enabled
221 : MHZ19: Init OK 
230 : INFO : Plugins: 47 [Normal] (core 2_4_0)
231 : EVENT: System#Wake
239 : WIFI : Switch on WiFi
239 : WIFI : Set WiFi to STA
241 : WIFI : Connecting xxxx attempt #0
353 : EVENT: System#Boot
367 : WD   : Uptime 0 ConnectFailures 0 FreeMem 19088

Exception (28):
epc1=0x402083ed epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000004 depc=0x00000000

ctx: cont 
sp: 3fff4e30 end: 3fff50b0 offset: 01a0

>>>stack>>>
3fff4fd0:  00000010 00000001 3ffe9461 4024bc28  
3fff4fe0:  3fff3fa0 00000000 3fff6902 3fff4088  
3fff4ff0:  3fff68d4 0000002f 3fff3fc8 40247e19  
3fff5000:  3ffe9460 3fff3fc8 3fff3fc8 40247e19  
3fff5010:  3fff68d4 00000928 3fff3fc8 40247fcc  
3fff5020:  3fff68d4 3fff3fc8 3fff3fc8 40248040  
3fff5030:  3fff68d4 3fff3fc8 3fff2640 4021363e  
3fff5040:  3fffdad0 00000000 3fff1e20 3fff4088  
3fff5050:  3fffdad0 00000000 3fff1e20 402341e1  
3fff5060:  3fff68d4 0000003f 0000002f 4020bdb0  
3fff5070:  00000000 00000000 3fff1c98 402363ed  
3fff5080:  feefeffe feefeffe feefeffe 3fff4088  
3fff5090:  3fffdad0 00000000 3fff4082 40249984  
3fff50a0:  feefeffe feefeffe 3fff4090 40100710  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
⸮⸮⸮U59 : 

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

Re: Slow with MQTT

#18 Post by TD-er » 20 Apr 2018, 22:08

BertB wrote: 20 Apr 2018, 17:09 This is with Release mega-20180420
[...]
Could you check the latest code on Github?

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#19 Post by BertB » 20 Apr 2018, 23:22

I see no difference

Code: Select all

INIT : Booting version: (custom) (core 2_4_0)
59 : INIT : Warm boot #1164
61 : FS   : Mounting...
85 : FS   : Mount successful, used 76053 bytes of 957314
101 : CRC  : No program memory checksum found. Check output of crc2.py
105 : CRC  : Settings CRC           ...FAIL
133 : CRC  : SecuritySettings CRC   ...OK 
239 : INIT : Free RAM:20088
239 : INIT : I2C
239 : INIT : SPI not enabled
249 : MHZ19: Init OK 
258 : INFO : Plugins: 47 [Normal] (core 2_4_0)
258 : EVENT: System#Wake
266 : WIFI : Switch on WiFi
267 : WIFI : Set WiFi to STA
268 : WIFI : Connecting xxxx attempt #0
381 : EVENT: System#Boot
394 : WD   : Uptime 0 ConnectFailures 0 FreeMem 19088

Exception (28):
epc1=0x402083ed epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000004 depc=0x00000000

ctx: cont 
sp: 3fff4e30 end: 3fff50b0 offset: 01a0

>>>stack>>>
3fff4fd0:  00000010 00000001 3ffe9461 4024bc28  
3fff4fe0:  3fff3fa0 00000000 3fff6902 3fff4088  
3fff4ff0:  3fff68d4 0000002f 3fff3fc8 40247e19  
3fff5000:  3ffe9460 3fff3fc8 3fff3fc8 40247e19  
3fff5010:  3fff68d4 00000928 3fff3fc8 40247fcc  
3fff5020:  3fff68d4 3fff3fc8 3fff3fc8 40248040  
3fff5030:  3fff68d4 3fff3fc8 3fff2640 4021363e  
3fff5040:  3fffdad0 00000000 3fff1e20 3fff4088  
3fff5050:  3fffdad0 00000000 3fff1e20 402341e1  
3fff5060:  3fff68d4 0000003f 0000002f 4020bdb0  
3fff5070:  00000000 00000000 3fff1c98 402363ed  
3fff5080:  feefeffe feefeffe feefeffe 3fff4088  
3fff5090:  3fffdad0 00000000 3fff4082 40249984  
3fff50a0:  feefeffe feefeffe 3fff4090 40100710  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
⸮⸮⸮U59 : 

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

Re: Slow with MQTT

#20 Post by TD-er » 21 Apr 2018, 01:50

Did you also check with clean settings? (and check a full reboot first)
I've been running here with a number of nodes on static IP for the entire evening.
Both ESP32 and ESP8266.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#21 Post by BertB » 21 Apr 2018, 07:19

Would like to try that. Hoe do I get clean settings? And how do I put it on ESP32?

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#22 Post by BertB » 21 Apr 2018, 08:19

I succeeded with the latest build, after a full reset of the ESP.
I must say, it looks great and it is very fast.

Now .. since I use the Arduino IDE, how do I get this on a ESP32?

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#23 Post by BertB » 21 Apr 2018, 09:43

Seems to work on a 32 too, but not with using the WROOM variant in Atom.

I get this ...

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:11584
entry 0x40078a60
⸮U32 : 


INIT : Booting version:  (ESP32 SDK v3.1-dev-661-gf586f5e6)
32 : INIT : Cold Boot
33 : FS   : Mounting...
87 : CRC  : No program memory checksum found. Check output of crc2.py
90 : CRC  : Settings CRC           ...FAIL
116 : CRC  : SecuritySettings CRC   ...OK 
284 : INIT : Free RAM:130336
284 : INIT : I2C
284 : INIT : SPI not enabled
291 : INFO : Plugins: 5 [Normal] (ESP32 SDK v3.1-dev-661-gf586f5e6)
292 : WIFI : Connecting Spoon attempt #0
292 : IP   : Static IP : xxxxx.64 GW: xxxxxxx.1 SN: 255.255.255.0 DNS: 0.0.0.0
363 : OTA  : Arduino OTA enabled on port 8266
374 : WIFI : Static IP: xxxxxx.64 (ESP32-2OLED-3) GW: xxxxx.1 SN: 255.255.255.0   duration: 357 ms
387 : Webserver: start
391 : WD   : Uptime 0 ConnectFailures 0 FreeMem 116884
Then it waits for some time runs a bit and stops again.Seems the NTP is the prblem.

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

Re: Slow with MQTT

#24 Post by TD-er » 21 Apr 2018, 14:46

Yes it is lightning fast at the moment, but I am really worried about the instability lately.
And my ESP32 is also with "WROOM" written on the RF shield and I am working only with Atom + PlatformIO.
So either there is some issue with difference in drivers, compiler, or whatever reason.
Or some settings, changes in regional settings (Wifi channels), or whatever reason why I cannot reproduce a lot of the reported issues.

So I am thinking very hard on how to make things more stable, even when that means abandoning event based wifi and switching back to older version of the Arduino core libraries.
This will make things quite a lot slower, but I guess stability is more important than speed.
And there is still a lot to gain, because wifi connection speeds of about 100 msec are even possible and we're not even started with event based webserver.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#25 Post by BertB » 21 Apr 2018, 15:24

The future is looking bright.
ESP32 is faster than ESP8266, but you need a timer to say how much :-).

Somehow the WROOM does not work here ... I managed to get Atom and PlatformIO working too.

Code: Select all

Looking for upload port...
Auto-detected: COM5
Uploading .pioenvs\dev_WROOM02_2048\firmware.bin
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
*** [upload] Error -1
 [ERROR] Took 21.63 seconds
Environment dev_WROOM02_2048            [ERROR]
 [ERROR] Took 21.63 seconds
 
 [SUMMARY]
Environment esp32dev                    [SKIP]
Environment dev_ESP8266_1024            [SKIP]
Environment dev_ESP8285_1024            [SKIP]
Environment dev_ESP8266_4096            [SKIP]
Environment dev_ESP8266PUYA_1024        [SKIP]
Environment dev_ESP8266PUYA_1024_VCC    [SKIP]
Environment hard_SONOFF_POW             [SKIP]
 

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

Re: Slow with MQTT

#26 Post by TD-er » 21 Apr 2018, 20:25

I've not had that often on the ESP32, but quite often on the ESP8266 board.
It helps to restart the ESP board, hold the flash button and press reset once while holding the flash button.
Keep the flash button pressed until flashing of the firmware starts.

I am not sure why, but it seems not all boards are equal. Some you never have to do this and some almost always.
It may be related to the used USB chip, but not sure.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#27 Post by BertB » 22 Apr 2018, 11:08

I only have a boot and an En button.
Whatever they are, it doesn't help programming WROOM.

The latest ESP32 version is loaded without a problem.

What strikes me is that ESP tells me it has a system load of 38 % whereas the ESP8266 with roughly the same devices activated (MQTT and System info) claims 14%.

I expected it to be the other way around.

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

Re: Slow with MQTT

#28 Post by TD-er » 22 Apr 2018, 15:29

BertB wrote: 22 Apr 2018, 11:08 [...]
What strikes me is that ESP tells me it has a system load of 38 % whereas the ESP8266 with roughly the same devices activated (MQTT and System info) claims 14%.

I expected it to be the other way around.
CPU load is determined at a rather strange way.
The maximum observed loop counter is being used and compared with the current loopcount in the last N seconds (30 I guess)
The maximum observed may increase over time and result in strange observations like negative values.
The loop-count (LC) is the number of times the loop() function is called in N seconds.

I think that one should be computed otherwise, but not sure how. Either way, this is confusing.

When you disable wifi (disconnect is also disable), the observed loopcount (LC) will be much higher, since a lot of tasks will do nothing, since they require wifi connection and when there is none you should not do work you will not use.

The reported load may be higher than before (about 1 or 2 months ago), because a lot of tasks are now done asynchronously and just do a lot of work in small steps. This makes responsiveness a lot better, but the average load will be more constant. So there will be a lot less fluctuation in max LC and current LC, which in turn will approach 100% when the load is constant.

Like I said the way the CPU load is computed now, really doesn't make sense.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#29 Post by BertB » 28 Apr 2018, 16:29

With what ESP version should the ESPEasy_mega-20180428 be compiled?

With 2.4.1 the ESP is only rebooting.

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

Re: Slow with MQTT

#30 Post by TD-er » 30 Apr 2018, 00:31

BertB wrote: 28 Apr 2018, 16:29 With what ESP version should the ESPEasy_mega-20180428 be compiled?

With 2.4.1 the ESP is only rebooting.
Please wait for the next build.
I've been really busy, but the first reports of users tested the commits was very positive.
The build should be ready around 4:30 am.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#31 Post by BertB » 30 Apr 2018, 20:24

I used Arduino to compile Release mega-20180430 with version 2.4.1
All settings were gone and this is what shows up:

Code: Select all


INIT : Booting version: (custom) (ESP82xx Core 2_4_1)
88 : INIT : Warm boot #5
89 : FS   : Mounting...
163 : FS   : Mount successful, used 75802 bytes of 2949250
170 : CRC  : No program memory checksum found. Check output of crc2.py
255 : CRC  : SecuritySettings CRC   ...OK 
576 : INIT : Free RAM:22888
576 : INIT : I2C
576 : INIT : SPI not enabled
590 : INFO : Plugins: 47 [Normal] (ESP82xx Core 2_4_1)
590 : WIFI : Set WiFi to STA
622 : WIFI : Connecting xxxxx attempt #0
623 : IP   : Static IP : xxxxx.0.62 GW: 0.0.0.0 SN: 0.0.0.0 DNS: 0.0.0.0
629 : WD   : Uptime 0 ConnectFailures 0 FreeMem 22048
4396 : WIFI : Connected! AP: xxxxx (64:D1:A3:26:73:B1) Ch: 7 Duration: 3772 ms
4397 : IP   : Static IP : xxxxx.0.62 GW: 0.0.0.0 SN: 0.0.0.0 DNS: 0.0.0.0
4400 : WIFI : Static IP: 0.0.0.0 (ESP-Easy-0) GW: 0.0.0.0 SN: 0.0.0.0   duration: 4 ms
4409 : Webserver: start
6118 : WIFI : Static IP: xxxxx.0.121 (ESP-Easy-0) GW: xxxx.0.1 SN: 255.255.255.0   duration: 1721 ms
After loading the settings, the Wemos started doing this:

Code: Select all


INIT : Booting version: (custom) (ESP82xx Core 2_4_1)
88 : INIT : Warm boot #114
90 : FS   : Mounting...
114 : FS   : Mount successful, used 0 bytes of 957314
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)
1143 : CRC  : No program memory checksum found. Check output of crc2.py
1175 : FS   : Error while reading/writing config.dat in 1025

PID:0
Version:0
INIT : Incorrect PID or version!
RESET: Resetting factory defaults...
RESET: Warm boot, reset count: 3
RESET: Too many resets, protecting your flash memory (powercycle to solve this)

Exception (0):
epc1=0x4000e25d epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff4570 end: 3fff47e0 offset: 01a0

>>>stack>>>
3fff4710:  3fff599c 00000100 00000001 402019c4  
3fff4720:  40202aea 3fff51ac 00000001 40202bf0  
3fff4730:  00000000 0000001c 00000003 3fff5614  
3fff4740:  3fff36d4 3fff37b4 3fff36f4 3fff37b4  
3fff4750:  3fff36d4 00000001 3fff36f4 40248a70  
3fff4760:  00000000 0000001c 00000000 40202992  
3fff4770:  402018f6 3fff36f4 3fff271c 402083a5  
3fff4780:  3fff36d4 3fff36f4 3fff271c 4023532c  
3fff4790:  00000000 00000000 00000000 4024bae0  
3fff47a0:  3fff5da4 0000003f 00000015 feefeffe  
3fff47b0:  feefeffe feefeffe feefeffe 3fff37b4  
3fff47c0:  3fffdad0 00000000 3fff37ae 4024a8bc  
3fff47d0:  feefeffe feefeffe 3fff37c0 40100710  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
⸮U88 :

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

Re: Slow with MQTT

#32 Post by TD-er » 30 Apr 2018, 22:51

That's strange to say the least.
What device do you have and from what version did you upgrade?

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#33 Post by BertB » 30 Apr 2018, 23:46

TD-er wrote: 30 Apr 2018, 22:51 That's strange to say the least.
What device do you have and from what version did you upgrade?

It is a WEMOS mini and it had version ESPEasy_v2.0-20180322

Strange also is, that the update works perfectly with a NodeMCU.
Went back to the ESPEasy_v2.0-20180322 version and all is okay again.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#34 Post by BertB » 02 May 2018, 13:48

with Release mega-20180502 both compiled with Platformio and Arduino IDE, serial interface no longer responds to commands like 'settings'
With Platformio, 2.4.1 was used to compile. Network connection did not function.
With Arduino IDE, 2.3.0. was used to compile. Network did not function.

Now back to ESPEasy_v2.0-20180322, but all wifi settings are gone.

After writing wifissid and saving it via the serial interface, I get

>wifissid xxxx

Ok
WIFI : No valid WiFi settings!
WIFI : No valid WiFi settings!
>save
FS : Error while reading/writing config.dat in 801

After reset, I could enter wifissid etc again

But it no longer wishes to connect to WIFI

So, I had to go back to ESPEasy-2.0-20180116 again.
That one works for me.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: Slow with MQTT

#35 Post by BertB » 07 May 2018, 17:25

Hi,
This comes with the latest relase

ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
{$r⸮⸮'ogblcrl{l⸮⸮ć⸮d⸮;cdl⸮s{ll⸮;⸮⸮⸮c⸮⸮⸮{⸮l l⸮c⸮;⸮`|⸮c쌜⸮⸮⸮|⸮l⸮o⸮

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests