Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4-Wire 54138 Watchdog timer reboot causing E13 #742

Open
DeanozUK opened this issue Jun 30, 2024 · 98 comments
Open

4-Wire 54138 Watchdog timer reboot causing E13 #742

DeanozUK opened this issue Jun 30, 2024 · 98 comments

Comments

@DeanozUK
Copy link

Describe the bug
After install board seems to be stable with no issues until I select 4wire 54138 on CIO and DSP and reboot. While the board is idle (not even connected to pump) it will periodically reboot and when checking reason it says watchdog

To Reproduce
Steps to reproduce the behavior:

  1. After install goto hardware config and select 54138 for CIO and DSP and also select v2b
  2. Reboot ESP and setup constant ping to device
  3. Goto web page home page (maybe change temp)
  4. page might drop out. I left it idle for sometime while on monitor via usb and I will post the log

Expected behavior
Expect the unit to be stable when idle and when connected to unit

Screenshots
ESP WDT Error.txt

Hardware (please complete the following information):

  • Pump model, 54138
  • 4 wire
  • PCB type v2b
  • Level shifter type, Red one

Software (please complete the following information):

  • Firmware: 2024-06-17-1334

Additional context
When its connected to the pump after startup I will just leave it without touching any buttons. only load the web page and after short amount of time it will E13.
Also tried 2 other ESPs and the beta version to no effect.

Below is the result from USB Monitor.

Writing cmdq.json (I was changing temp on web page)
Done!
Writing cmdq.json
Done!
Writing cmdq.json
Done!
Writing cmdq.json
Done!
Writing cmdq.json
Done!
Writing cmdq.json
Done!

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

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

Level1Interrupt: Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT register
epc1=0x40234f9c in AsyncTCPbuffer::write(unsigned char const*, unsigned int) at ??:?

stack>>>

ctx: cont
sp: 3fff1d40 end: 3fff2040 offset: 0160
3fff1ea0: 00000000 00000066 89374bc6 07f64dd6
3fff1eb0: 4010a85b 0006e2db 00000000 40109bdc
3fff1ec0: 4010a85b 00000066 0000012f 4021f402
3fff1ed0: 0006da50 0000012f 40284928 00000004
3fff1ee0: 40284930 00000004 40284938 40109bac
3fff1ef0: 4010a72c 40109bdc 00000195 4021f6d1
3fff1f00: 00000001 4028467c 00000005 40284684
3fff1f10: 95017e81 00000000 00000000 00000000
3fff1f20: 00000000 40284660 00000004 402846a4
3fff1f30: 00000000 00000004 00000001 00000001
3fff1f40: 00000001 00000001 00000000 402846cc
3fff1f50: 00000006 402846d4 00000004 4010a72c
3fff1f60: 40109bdc 00000195 40109bac 4021e761
3fff1f70: 00000000 402846c4 00000004 40283a0c
3fff1f80: 00000001 4010a000 00000000 3ffefca4
3fff1f90: e1f3b4e6 41a998c4 3fff1fb0 3ffefca4
3fff1fa0: 00000001 3ffef85c 3ffef6bc 4020d163
3fff1fb0: 4010a72c 0195019f 80000000 00000000
3fff1fc0: 00000001 3ffef938 3ffef85c 4021c72d
3fff1fd0: 401081d4 3ffefb14 401081d4 4021b181
3fff1fe0: 00000000 000f000f 00000000 00000000
3fff1ff0: 00000000 611e0a0a feefeffe feefeffe
3fff2000: 401081d4 feefeffe feefeffe 3ffefca4
3fff2010: 3fffdad0 00000000 3ffefc78 3ffefca4
3fff2020: 3fffdad0 00000000 3ffefc78 402310d0
3fff2030: feefeffe feefeffe 3fffdab0 401014a1
<<<stack<<<

0x4021f402 in WebSockets::write(WSclient_t*, unsigned char*, unsigned int) at ??:?
0x40284928 in etharp_output at ??:?
0x40284930 in etharp_output at ??:?
0x40284938 in etharp_output at ??:?
0x4021f6d1 in WebSockets::sendFrame(WSclient_t*, WSopcode_t, unsigned char*, unsigned int, bool, bool) at ??:?
0x4028467c in etharp_output at ??:?
0x40284684 in etharp_output at ??:?
0x40284660 in etharp_output at ??:?
0x402846a4 in etharp_output at ??:?
0x402846cc in etharp_output at ??:?
0x402846d4 in etharp_output at ??:?
0x4021e761 in WebSocketsServerCore::broadcastTXT(unsigned char*, unsigned int, bool) at ??:?
0x402846c4 in etharp_output at ??:?
0x40283a0c in etharp_output at ??:?
0x4020d163 in sendWS() at ??:?
0x4021c72d in loop at ??:?
0x4021b181 in setup at ??:?
0x402310d0 in loop_wrapper() at core_esp8266_main.cpp:?
0x401014a1 in cont_wrapper at ??:?

--------------- CUT HERE FOR EXCEPTION DECODER ---------------
4#-a|(␕␗�P␚v␛X �hu␗Xh 4�r(␑,+,#A␑␑@�␕4nzAl )z�~,j �r(␗%␑␙@#A.,��␎|l )z�~,PZ8�~,PZ�P,U.4/'�rf cal sector: 1020
freq trace enable 0
rf[112] : 0�
Start
Millis: 91 @ line: 41
startWiFi() @ millis: 328
Setting static IP
WiFi > using static IP t(�?␏ on gateway 10.10.30.1
WiFi > Using WiFiManager Config Portal
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: Using last saved values, should be faster
got IP: 10.10.30.97
start NTP
WS IRamheap 9296
IRamheap 8048
startmqtt
Failed to read mqtt.json. Using defaults.
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 10.10.30.97
*WM: freeing allocated params!
End of setup()
Millis: 3460 @ line: 73
33072

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

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

Level1Interrupt: Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT register
epc1=0x402316c9 in __delay at ??:?

stack>>>

ctx: cont
sp: 3fff1d60 end: 3fff2040 offset: 0160
3fff1ec0: 4010a846 0000004a 0000013a 4021f41e
3fff1ed0: 00066203 0000013a 40284928 00000004
3fff1ee0: 40284930 00000004 40284938 40109bac
3fff1ef0: 4010a70c 40109bdc 00000184 4021f6d1
3fff1f00: 00000001 4028467c 00000005 40284684
3fff1f10: 84017e81 00000000 00000000 00000000
3fff1f20: 00000000 40284660 00000004 402846a4
3fff1f30: 00000000 00000004 00000001 00000001
3fff1f40: 00000001 00000001 00000000 402846cc
3fff1f50: 00000006 402846d4 00000004 4010a70c
3fff1f60: 40109bdc 00000184 40109bac 4021e761
3fff1f70: 00000000 402846c4 00000004 40283a0c
3fff1f80: 00000001 4010a000 00000000 3ffefca4
3fff1f90: 7b6eb30a 41a998c2 3fff1fb0 3ffefca4
3fff1fa0: 00000000 3ffef85c 3ffef6bc 4020d163
3fff1fb0: 4010a70c 0184018f 80000000 00000000
3fff1fc0: 00000000 3ffef938 3ffef85c 4021c72d
3fff1fd0: 401081d4 3ffefb14 401081d4 4021b181
3fff1fe0: 00000000 000f000f 00000000 00000000
3fff1ff0: 00000000 611e0a0a feefeffe feefeffe
3fff2000: 401081d4 feefeffe feefeffe 3ffefca4
3fff2010: 3fffdad0 00000000 3ffefc78 3ffefca4
3fff2020: 3fffdad0 00000000 3ffefc78 402310d0
3fff2030: feefeffe feefeffe 3fffdab0 401014a1
<<<stack<<<

0x4021f41e in WebSockets::write(WSclient_t*, unsigned char*, unsigned int) at ??:?
0x40284928 in etharp_output at ??:?
0x40284930 in etharp_output at ??:?
0x40284938 in etharp_output at ??:?
0x4021f6d1 in WebSockets::sendFrame(WSclient_t*, WSopcode_t, unsigned char*, unsigned int, bool, bool) at ??:?
0x4028467c in etharp_output at ??:?
0x40284684 in etharp_output at ??:?
0x40284660 in etharp_output at ??:?
0x402846a4 in etharp_output at ??:?
0x402846cc in etharp_output at ??:?
0x402846d4 in etharp_output at ??:?
0x4021e761 in WebSocketsServerCore::broadcastTXT(unsigned char*, unsigned int, bool) at ??:?
0x402846c4 in etharp_output at ??:?
0x40283a0c in etharp_output at ??:?
0x4020d163 in sendWS() at ??:?
0x4021c72d in loop at ??:?
0x4021b181 in setup at ??:?
0x402310d0 in loop_wrapper() at core_esp8266_main.cpp:?
0x401014a1 in cont_wrapper at ??:?

--------------- CUT HERE FOR EXCEPTION DECODER ---------------
4#-a|(␕�r�dNX �hu␗Xh 4�"(␑,+,#A�␑@�␕4nzAl )z�~,j �r(␗%␑␙@#A.,�␎|l )z�~,PZ8�~,PZ�P,U.4/N�rf
cal sector: 1020
freq trace enable 0
rf[112] : 0�
Start
Millis: 91 @ line: 41
startWiFi() @ millis: 334
Setting static IP
WiFi > using static IP t(�?␏ on gateway 10.10.30.1
WiFi > Using WiFiManager Config Portal
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: Using last saved values, should be faster
got IP: 10.10.30.97
start NTP
WS IRamheap 9296
IRamheap 8048
startmqtt
Failed to read mqtt.json. Using defaults.
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 10.10.30.97
*WM: freeing allocated params!
End of setup()
Millis: 3469 @ line: 73
33296

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Soft WDT reset

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

Level1Interrupt: Level-1 interrupt as indicated by set level-1 bits in the INTERRUPT register
epc1=0x4023100c in esp_try_delay(unsigned int, unsigned int, unsigned int) at ??:?

stack>>>

ctx: cont
sp: 3fff1d60 end: 3fff2040 offset: 0160
3fff1ec0: 4010a77f 00000115 00000073 4021f41e
3fff1ed0: 00031647 00000073 40284928 00000004
3fff1ee0: 40284930 00000004 40284938 40109bac
3fff1ef0: 4010a70c 40109bdc 00000188 4021f6d1
3fff1f00: 00000001 4028467c 00000005 40284684
3fff1f10: 88017e81 00000000 00000000 00000000
3fff1f20: 00000000 40284660 00000004 402846a4
3fff1f30: 00000000 00000004 00000001 00000001
3fff1f40: 00000001 00000001 00000000 402846cc
3fff1f50: 00000006 402846d4 00000004 4010a70c
3fff1f60: 40109bdc 00000188 40109bac 4021e761
3fff1f70: 00000000 402846c4 00000004 40283a0c
3fff1f80: 00000001 4010a000 00000000 3ffefca4
3fff1f90: 9b6a9771 41a998b1 3fff1fb0 3ffefca4
3fff1fa0: 00000000 3ffef85c 3ffef6bc 4020d163
3fff1fb0: 4010a70c 0188018f 80000000 00000000
3fff1fc0: 00000000 3ffef938 3ffef85c 4021c72d
3fff1fd0: 401081d4 3ffefb14 401081d4 4021b181
3fff1fe0: 00000000 000f000f 00000000 00000000
3fff1ff0: 00000000 611e0a0a feefeffe feefeffe
3fff2000: 401081d4 feefeffe feefeffe 3ffefca4
3fff2010: 3fffdad0 00000000 3ffefc78 3ffefca4
3fff2020: 3fffdad0 00000000 3ffefc78 402310d0
3fff2030: feefeffe feefeffe 3fffdab0 401014a1
<<<stack<<<

0x4021f41e in WebSockets::write(WSclient_t*, unsigned char*, unsigned int) at ??:?
0x40284928 in etharp_output at ??:?
0x40284930 in etharp_output at ??:?
0x40284938 in etharp_output at ??:?
0x4021f6d1 in WebSockets::sendFrame(WSclient_t*, WSopcode_t, unsigned char*, unsigned int, bool, bool) at ??:?
0x4028467c in etharp_output at ??:?
0x40284684 in etharp_output at ??:?
0x40284660 in etharp_output at ??:?
0x402846a4 in etharp_output at ??:?
0x402846cc in etharp_output at ??:?
0x402846d4 in etharp_output at ??:?
0x4021e761 in WebSocketsServerCore::broadcastTXT(unsigned char*, unsigned int, bool) at ??:?
0x402846c4 in etharp_output at ??:?
0x40283a0c in etharp_output at ??:?
0x4020d163 in sendWS() at ??:?
0x4021c72d in loop at ??:?
0x4021b181 in setup at ??:?
0x402310d0 in loop_wrapper() at core_esp8266_main.cpp:?
0x401014a1 in cont_wrapper at ??:?

--------------- CUT HERE FOR EXCEPTION DECODER ---------------
4#-a|(␕␗�P␚v␛X �hu␗Xh 4�r(␑,+,#A␑␑@�␕␔nzAl )z�~,j �r(␗%␑␙@#A.,4nzAl )z�~,PZ8�~,PZ�P,U.4/'�rf cal sector: 1020
freq trace enable 0
rf[112] : 0�
Start
Millis: 91 @ line: 41
startWiFi() @ millis: 340
Setting static IP
WiFi > using static IP t(�?␏ on gateway 10.10.30.1
WiFi > Using WiFiManager Config Portal
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: Using last saved values, should be faster
got IP: 10.10.30.97
start NTP
WS IRamheap 9296
IRamheap 8048
startmqtt
Failed to read mqtt.json. Using defaults.
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 10.10.30.97
*WM: freeing allocated params!
End of setup()
Millis: 3494 @ line: 73
33176

@visualapproach
Copy link
Owner

Ok, haven't had time to look at this yet. Call you back

@visualapproach
Copy link
Owner

I can't reprocude, but see if the new beta version helps.

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024

Ok, Ill give it ago now. Do the errors mean anything to you?

@visualapproach
Copy link
Owner

Oh, now I get web socket disconnections. With newest code too, so I will have too investigate more

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024

happens quicker if you are on the home page and turn the temp up from default 20, then refresh and its rebooted and the temps back at default 20 again. (ESP is on bench and not connected to pump atm).

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024

I sent you a coffee to help while to look into it ;)

@visualapproach
Copy link
Owner

That very nice of you! Thanks!!
I uploaded a new version to development branch. It's kind of a band aid but it seems to work here. Plz report how it goes

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024

Well, I've tried on 2x ESPs (I also completely erased them and started from scratch to rule out any oddities) and all seems fine when setting up via AP etc. get web page nice.

Once on my Wifi I then configure in hardware to 54138 on DSP and CIO and then select v2b and reboot. It then it don't come back online. I'm constantly pinging the unit and all I see after the reboot is 1 high ping of say 380ms then times out forever.

Below is a serial monitor from when the web page loads as (default) 6wire and I got into menu and setup 4 wire 54138 etc then reboot, seems to look ok on monitor but nothing comes in after the line 'pm open,type:2 0'

Need anymore info?

[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 1 mask: 0 length: 296 headerToPayload: 0
[WS][0][sendFrame] text: {"CONTENT":"STATES","TIME":1720111476,"LCK":0,"PWR":0,"UNT":0,"AIR":0,"GRN":0,"RED":0,"FLT":0,"CH1":97,"CH2":98,"CH3":99,"HJT":0,"BRT":7,"ERR":0,"GOD":0,"TGT":0,"TMP":25,"VTMC":-2.997020721,"VTMF":26.60536194,"AMBC":20,"AMBF":68,"AMB":68,"VTM":26.60536194,"TGTF":0,"TMPF":25,"TGTC":-18,"TMPC":-4}
[WS][0][sendFrame] pack to one TCP package...
[write] n: 300 t: 48724
[WS][0][sendFrame] sending Frame Done (4732us).
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 1 mask: 0 length: 343 headerToPayload: 0
[WS][0][sendFrame] text: {"CONTENT":"TIMES","TIME":1720111476,"CLTIME":0,"FREP":0,"FRIN":0,"FCLE":0,"UPTIME":48,"PUMPTIME":0,"HEATINGTIME":0,"AIRTIME":0,"JETTIME":0,"COST":0.00002573,"FREPI":60,"FRINI":7,"FCLEI":20,"CLINT":14,"KWH":0.000026667,"KWHD":0.000026951,"WATT":2,"T2R":-2,"RS":"Ready","DBG":" 0 0 0 0 0 0 0 0 0 0 0 cio msgs:0 || 255 255 0 0 0 0 0dsp msgs:0"}
[WS][0][sendFrame] pack to one TCP package...
[write] n: 347 t: 48811
[WS][0][sendFrame] sending Frame Done (3408us).
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 1 mask: 0 length: 165 headerToPayload: 0
[WS][0][sendFrame] text: {"CONTENT":"OTHER","MQTT":-1,"HASJETS":false,"HASGOD":false,"MODEL":"PRE2021","RSSI":-39,"IP":"10.10.30.18","SSID":"Matrix_IoT","FW":"2024-07-04-1647","loopfq":2073}
[WS][0][sendFrame] pack to one TCP package...
[write] n: 169 t: 48871
[WS][0][sendFrame] sending Frame Done (3654us).
[WS][0][handleWebsocketWaitFor][readCb] size: 2 ok: 1
[WS][0][handleWebsocket] ------- read massage frame -------
[WS][0][handleWebsocket] fin: 1 rsv1: 0 rsv2: 0 rsv3 0 opCode: 8
[WS][0][handleWebsocket] mask: 1 payloadLen: 2
[WS][0][handleWebsocketWaitFor] size: 6 cWsRXsize: 2
[WS][0][handleWebsocketWaitFor][readCb] size: 6 ok: 1
[WS][0][handleWebsocket] ------- read massage frame -------
[WS][0][handleWebsocket] fin: 1 rsv1: 0 rsv2: 0 rsv3 0 opCode: 8
[WS][0][handleWebsocket] mask: 1 payloadLen: 2
[WS][0][handleWebsocket] get ask for close. Code: 1001

[WS][0][handleWebsocket] clientDisconnect code: 1000
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 8 mask: 0 length: 2 headerToPayload: 0
[WS][0][sendFrame] pack to one TCP package...
[write] n: 4 t: 50697
[WS][0][sendFrame] sending Frame Done (3464us).
[WS-Server][0] client disconnected.
[WS-Server][0] Disconnect client
File size: 3796
HTTP > file sent: /hwconfig.html.gz (3796 bytes)
File size: 3088
HTTP > file sent: /main.css.gz (3088 bytes)
File size: 562
HTTP > file sent: /darkmode.js.gz (562 bytes)
File size: 2953
HTTP > file sent: /visualapproach.png (2953 bytes)
Free mem before stop: 20296
stopping cio
del cio
stopping dsp
del dsp
detaching
stopping mqtt
stopping server
stopping ws
stopping FS
end stopall
Free mem after stop: 28288
ESP restart ...
state: 5 -> 0 (0)
rm 0
pm close 7
del if0
usl
disconnected
4#-a|(␕␗�P␚v␛X �hu�Ph 4�r(␑,+,#A␑␑@�␕4nzAl )z�~,j �r(␗%␑␙@#A.,4nzAl )z�~,PZ8�~,PZ�Pl␄4/'�rf cal sector: 1020
freq trace enable 0
rf[112] : 0�
SDK:2.2.2-dev(38a443e)/Core:3.1.2=30102000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386

Start
Millis: 76 @ line: 42
startWiFi() @ millis: 183
WiFi > Using WiFiManager Config Portal
*WM:
*WM: AutoConnect
fpm close 1
mode : sta(a8:48:fa:c1:74:62)
add if0
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: Using last saved values, should be faster
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt

connected with Matrix_IoT, channel 6
dhcp client start...
ip:10.10.30.18,mask:255.255.255.0,gw:10.10.30.1
got IP: 10.10.30.18
start NTP
WS IRamheap 24960
[WS-Server] Websocket Version: 2.4.2
[WS-Server] Server Started.
IRamheap 23632
startmqtt
Failed to read mqtt.json. Using defaults.
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 10.10.30.18
*WM: freeing allocated params!
End of setup()
Millis: 3291 @ line: 74
22104
pm open,type:2 0

@visualapproach
Copy link
Owner

It looks normal. I don't know how well it reacts to pinging but you will (should) get more serial output when reloading a page. It may also be a problem if using several devices with the same hostname. If so edit config.h

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024 via email

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024

image

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024

Just got this when i managed to get a web page briefly

Reconnecting to COM3
Please build project in debug configuration to get more details about an exception.
See https://docs.platformio.org/page/projectconf/build_configurations.html

     Connected!

rf cal sector: 1020
freq trace enable 0
rf[112] : 00
SDK:2.2.2-dev(38a443e)/Core:3.1.2=30102000/lwIP:STABLE-2_1_3_RELEASE/glue:1.2-65-g06164fb/BearSSL:b024386

Start
Millis: 92 @ line: 42
startWiFi() @ millis: 279
WiFi > Using WiFiManager Config Portal
*WM:
*WM: AutoConnect
fpm close 1
mode : sta(ec:fa:bc:b9:b2:ba)
add if0
*WM: Connecting as wifi client...
*WM: Status:
*WM: 0
*WM: Using last saved values, should be faster
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt

connected with Matrix_IoT, channel 6
dhcp client start...
ip:10.10.30.97,mask:255.255.255.0,gw:10.10.30.1
got IP: 10.10.30.97
start NTP
WS IRamheap 24944
[WS-Server] Websocket Version: 2.4.2
[WS-Server] Server Started.
IRamheap 23616
startmqtt
Failed to read mqtt.json. Using defaults.
*WM: Connection result:
*WM: 3
*WM: IP Address:
*WM: 10.10.30.97
*WM: freeing allocated params!
End of setup()
Millis: 3425 @ line: 74
22088
pm open,type:2 0
File size: 6736
HTTP > file sent: /index.html.gz (6736 bytes)
File size: 3088
HTTP > file sent: /main.css.gz (3088 bytes)
File size: 562
HTTP > file sent: /darkmode.js.gz (562 bytes)
File size: 6736
HTTP > file sent: /index.html.gz (6736 bytes)
File size: 3088
HTTP > file sent: /main.css.gz (3088 bytes)
File size: 562
HTTP > file sent: /darkmode.js.gz (562 bytes)
File size: 2953
HTTP > file sent: /visualapproach.png (2953 bytes)
[WS-Server][0] new client from 10.10.30.134
[WS-Server][0][handleHeader] RX: GET / HTTP/1.1
[WS-Server][0][handleHeader] RX: Host: 10.10.30.97:81
[WS-Server][0][handleHeader] RX: Connection: Upgrade
[WS-Server][0][handleHeader] RX: Pragma: no-cache
[WS-Server][0][handleHeader] RX: Cache-Control: no-cache
[WS-Server][0][handleHeader] RX: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
[WS-Server][0][handleHeader] RX: Upgrade: websocket
[WS-Server][0][handleHeader] RX: Origin: http://10.10.30.97
[WS-Server][0][handleHeader] RX: Sec-WebSocket-Version: 13
[WS-Server][0][handleHeader] RX: Accept-Encoding: gzip, deflate
[WS-Server][0][handleHeader] RX: Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
[WS-Server][0][handleHeader] RX: Sec-WebSocket-Key: yVB/NVaLxAP5s00Eyl1aaA==
[WS-Server][0][handleHeader] RX: Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
[WS-Server][0][handleHeader] RX: Sec-WebSocket-Protocol: arduino
[WS-Server][0][handleHeader] Header read fin.
[WS-Server][0][handleHeader] - cURL: /
[WS-Server][0][handleHeader] - cIsUpgrade: 1
[WS-Server][0][handleHeader] - cIsWebsocket: 1
[WS-Server][0][handleHeader] - cKey: yVB/NVaLxAP5s00Eyl1aaA==
[WS-Server][0][handleHeader] - cProtocol: arduino
[WS-Server][0][handleHeader] - cExtensions: permessage-deflate; client_max_window_bits
[WS-Server][0][handleHeader] - cVersion: 13
[WS-Server][0][handleHeader] - base64Authorization:
[WS-Server][0][handleHeader] - cHttpHeadersValid: 1
[WS-Server][0][handleHeader] - cMandatoryHeadersCount: 0
[WS-Server][0][handleHeader] Websocket connection incoming.
[WS-Server][0][handleHeader] - sKey: SZmX5K096M//8uktyhTZXSSk+co=
[String] 'HTTP/1.1 1 ... t-Accept: ': Reallocating large String(158 -> 188 bytes)
[String] 'HTTP/1.1 1 ... XSSk+co=
': Reallocating large String(188 -> 212 bytes)
[WS-Server][0][handleHeader] handshake HTTP/1.1 101 Switching Protocols
Server: arduino-WebSocketsServer
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Version: 13
Sec-WebSocket-Accept: SZmX5K096M//8uktyhTZXSSk+co=
Sec-WebSocket-Protocol: arduino

[write] n: 223 t: 42348
[WS][0][headerDone] Header Handling Done.
[WS][0][handleWebsocketWaitFor] size: 2 cWsRXsize: 0
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 9 mask: 0 length: 0 headerToPayload: 0
[write] n: 2 t: 42382
[WS][0][sendFrame] sending Frame Done (3084us).
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 1 mask: 0 length: 296 headerToPayload: 0
[WS][0][sendFrame] text: {"CONTENT":"STATES","TIME":1720115853,"LCK":0,"PWR":1,"UNT":1,"AIR":0,"GRN":0,"RED":0,"FLT":0,"CH1":32,"CH2":32,"CH3":32,"HJT":0,"BRT":7,"ERR":0,"GOD":0,"TGT":20,"TMP":25,"VTMC":24.99958038,"VTMF":76.99924469,"AMBC":20,"AMBF":68,"AMB":20,"VTM":24.99958038,"TGTC":20,"TMPC":25,"TGTF":68,"TMPF":77}
[WS][0][sendFrame] pack to one TCP package...
[write] n: 300 t: 42460
[WS][0][sendFrame] sending Frame Done (3371us).
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 1 mask: 0 length: 342 headerToPayload: 0
[WS][0][sendFrame] text: {"CONTENT":"TIMES","TIME":1720115853,"CLTIME":0,"FREP":0,"FRIN":0,"FCLE":0,"UPTIME":41,"PUMPTIME":0,"HEATINGTIME":0,"AIRTIME":0,"JETTIME":0,"COST":0.015861569,"FREPI":60,"FRINI":7,"FCLEI":20,"CLINT":14,"KWH":0.010819444,"KWHD":0.011027653,"WATT":950,"T2R":-2,"RS":"Ready","DBG":" 0 0 0 0 0 0 0 0 0 0 0 cio msgs:0 || 0 0 0 0 0 0 0dsp msgs:0"}
[WS][0][sendFrame] pack to one TCP package...
[write] n: 346 t: 42544
[WS][0][sendFrame] sending Frame Done (3404us).
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 1 mask: 0 length: 164 headerToPayload: 0
[WS][0][sendFrame] text: {"CONTENT":"OTHER","MQTT":-1,"HASJETS":true,"HASGOD":true,"MODEL":"NO54138","RSSI":-51,"IP":"10.10.30.97","SSID":"Matrix_IoT","FW":"2024-07-04-1647","loopfq":60107}
[WS][0][sendFrame] pack to one TCP package...
[write] n: 168 t: 42604
[WS][0][sendFrame] sending Frame Done (3360us).
[WS][0][handleWebsocketWaitFor][readCb] size: 2 ok: 1
[WS][0][handleWebsocket] ------- read massage frame -------
[WS][0][handleWebsocket] fin: 1 rsv1: 0 rsv2: 0 rsv3 0 opCode: 8
[WS][0][handleWebsocket] mask: 1 payloadLen: 2
[WS][0][handleWebsocketWaitFor] size: 6 cWsRXsize: 2
[WS][0][handleWebsocketWaitFor][readCb] size: 6 ok: 1
[WS][0][handleWebsocket] ------- read massage frame -------
[WS][0][handleWebsocket] fin: 1 rsv1: 0 rsv2: 0 rsv3 0 opCode: 8
[WS][0][handleWebsocket] mask: 1 payloadLen: 2
[WS][0][handleWebsocket] get ask for close. Code: 1001

[WS][0][handleWebsocket] clientDisconnect code: 1000
[WS][0][sendFrame] ------- send message frame -------
[WS][0][sendFrame] fin: 1 opCode: 8 mask: 0 length: 2 headerToPayload: 0
[WS][0][sendFrame] pack to one TCP package...
[write] n: 4 t: 42883
[WS][0][sendFrame] sending Frame Done (3147us).
[WS-Server][0] client disconnected.
[WS-Server][0] Disconnect client
File size: 4625
HTTP > file sent: /config.html.gz (4625 bytes)
File size: 3088
HTTP > file sent: /main.css.gz (3088 bytes)
File size: 562
HTTP > file sent: /darkmode.js.gz (562 bytes)

@visualapproach
Copy link
Owner

The 4-wire models uses more more memory, leaving less for webserver, fileserver etc. It seems that reveals a bug in one or more of them. The strange thing is that it usually works when enabling debugging to serial. The 8266 webserver is allegedly bad at handling several simultaneous connections which may be why it works better with debug output, since it takes a little bit time to do the prints. But it also takes more memory which would make it worse. I struggled with this and implemented a second heap to gain a few kB but in the latest versions I reverted back to get more speed which I thought I needed for a new model. It worked fine on 6-wire models after reducing the number of page loads. Obviously not true for your model.
It's possible that a single page load (without css, favicon, manifests and such) would work but I don't know for sure.

@DeanozUK
Copy link
Author

DeanozUK commented Jul 4, 2024

After a bit more testing, from default all is good. I select 4wire cio and reboot and all is good. I then select v2b and reboot, still all good. Lastly I selected the first 4wire option on the page and bam, lots of timeouts, high latency and web page is very intermittent. I haven't tried the other options yet except mine but I'm thinking it will have same result.

It used to work on the old firmware couple yrs back but did used to reboot once every day or 2. I'm guessing there's a lot more to this new all in 1 firmware that's affecting the 4wire.

All these tests I've been doing are on the bench, not connected to pump.

I noticed when 6wire default is selected the monitor picks up loads of traffic constantly spamming, unlike the 4wire. This is normal I presume.

@DeanozUK
Copy link
Author

DeanozUK commented Jul 5, 2024

It's possible that a single page load (without css, favicon, manifests and such) would work but I don't know for sure.

Can you knockup a barebone test firmware so I can try for you?
I take it a D1 mini will have the same issue as based off same chipset?

@visualapproach
Copy link
Owner

D1 mini is the same chip so it would apply the same. I am wrestling with this issue and can't really make a barebone version because it only appears with everything stuffed in there. Thanks for the offer, I'll be in touch when I need help!

@visualapproach
Copy link
Owner

Try dev branch now. If you get fails on page loading try restarting your router.

More memory is now available for webserver and it works here most of the time. Had to restart the router and it worked fine again. I think using several devices makes the router confused or something.

@DeanozUK
Copy link
Author

DeanozUK commented Jul 6, 2024

Hi VA,

Right, Ive been doing some more testing with the last firmware and the new one you did today. I hope I've captured as much info as possible to help you with this issue, so please ignore anything you already know.

1st the other firmware where I said it was constantly dropping off 95% pings and unable to load a web page. I decided to hook it up to the pump and it behaved fairly different to my surprise, the pings where alot more reliable (maybe it wanted to see data from DSP?) now pings were 10% dropping and web page would keep dropping but the pump was happy. I experienced very little E13s if i left it alone. when i would say spam the temp up button it would drop and there was chance it dropped long enough that it would E13 but no watchdog reboot anymore. I say it was approx 90% reliable.

2nd, the new firmware 1400 today was uploaded and as you said I had some issues getting to fully load the webpage with all the graphics but eventually I got it. after this it does seem to only drop say 5% pings but better than before. The other issue however is that the signal coming out of the ESP is more unreliable now, causing alot more E13s even if I boot system and don't touch anything, it will always error within 3mins. control from app seems better but the signal drops are the issue causing the E13 now and not the watchdog.

Below is some links to 5 videos I did to hope show what I mean. I have an oscilloscope set up on the 5v side of the LLC (Blue trace is DSP signal going into ESP and the Red trace is the Signal coming out of the ESP to the CIO)

Is this normal that the DSP signal is 1v>5v and the ESP is generating 0v>5v. (note, I've tried the resistors and the ESP just doesn't output at all, not sure if too much pull so removed them).

Link to 5x videos
https://photos.app.goo.gl/Na4vdFmKrieDBbP37

@DeanozUK
Copy link
Author

DeanozUK commented Jul 6, 2024

Ive just been monitoring the waveforms and Ive noticed a pattern. Every now and then the DSP waveform jumps from 1-5v to 2.3v-5v and this causes the ESP to stop outputting.

Not sure if helps but looks like an issue Ive finally catch in the act. this Ive seen accross all versions, would explain why with resistors the ESP wouldnt output. Not sure why the DSP is doing this but is there away to compensate for it?

2x screenshots attached. Blue is DSP sig. Red is output of ESP
waveform before
waveform after

@visualapproach
Copy link
Owner

Good morning, I've read your posts @DeanozUK and we have 2 separate issues.
1 - web pages not loading correctly.
2 - Signal problems in your setup.

1 It seems to be caused by too little free memory available. I say "seems" here because I can't see any out of memory errors when debugging. The ESP does not fail gracefully by design as I understand it. So trial and error. In the last update I made, I got enough free memory to make it work in most cases. Now I have just found that I can kick out the wifimanager library and free up several more kB, so I hope this issue will disappear in next release.

2 It's weird that the low states is changing with time! I mean, the pull resistors don't change value. Measurement issue? Does it behave the same when the ESP is not in curcuit? If the voltage doesn't cross the LOW threshold for the ESP it will not react/answer and the DSP will go E13. I'll think about it.

@visualapproach
Copy link
Owner

@DeanozUK How long delay can the dsp take before panicking would you say?

@visualapproach
Copy link
Owner

Code.zip

See if this code works without E13.
First - enter wifi credentials on the ESP network UI page. Otherwise you need to use my undocumented new AP :-)
Then open this extracted folder in platformio and upload the new firmware.

Max time between transmissions is 2000 ms even if we miss a reception or more.

Note - this is an experimental version with a different hostname. Only a thing if you use layzspa.local instead of IP.

@DeanozUK
Copy link
Author

DeanozUK commented Jul 7, 2024

Hi VA,

I agree that there is 2 issues here.

After more testing I did indeed put the pump back to default wiring and did some capturing and the wave forms are indeed 0v-5v and stable. This leads me to believe its the input impedance. So I tried a 10k pull down and same result, tried 1k and that just reduced the upper to 4v so I removed them.

Then looked into the ESP pin outs on datasheets and rewired and configured the pins as custom as reading up it says 1,2,5 and 6 are best for data and not used for anythg else.
DSP TX D4 changed to D1
DSP RX D3 changed to D6
CIO TX D5
CIO RX D2
This to my surprise this helped as now the DSP input is reading a better 0.6v-5v and seems much more stable. I left it running all night and changed some settings on the pump and all seems good. However I did get few issues when changing via webpage but that leads us onto the other issue (point 1 in ur reply)
anyways with ESP busy/watchdog etc. But its a good start.

@DeanozUK How long delay can the dsp take before panicking would you say?

Testing shows approx >2-3secs. So max times between TX 2000ms should be good.

I will get on with installing this release and let you know.

@visualapproach
Copy link
Owner

Hi! There is a new version in development branch now. It is pretty much the same version you had, but with some general improvements.

@deanZZZZZ
Copy link

2 hour without E13 :)

@visualapproach
Copy link
Owner

Crossing my fingers 🤞🏻

@visualapproach
Copy link
Owner

@deanZZZZZ @DeanozUK same person?

@deanZZZZZ
Copy link

@deanZZZZZ @DeanozUK same person?

hehe no

@DeanozUK
Copy link
Author

DeanozUK commented Jul 8, 2024 via email

@visualapproach
Copy link
Owner

Hi VA,Haha, we are different people 😉 I've been doing some testing and it's much better but I have had some e13 issues but it is deffo better. I also had to connect to testssid and Wireshark the IP as it lost the configured, but I got it. I've just got in from work and it's alarming e13 so need to do some checks to try and pinpoint it. I've got some waveforms from first tests last night that showed a 5.5s gap then 3rapid bursts of data (poss trying to catchup) but need to test more.Shall I just update to latest release or carry on with this one as mostly the same?DeanOn 8 Jul 2024 15:01, visualapproach @.> wrote: @deanZZZZZ @DeanozUK same person? —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

Alrighty then! I recommend that you update to the released version 4.4.1 (same in both branches for the moment)
You should also update the data files for best experience.

@deanZZZZZ
Copy link

hmm... but for me it worked for two days without a problem, then SW 4x a day... and again 1 day ok... and similar

@dave2802
Copy link

dave2802 commented Aug 9, 2024

I'm also seeing the En8 error now as well, between this and the E13 error normally 3-4 times a day then it's sometimes ok for a day.

@visualapproach
Copy link
Owner

Weird message. If you want you can experiment with this value in CIO_4W.h:
const int _max_time_between_transmissions_ms = 2000;
Try 500 and see if it take more time between the errors

@mossc001
Copy link

Seeing a similar issue; can anyone confirm the 4 pin wiring for a PCB type v2b please? Picture if possible?

@mossc001
Copy link

mossc001 commented Sep 3, 2024

@visualapproach / @DeanozUK , did you manage to get to the root of the E13 error as it still seems to pop-up in the discussions on the latest firmware too?

@visualapproach
Copy link
Owner

Some of the errors were due to a too long startup sequence. That's fixed now but it won't help bad connections or other causes.

@georgemckee999
Copy link

Has this problem been fixed? I’ve got a 4 wire version for my 54138 arriving next week

@dave2802
Copy link

I've ordered the pcb v2B to retest this as I was previously using the v1 board. I have the 54144 model which is functional however I seem to be getting the E13 every 20-30 minutes now, no other errors just E13. The pump still responds to all commands when the E13 error appears but it's beeping is very annoying.

I've tried moving my AP to within 1 meter of the pump so it has an excellent signal, NTP is set and I've tried different pins all seem to provide the same results. I'm currently using 1,2,6 & 5 and it's very consistent at working fine for 30 minutes before E13 appears.

The E13 doesn't appear to show in anyway in home assistant so I'm not actually aware when it happens without physically checking, there's also no connect drop recorded on my AP.

The latest firmware 4.4.6 has been used since I created a fresh install on the v2b pcb

I'm getting to the point where I want to dig the damn speaker out the display!
Any ideas anything else I can test?

@visualapproach
Copy link
Owner

I don't think the E13 is caused by bad wifi. Unless the ESP hangs and don't send data to the display. The display throws E13 when it doesn't get any data in a while or when the data is corrupted or doesn't match the expectation.
Do you get E13 when god mode (take control) is OFF also?

@dave2802
Copy link

I'll give that a test, I always have take control turned on as standard

@dave2802
Copy link

I can confirm the E13 error still occurs even when take control is disabled

@visualapproach
Copy link
Owner

Okay, that's good in a way. It means it is not the ESP that inject errors.
So I wonder if the ESP is halting for too long every 30 minutes? Let me see if I can figure out the best way to catch that. Call you back but don't wait up

@dave2802
Copy link

No rush mate, any help is appreciated = )

@visualapproach
Copy link
Owner

In today's dev branch there is a new sensor added to Home Assistant:
image
Check the graph on Dsp msg int after an E13.

@dave2802
Copy link

dave2802 commented Oct 23, 2024

I've uploaded the dev firmware and tested tonight, 25 minutes in and I get the E13 error, the dsp msg int hasn't changed from 0 ms.

I'm not sure if this helps or not?

image

@visualapproach
Copy link
Owner

Ok, that is weird. I will see if I can improve the debugging feature. Have two jobs at the moment so maybe have time on the weekend.

@visualapproach
Copy link
Owner

@dave2802 sorry for late action. I found a bug in the debugging code. Please try again with the latest development branch.

@dave2802
Copy link

Hi, I'm just testing this now, it appears to be fluctuating between 0ms and 2,000ms currently but I'm awaiting the E13 so I'll report back when that hits

@dave2802
Copy link

Ok I've just had the E13 error, not much has changed on the dsp msg int to be honest, it's stayed around the 2,000ms mark
image

@visualapproach
Copy link
Owner

Ok, you can try to lower the max allowed time between transmissions to the display by editing line 38 in lib/dsp/DSP_4W.h to say 500 or 1000. See if it works better.

@dave2802
Copy link

Similar results on 1000, 30 minutes ish and then the E13, the dsp msg int showed 1,000ms roughly with no change.

@visualapproach
Copy link
Owner

Ok then we can probably assume that it gets messages often enough. So, from the top of my head, it may be that it's not happy with the data we feed it. Either due to bad signal or just not the expected response. Or maybe the CIO reports error. This you should be able to tell from the HA error sensor.

@dave2802
Copy link

The HA error code no longer provides me anything other than 0, this did use to work on the previous pcb v1 board I had but that was running an older version (4.4.1)
With the fact that the pump functions correctly prior to and after the E13 error does that rule out the hardware side, just wanting to check if there is anything I can replace/retest on my side?

@dave2802
Copy link

I may have workaround, I've disconnected the speaker in the display and am just controlling the pump/heating via HA. The display sits there flashing E13 however I have full control unless and actual error occurs which it appears to show errors in HA now other than the E13 which is perfect. The ability to control when the heating is turned on and off via automation is all I really need and at least the unit is not sat there beeping 24/7 :)

@georgemckee999
Copy link

I may have workaround, I've disconnected the speaker in the display and am just controlling the pump/heating via HA. The display sits there flashing E13 however I have full control unless and actual error occurs which it appears to show errors in HA now other than the E13 which is perfect. The ability to control when the heating is turned on and off via automation is all I really need and at least the unit is not sat there beeping 24/7 :)

This is something I thought about doing as my E13 comes up nearly straight away but I seem to be able to control it perfectly with the webpage just not the hot tub display. Was it easy to remove the speaker?

@dave2802
Copy link

Yeah, I had to break the gel around the speaker with a Stanley blade and then I used a flat blade screwdriver to pop it off, it only has two very thin wires so they come off easy. I've tested soldering the speaker back on and the unit works as it previously did but it's so nice not having to listen to it beeping all the time. Obviously you miss the start up beep and feedback on the display without the speaker but it's worth it for the remote control. I've now been able to use it fully for over 24 hours with no problems which is a first on this 4 pin pump for me

@georgemckee999
Copy link

Perfect I may give it a go. Let me know how you get on with it over the next week or so and if it continues to work fine on ha I will definitely do it to mine.

@georgemckee999
Copy link

@dave2802 how’s the pump been running? Still working fine with no e13 errors? I am considering doing it this weekend.

@dave2802
Copy link

dave2802 commented Dec 2, 2024

Yeah really good since I've accepted the E13 message on the display and removed the speaker. I've had it running since last week and I've only needed to reset it once (E03 error I think) which was just the filter that needed cleaning, this error showed up in HA which was nice.
The main thing for me is I'm able to heat my tub at night consistently with the cheap electric and then it only needs a few hours to get it to 40 degree when I want to use it.

@georgemckee999
Copy link

That’s great, I will do this sometime this week or the weekend then. I really want it to work, and my main reason is to stop the hot tub turning off after 3 days of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants