Local server limit?

Hello, I’ve a local server on a raspberry zero with the last version 0.30.2-java8
My project runs perfectly when I use it with only one of my 8 devices running (nano+enc28j60).
But when I power ON all of them, the app don’t display all parameters, and it reacts bad to the app commands (working sometimes, going offline/online/offline…).

So is there a limit of devices/paramaters to handle on a single project and/or on a local server?
Perhaps some setup to fix on server.properties?

Hello.

Nope.

Can you please describe in details what exactly is wrong? What app version do you have? Android/iOS?

Android app, upgraded today next installed the new server version. But not seem to be linked, as the problems were already there this morning before the upgrade.

I’ve to check more deeply, but I’ve uploaded new sketches this morning with increased number of parameters, and so more widget on the app side.
This new sketch worked well during days on the prototype device, but since I upgraded the 6 devices in production, they are all unstable…

I make some more tests, there should be somewhere a mistake, and next give a feedback…

What it your setup? Do you use separate token per device? How many and how often do you send data? Please make sure issue is not your network or hardware.

What is your phone model?

Ok I’ve made more test and have interesting things to share.
I have 6 devices nano+enc28j60 (each has its token) in the same project on a local server. My GSM is a LG L90 android.
All is updated (android, application, server)
Usually my devices send 1 data/minute, sometimes 4 data/minutes, and rarely 6 data + notification +mail.

If I connect one device, it’s very reactive when I use commands on the app. I can send 1-2 command /sec, and it’s reliable.
1 device ( quick commands OK, 2x/sec)

[1113387] Connecting to xxxxxxxxxxxxxxxxxx :xxxx
[1113909] <[02|00|01|00] 
[1113910] <token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[1113949] >[00|00|01|00|C8]
[1113950] Ready (ping: 34ms).
[1113979] Free RAM: 433
[1123917] <[06|00|02|00|00]
[1123949] >[00|00|02|00|C8]
[1131673] >[14|00|D1|00|07]
[1131674] >vw[00]27[00]1       => START COMMANDE V27
[1131742] <[14|00|D1|00]%
[1131753] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111 => V5
[1131827] <[14|00|D1|00|09]
[1131838] <vw[00]22[00]-23 => V22
[1131906] <[14|00|D1|00|09]
[1131918] <vw[00]23[00]-22 => V23
[1131919] >[14|00|D2|00|07]
[1131928] >vw[00]27[00]0  => END COMMANDE V27
[1132548] >[14|00|D3|00|07]
[1132549] >vw[00]27[00]1
[1132616] <[14|00|D3|00]%
[1132627] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1132702] <[14|00|D3|00|09]
[1132713] <vw[00]22[00]-23
[1132782] <[14|00|D3|00|09]
[1132793] <vw[00]23[00]-22
[1132795] >[14|00|D4|00|07]
[1132815] >vw[00]27[00]0
[1133848] >[14|00|D5|00|07]
[1133849] >vw[00]27[00]1
[1133917] <[14|00|D5|00]%
[1133917] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
.....

But if I connect asecond device, they become very less responsible to the commands and finish to crash.

2 devices (1 commande quick  1x/sec)
2047651] >vw[00]27[00]0
[2047689] >[00|00|03|00|C8]
[2047709] >[14|02|01|00|07]
[2047738] >vw[00]27[00]1
[2047832] <[14|02|01|00]%
[2047832] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[2047929] <[14|02|01|00|09]
[2047941] <vw[00]22[00]-23
[2048009] <[14|02|01|00|09]
[2048020] <vw[00]23[00]-22
[2048022] >[C0|00]H[00|00]
[2048030] Invalid header type: 192
[2048100] Disconnected
[2050127] Connecting to 192.168.0.17:8442
[2050649] <[02|00|01|00] 
[2050650] <d9ee4fa34c9545cca6ccb7787f733d35
[2050689] >[00|00|01|00|C8]
[2050690] Ready (ping: 34ms).
[2050719] Free RAM: 433
[2060657] <[06|00|02|00|00]
[2060690] >[00|00|02|00|C8] 

The only way to make it works is to wait 10-15sec betwwen each command. And it finishes to crash anyway.

2 devices (1 commande / >10sec)

[1592544] <[06|00|0B|00|00]
[1594545] <[06|00|0C|00|00]
[1595641] >[14|01]h[00|07]
[1595642] >vw[00]27[00]1
[1595709] <[14|01]h[00]%
[1595709] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1595805] <[14|01]h[00|09]
[1595817] <vw[00]22[00]-23
[1595886] <[14|01]h[00|09]
[1595897] <vw[00]23[00]-22
[1595899] >[14|01]i[00|07]
[1595907] >vw[00]27[00]0
[1595944] >[00|00|0A|00|C8]
[1595964] >[00|00|0B|00|C8]
[1595994] >[00|00|0C|00|C8]
[1605899] <[06|00|0D|00|00]
[1605932] >[00|00|0D|00|C8]
[1609738] >[14|01]j[00|07]
[1609739] >vw[00]27[00]1
[1609807] <[14|01]j[00]%
[1609819] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1609892] <[14|01]j[00|09]
[1609904] <vw[00]22[00]-23
[1609972] <[14|01]j[00|09]
[1609984] <vw[00]23[00]-22
[1609986] >[14|01]k[00|07]
[1609993] >vw[00]27[00]0
[1619987] <[06|00|0E|00|00]
[1620020] >[00|00|0E|00|C8]
[1629988] <[06|00|0F|00|00]
[1631989] <[06|00|10|00|00]
[1633990] <[06|00|11|00|00]
[1635918] >[14|01]m[00|07]
[1635919] >vw[00]27[00]1
[1635987] <[14|01]m[00]%
[1635987] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1636083] <[14|01]m[00|09]
[1636096] <vw[00]22[00]-23
[1636164] <[14|01]m[00|09]
[1636175] <vw[00]23[00]-22
[1636177] >[14|01]n[00|07]
[1636185] >vw[00]27[00]0
[1636222] >[00|00|0F|00|C8]
[1636242] >[00|00|10|00|C8]
[1636272] >[00|00|11|00|C8]
[1646177] <[06|00|12|00|00]
[1646210] >[00|00|12|00|C8]
[1650138] >[14|01]p[00|07]
[1650139] >vw[00]27[00]1
[1650207] <[14|01]p[00]%
[1650208] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1650304] <[14|01]p[00|09]
[1650305] <vw[00]22[00]-23
[1650394] <[14|01]p[00|09]
[1650405] <vw[00]23[00]-22
[1650407] >[14|01]q[00|07]
[1650414] >vw[00]27[00]0
[1660408] <[06|00|13|00|00]
[1660440] >[00|00|13|00|C8]
[1670409] <[06|00|14|00|00]
[1672410] <[06|00|15|00|00]
[1674411] <[06|00|16|00|00]
[1676412] <[06|00|17|00|00]
[1676442] Heartbeat timeout: 1676442, 1660441, 1676412
[1676465] Disconnected
[1681424] Connecting to 192.168.0.17:8442
[1681945] <[02|00|01|00] 
[1681946] <d9ee4fa34c9545cca6ccb7787f733d35
[1681985] >[00|00|01|00|C8]
[1681986] Ready (ping: 34ms).
[1682016] Free RAM: 433
[1691953] <[06|00|02|00|00]
[1691985] >[00|00|02|00|C8] 

Strangely during my tests, one time it worked fine, don’t know why. Perhaps the other device became down during this test… but at the end it finishes to crash anyway, but I sent really a lot of commands.

2 devices (quick commands OK ? ???)

[1852568] Ready (ping: 33ms).
[1852599] Free RAM: 433
[1855395] >[14|01|98|00|07]
[1855396] >vw[00]27[00]1
[1855463] <[14|01|98|00]%
[1855474] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1855548] <[14|01|98|00|09]
[1855559] <vw[00]22[00]-23
[1855627] <[14|01|98|00|09]
[1855639] <vw[00]23[00]-22
[1855640] >[14|01|99|00|07]
[1855649] >vw[00]27[00]0
[1856239] >[14|01|9B|00|07]
[1856240] >vw[00]27[00]1
[1856308] <[14|01|9B|00]%
[1856319] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1856393] <[14|01|9B|00|09]
[1856404] <vw[00]22[00]-23
[1856472] <[14|01|9B|00|09]
[1856483] <vw[00]23[00]-22
[1856485] >[14|01|9C|00|07]
[1856494] >vw[00]27[00]0
[1856941] >[14|01|9D|00|07]
[1856943] >vw[00]27[00]1
[1857010] <[14|01|9D|00]%
[1857010] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1857107] <[14|01|9D|00|09]
[1857120] <vw[00]22[00]-23
[1857188] <[14|01|9D|00|09]
[1857200] <vw[00]23[00]-22
[1857202] >[14|01|9E|00|07]
[1857211] >vw[00]27[00]0
[1857532] >[14|01|9F|00|07]
[1857533] >vw[00]27[00]1
[1857600] <[14|01|9F|00]%
[1857611] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1857685] <[14|01|9F|00|09]
[1857696] <vw[00]22[00]-23
[1857764] <[14|01|9F|00|09]
[1857775] <vw[00]23[00]-22
[1857777] >[14|01|A0|00|07]
[1857786] >vw[00]27[00]0
[1858168] >[14|01|A1|00|07]
[1858170] >vw[00]27[00]1
[1858237] <[14|01|A1|00]%
[1858248] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1858322] <[14|01|A1|00|09]
[1858333] <vw[00]22[00]-23
[1858401] <[14|01|A1|00|09]
[1858412] <vw[00]23[00]-22
[1858414] >[14|01|A2|00|07]
[1858423] >vw[00]27[00]0
[1858755] >[14|01|A3|00|07]
[1858756] >vw[00]27[00]1
[1858823] <[14|01|A3|00]%
[1858834] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1858908] <[14|01|A3|00|09]
[1858919] <vw[00]22[00]-23
[1858987] <[14|01|A3|00|09]
[1858998] <vw[00]23[00]-22
[1859000] >[14|01|A4|00|07]
[1859009] >vw[00]27[00]0
[1859329] >[14|01|A5|00|07]
[1859331] >vw[00]27[00]1
[1859398] <[14|01|A5|00]%
[1859398] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1859495] <[14|01|A5|00|09]
[1859508] <vw[00]22[00]-23
[1859586] <[14|01|A5|00|09]
[1859598] <vw[00]23[00]-22
[1859599] >[14|01|A6|00|07]
[1859608] >vw[00]27[00]0
[1859896] >[14|01|A7|00|07]
[1859897] >vw[00]27[00]1
[1859965] <[14|01|A7|00]%
[1859977] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1860051] <[14|01|A7|00|09]
[1860063] <vw[00]22[00]-23
[1860131] <[14|01|A7|00|09]
[1860143] <vw[00]23[00]-22
[1860145] >[14|01|A8|00|07]
[1860154] >vw[00]27[00]0
[1860445] >[14|01|A9|00|07]
[1860446] >vw[00]27[00]1
[1860513] <[14|01|A9|00]%
[1860525] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1860599] <[14|01|A9|00|09]
[1860611] <vw[00]22[00]-23
[1860679] <[14|01|A9|00|09]
[1860690] <vw[00]23[00]-22
[1860692] >[14|01|AA|00|07]
[1860712] >vw[00]27[00]0
[1860982] >[14|01|AB|00|07]
[1860983] >vw[00]27[00]1
[1861051] <[14|01|AB|00]%
[1861062] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1861136] <[14|01|AB|00|09]
[1861147] <vw[00]22[00]-23
[1861215] <[14|01|AB|00|09]
[1861226] <vw[00]23[00]-22
[1861228] >[14|01|AC|00|07]
[1861237] >vw[00]27[00]0
[1861557] >[14|01|AD|00|07]
[1861558] >vw[00]27[00]1
[1861626] <[14|01|AD|00]%
[1861626] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1861723] <[14|01|AD|00|09]
[1861735] <vw[00]22[00]-23
[1861803] <[14|01|AD|00|09]
[1861814] <vw[00]23[00]-22
[1861869] >[14|01|AE|00|07]
[1861870] >vw[00]27[00]0
[1862097] >[14|01|AF|00|07]
[1862098] >vw[00]27[00]1
[1862165] <[14|01|AF|00]%
[1862176] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1862250] <[14|01|AF|00|09]
[1862261] <vw[00]22[00]-23
[1862329] <[14|01|AF|00|09]
[1862340] <vw[00]23[00]-22
[1862342] >[14|01|B0|00|07]
[1862351] >vw[00]27[00]0
[1862632] >[14|01|B1|00|07]
[1862633] >vw[00]27[00]1
[1862701] <[14|01|B1|00]%
[1862712] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1862786] <[14|01|B1|00|09]
[1862797] <vw[00]22[00]-23
[1862865] <[14|01|B1|00|09]
[1862877] <vw[00]23[00]-22
[1862879] >[14|01|B2|00|07]
[1862888] >vw[00]27[00]0
[1863147] >[14|01|B3|00|07]
[1863148] >vw[00]27[00]1
[1863216] <[14|01|B3|00]%
[1863216] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1863324] <[14|01|B3|00|09]
[1863336] <vw[00]22[00]-23
[1863404] <[14|01|B3|00|09]
[1863415] <vw[00]23[00]-22
[1863417] >[14|01|B4|00|07]
[1863437] >vw[00]27[00]0
[1864587] >[14|01|B5|00|07]
[1864588] >vw[00]27[00]1
[1864655] <[14|01|B5|00]%
[1864667] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1864741] <[14|01|B5|00|09]
[1864753] <vw[00]22[00]-23
[1864821] <[14|01|B5|00|09]
[1864833] <vw[00]23[00]-22
[1864835] >[14|01|B6|00|07]
[1864844] >vw[00]27[00]0
[1867616] >[14|01|B7|00|07]
[1867618] >vw[00]27[00]1
[1867685] <[14|01|B7|00]%
[1867685] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1867782] <[14|01|B7|00|09]
[1867794] <vw[00]22[00]-23
[1867862] <[14|01|B7|00|09]
[1867884] <vw[00]23[00]-22
[1867886] >[14|01|B8|00|07]
[1867887] >vw[00]27[00]0
[1870668] >[14|01|B9|00|07]
[1870669] >vw[00]27[00]1
[1870737] <[14|01|B9|00]%
[1870748] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1870822] <[14|01|B9|00|09]
[1870833] <vw[00]22[00]-23
[1870901] <[14|01|B9|00|09]
[1870912] <vw[00]23[00]-22
[1870914] >[14|01|BA|00|07]
[1870923] >vw[00]27[00]0
[1871582] >[14|01|BB|00|07]
[1871583] >vw[00]27[00]1
[1871650] <[14|01|BB|00]%
[1871650] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1871747] <[14|01|BB|00|09]
[1871759] <vw[00]22[00]-23
[1871827] <[14|01|BB|00|09]
[1871850] <vw[00]23[00]-22
[1871885] >[14|01|BC|00|07]
[1871886] >vw[00]27[00]0
[1871887] >[14|01|BD|00|07]
[1871907] >vw[00]27[00]1
[1872000] <[14|01|BD|00]%
[1872001] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1872097] <[14|01|BD|00|09]
[1872109] <vw[00]22[00]-23
[1872187] <[14|01|BD|00|09]
[1872209] <vw[00]23[00]-22
[1872210] >[14|01|BE|00|07]
[1872211] >vw[00]27[00]0
[1872236] >[14|01|BF|00|07]
[1872278] >vw[00]27[00]1
[1872359] <[14|01|BF|00]%
[1872359] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1872457] <[14|01|BF|00|09]
[1872470] <vw[00]22[00]-23
[1872538] <[14|01|BF|00|09]
[1872549] <vw[00]23[00]-22
[1872551] >[14|01|C0|00|07]
[1872571] >vw[00]27[00]0
[1876717] >[14|01|C1|00|07]
[1876718] >vw[00]27[00]1
[1876786] <[14|01|C1|00]%
[1876786] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1876894] <[14|01|C1|00|09]
[1876907] <vw[00]22[00]-23
[1876975] <[14|01|C1|00|09]
[1876986] <vw[00]23[00]-22
[1876988] >[14|01|C2|00|07]
[1877008] >vw[00]27[00]0
[1878333] >[14|01|C3|00|07]
[1878334] >vw[00]27[00]1
[1878402] <[14|01|C3|00]%
[1878414] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1878487] <[14|01|C3|00|09]
[1878498] <vw[00]22[00]-23
[1878566] <[14|01|C3|00|09]
[1878578] <vw[00]23[00]-22
[1878580] >[14|01|C4|00|07]
[1878589] >vw[00]27[00]0
[1879351] >[14|01|C5|00|07]
[1879352] >vw[00]27[00]1
[1879420] <[14|01|C5|00]%
[1879432] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1879506] <[14|01|C5|00|09]
[1879518] <vw[00]22[00]-23
[1879586] <[14|01|C5|00|09]
[1879598] <vw[00]23[00]-22
[1879600] >[14|01|C6|00|07]
[1879609] >vw[00]27[00]0
[1881495] >[14|01|C7|00|07]
[1881496] >vw[00]27[00]1
[1881564] <[14|01|C7|00]%
[1881564] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1881660] <[14|01|C7|00|09]
[1881672] <vw[00]22[00]-23
[1881739] <[14|01|C7|00|09]
[1881751] <vw[00]23[00]-22
[1881837] >[14|01|C8|00|07]
[1881838] >vw[00]27[00]0
[1882105] >[14|01|C9|00|07]
[1882106] >vw[00]27[00]1
[1882173] <[14|01|C9|00]%
[1882173] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1882270] <[14|01|C9|00|09]
[1882283] <vw[00]22[00]-23
[1882351] <[14|01|C9|00|09]
[1882362] <vw[00]23[00]-22
[1882364] >[14|01|CA|00|07]
[1882384] >vw[00]27[00]0
[1882715] >[14|01|CB|00|07]
[1882716] >vw[00]27[00]1
[1882784] <[14|01|CB|00]%
[1882796] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1882870] <[14|01|CB|00|09]
[1882882] <vw[00]22[00]-23
[1882950] <[14|01|CB|00|09]
[1882961] <vw[00]23[00]-22
[1882963] >[14|01|CC|00|07]
[1882983] >vw[00]27[00]0
[1884740] >[14|01|CD|00|07]
[1884741] >vw[00]27[00]1
[1884809] <[14|01|CD|00]%
[1884820] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1884894] <[14|01|CD|00|09]
[1884905] <vw[00]22[00]-23
[1884973] <[14|01|CD|00|09]
[1884984] <vw[00]23[00]-22
[1884986] >[14|01|CE|00|07]
[1884995] >vw[00]27[00]0
[1885367] >[14|01|CF|00|07]
[1885368] >vw[00]27[00]1
[1885436] <[14|01|CF|00]%
[1885448] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1885522] <[14|01|CF|00|09]
[1885534] <vw[00]22[00]-23
[1885602] <[14|01|CF|00|09]
[1885614] <vw[00]23[00]-22
[1885616] >[14|01|D0|00|07]
[1885625] >vw[00]27[00]0
[1885936] >[14|01|D1|00|07]
[1885937] >vw[00]27[00]1
[1886005] <[14|01|D1|00]%
[1886016] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1886090] <[14|01|D1|00|09]
[1886101] <vw[00]22[00]-23
[1886180] <[14|01|D1|00|09]
[1886192] <vw[00]23[00]-22
[1886193] >[14|01|D2|00|07]
[1886202] >vw[00]27[00]0
[1896194] <[06|00|02|00|00]
[1896226] >[00|00|02|00|C8]
[1897864] >[14|01|D4|00|07]
[1897865] >vw[00]27[00]1
[1897933] <[14|01|D4|00]%
[1897945] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1898019] <[14|01|D4|00|09]
[1898031] <vw[00]22[00]-23
[1898099] <[14|01|D4|00|09]
[1898112] <vw[00]23[00]-22
[1898113] >[14|01|D5|00|07]
[1898132] >vw[00]27[00]0
[1898762] >[14|01|D6|00|07]
[1898763] >vw[00]27[00]1
[1898831] <[14|01|D6|00]%
[1898831] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1898928] <[14|01|D6|00|09]
[1898940] <vw[00]22[00]-23
[1899008] <[14|01|D6|00|09]
[1899019] <vw[00]23[00]-22
[1899021] >[14|01|D7|00|07]
[1899030] >vw[00]27[00]0
[1909021] <[06|00|03|00|00]
[1909054] >[00|00|03|00|C8]
[1919022] <[06|00|04|00|00]
[1919054] >[00|00|04|00|C8]
[1929023] <[06|00|05|00|00]
[1929056] >[00|00|05|00|C8]
[1939024] <[06|00|06|00|00]
[1940557] >[14|01|D9|00|07]
[1940558] >vw[00]27[00]1
[1940625] <[14|01|D9|00]%
[1940625] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1940722] <[14|01|D9|00|09]
[1940734] <vw[00]22[00]-23
[1940803] <[14|01|D9|00|09]
[1940814] <vw[00]23[00]-22
[1940816] >[14|01|DA|00|07]
[1940836] >vw[00]27[00]0
[1940852] >[14|01|DB|00|07]
[1940883] >vw[00]27[00]1
[1940976] <[14|01|DB|00]%
[1940976] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1941073] <[14|01|DB|00|09]
[1941086] <vw[00]22[00]-23
[1941154] <[14|01|DB|00|09]
[1941166] <vw[00]23[00]-22
[1941168] >[14|01|DC|00|07]
[1941177] >vw[00]27[00]0
[1941215] >[14|01|DD|00|07]
[1941234] >vw[00]27[00]1
[1941327] <[14|01|DD|00]%
[1941327] <vw[00]5[00]99.9N01.2-21-2242r00G-11K-10S111
[1941424] <[14|01|DD|00|09]
[1941436] <vw[00]22[00]-23
[1941504] <[14|01|DD|00|09]
[1941515] <vw[00]23[00]-22
[1941517] >[00|C0|00]@[00]
[1941525] >[00]w[00]27
[1941561] >[C0|00]H[00|00]
[1941579] Invalid header type: 192
[1941638] Disconnected
[1944026] Connecting to 192.168.0.17:8442
[1944548] <[02|00|01|00] 
[1944549] <d9ee4fa34c9545cca6ccb7787f733d35
[1944588] >[00|00|01|00|C8]
[1944589] Ready (ping: 34ms).
[1944619] Free RAM: 433
[1954556] <[06|00|02|00|00] 

This is the command I used for this test for example (but I have the same issue with other ones):

BLYNK_WRITE(V27){ //Print Infos BufferI2C 
int buttonstate = param.asInt();  
  if (buttonstate == 1 && Flag_Init_Boot != '0') {
    Blynk.virtualWrite(V5, "99.9N01.2-21-2242r00G-11K-10S111");   
    Blynk.virtualWrite(V22, -23);                       // refresh widget offset
    Blynk.virtualWrite(V23, -22);                         // refresh display gain%
  } 
}

So what could I check/test to resolve this issue?

What datatype is Flag_Init_Boot ?

Maybe slip the ram check into part of your code rather than just setup() as Nano’s can quickly run out of memory.

Hello Costas,

char Flag_Init_Boot=‘0’ at startup, and becomes = ‘1’ after hardware has collected informations.
So I have to wait a bit after power ON to use this command and refresh the widgets. Nothing special about it…

But it’s the same behavior with this lightest code:

BLYNK_WRITE(V27){ //Print test command 
int buttonstate = param.asInt();  
  if (buttonstate == 1) {
    Blynk.virtualWrite(V5, 6);   
  } 
}

Please could you help me about the “ram check”? Don’t know how to do that…
But why is it working perfectly without any latence or crash with only one device connected? This makes me think about a server issue that handles bad multiple enc28j60 connections (perhaps server or library issue)?

I was thinking that you had coded up the RAM check but it’s probably the Blynk library.

Take a look at the SRAM section at https://learn.adafruit.com/memories-of-an-arduino/measuring-free-memory or the small library at https://github.com/McNeight/MemoryFree

Use millis() in loop() or BlynkTimer (aka SimpleTimer) to check ram at intervals.

Nice, I like your links and will check them quickly.
To be most concrete as possible, I’ve done again tests with very minimal sketch, and the results are really speaking.

Here is the sketch:

//TEST STABILITY

//<<LIBRARIES>>
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save flash space
#define BLYNK_DEBUG           // Comment this out to disable prints and save flash space
#define BLYNK_NO_BUILTIN        // Disable built-in analog & digital pin operations to spare 
#define BLYNK_NO_FLOAT          // Disable float operations to spare flash space
#define BLYNK_NO_INFO           // Skip device info to spare flash space
#include <BlynkSimpleUIPEthernet.h>   // ENC28J60 ethernet BLYNK library

//<<VARIABLES>>
  unsigned long lastRunTime;   // mémoire du timing de la dernière requête au NANO Slave
  unsigned long currentTime;
  
void setup() {
  Serial.begin(9600);                           // start serial for output 
  Ethernet.begin("DE:ED:BA:FE:AA:A1", IPAddress(192,168,0,51),IPAddress(192,168,0,1),IPAddress(192,168,0,1),IPAddress(255,255,255,0));    //!!!!Changer MAC et IP arduino!!!!                                                             //!!!!Changer Auth Token / IP Serveur / Port!!!!
  Blynk.config("d9ee4fa34c9545cca6ccb7787f733d35", "192.168.0.17", 8442);    
} 

BLYNK_WRITE(V27){ //TEST COMMAND
int buttonstate = param.asInt();  
  if (buttonstate == 1) {
    Blynk.virtualWrite(V5, currentTime/1000);   
  } 
}

void loop(){  
currentTime = millis();
  
while (Blynk.connected()==false) {Blynk.disconnect(); Blynk.connect();}  
Blynk.run(); 
 
  if ((currentTime - lastRunTime >= 500) ){     //timer low-cost  0.5sec  
    lastRunTime = currentTime;
    //Blynk.virtualWrite(V5, currentTime/1000);          
    }   
}

Memory situation confortable->
23434 octets (72%) de l’espace de stockage de programmes. Le maximum est de 32256 octets.
Les variables globales utilisent 1341 octets (65%) de mémoire dynamique, ce qui laisse 707 octets pour les variables locales. Le maximum est de 2048 octets.

Just two commands (identical). One in the timer of 0,5sec, the other in the manual function “BLYNK_WRITE(V27)”.

First test: I push the widget V27 one time by 10 sec (my 5 other devices are power ON).
Result : The action reacts with some seconds of late on the serial and the NANO disconnects afer one or two actions.

[52] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.0 on Arduino Uno

[137] Disconnected
[157] Connecting to 192.168.0.17:8442
[5157] Connecting to 192.168.0.17:8442
[6156] Disconnected
[10158] Connecting to 192.168.0.17:8442
[10680] <[02|00|01|00] 
[10681] <tokenXXXXXXXXXXXXXXXX
[10716] >[00|00|01|00|C8]
[10717] Ready (ping: 34ms).
[10742] Free RAM: 640
[20684] <[06|00|02|00|00]
[20716] >[00|00|02|00|C8]
[30685] <[06|00|03|00|00]
[32686] <[06|00|04|00|00]
[34688] <[06|00|05|00|00]
[36248] >[14|06|CD|00|07]
[36249] >vw[00]27[00]1
[36316] <[14|06|CD|00|07]
[36316] <vw[00]5[00]36
[36317] >[14|06|CE|00|07]
[36340] >vw[00]27[00]0
[36355] >[00|00|03|00|C8]
[36383] >[00|00|04|00|C8]
[36411] >[14|06|CF|00|07]
[36439] >vw[00]27[00]1
[36530] <[14|06|CF|00|07]
[36530] <vw[00]5[00]36
[36531] >[14|06|D0|00|07]
[36555] >vw[00]27[00]0
[36570] >[00|00|05|00|C8]
[46532] <[06|00|06|00|00]
[48533] <[06|00|07|00|00]
[50534] <[06|00|08|00|00]
[52535] <[06|00|09|00|00]
[52598] Heartbeat timeout: 52598, 36597, 52535
[52621] Disconnected
[57536] Connecting to 192.168.0.17:8442
[58057] <[02|00|01|00] 
[58058] <d9ee4fa34c9545cca6ccb7787f733d35
[58092] >[00|00|01|00|C8]

Second test: I push the widget V27 one time by 1 sec (10X faster BUT my 5 other devices are power OFF).
Result : The action reacts immediatly on the serial and on the app, no disconnect after more than hundred actions!!

[52] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.0 on Arduino Uno

[137] Disconnected
[157] Connecting to 192.168.0.17:8442
[1521] <[02|00|01|00] 
[1522] <tokenXXXXXXXXXXXXXXXXXXXXX
[1555] >[00|00|01|00|C8]
[1556] Ready (ping: 34ms).
[1580] Free RAM: 640
[10801] >[14|07|00|00|07]
[10802] >vw[00]27[00]1
[10869] <[14|07|00|00|07]
[10881] <vw[00]5[00]10
[10882] >[14|07|01|00|07]
[10884] >vw[00]27[00]0
[11650] >[14|07|03|00|07]
[11651] >vw[00]27[00]1
[11719] <[14|07|03|00|07]
[11719] <vw[00]5[00]11
[11756] >[14|07|04|00|07]
[11757] >vw[00]27[00]0
[12177] >[14|07|05|00|07]
[12178] >vw[00]27[00]1
[12246] <[14|07|05|00|07]
[12257] <vw[00]5[00]12
[12258] >[14|07|06|00|07]
[12260] >vw[00]27[00]0
[12643] >[14|07|07|00|07]
[12644] >vw[00]27[00]1
[12712] <[14|07|07|00|07]
[12712] <vw[00]5[00]12
[12754] >[14|07|08|00|07]
[12755] >vw[00]27[00]0
[13082] >[14|07|09|00|07]
[13083] >vw[00]27[00]1
[13150] <[14|07|09|00|07]
[13161] <vw[00]5[00]13
[13162] >[14|07|0A|00|07]
[13164] >vw[00]27[00]0
[13509] >[14|07|0B|00|07]
[13510] >vw[00]27[00]1
[13578] <[14|07|0B|00|07]
[13578] <vw[00]5[00]13
[13579] >[14|07|0C|00|07]
[13602] >vw[00]27[00]0
[13877] >[14|07|0D|00|07]
[13878] >vw[00]27[00]1
[13946] <[14|07|0D|00|07]
[13958] <vw[00]5[00]13
[13959] >[14|07|0E|00|07]
[13961] >vw[00]27[00]0
.............................................................. -> and so on

Third test: I uncomment the “Blynk.virtualWrite(V5, currentTime/1000);” in the loop to be acted 2 times by sec (AND my 5 other devices are powered ON).
Result : The actions reacts immediatly on the serial and on the app, no disconnect after more than hundred actions!!
So the problem is only with the manual action by “BLYNK_WRITE(V27)”. The “Blynk.virtualWrite” works very well all time.

[52] 
    ___  __          __
   / _ )/ /_ _____  / /__
  / _  / / // / _ \/  '_/
 /____/_/\_, /_//_/_/\_\
        /___/ v0.5.0 on Arduino Uno

[137] Disconnected
[157] Connecting to 192.168.0.17:8442
[5157] Connecting to 192.168.0.17:8442
[5679] <[02|00|01|00] 
[5680] <tokenXXXXXXXXXXXXXXXXXXXXXXXX
[5713] >[00|00|01|00|C8]
[5714] Ready (ping: 34ms).
[5737] Free RAM: 640
[5781] <[14|00|02|00|06]
[5786] <vw[00]5[00]5
[6260] <[14|00|03|00|06]
[6261] <vw[00]5[00]6
[6760] <[14|00|04|00|06]
[6761] <vw[00]5[00]6
[7260] <[14|00|05|00|06]
[7261] <vw[00]5[00]7
[7760] <[14|00|06|00|06]
[7761] <vw[00]5[00]7
[8260] <[14|00|07|00|06]
[8261] <vw[00]5[00]8
[8760] <[14|00|08|00|06]
[8761] <vw[00]5[00]8
[9260] <[14|00|09|00|06]
[9261] <vw[00]5[00]9
[9760] <[14|00|0A|00|06]
[9761] <vw[00]5[00]9
[10260] <[14|00|0B|00|07]
[10261] <vw[00]5[00]10
[10760] <[14|00|0C|00|07]
[10761] <vw[00]5[00]10
[11260] <[14|00|0D|00|07]
[11261] <vw[00]5[00]11
[11760] <[14|00|0E|00|07]
[11761] <vw[00]5[00]11
[12260] <[14|00|0F|00|07]
[12261] <vw[00]5[00]12
[12760] <[14|00|10|00|07]
...................................................................-> and so on.......

I show here that the NANO with this light sketch works fine, excepted for the manual widget action “BLYNK_WRITE(V27)”, and only if other devices are connected to the local server.
So I don’t understand how it could be related with a leak of memory?? I really think there is a problem in the how the function “BLYNK_WRITE(V27)” is handled by the server.

(sorrry for the long post, but I think it’s necessary to be complete for such cases :wink:

Can you explain what you mean about the other 5 devices? You have 6 Nano’s all running the same sketch with the same token etc or something else?

I have 5 other nanos with their own token with a production sketch that send each about 1 data by minute.
The only different sketch is this one that I created to analyse this problem of BlynkWrite. But all the 6 have the same reaction. Working well alone, but difficults to handle manual widget commands when another one is powered. They are all 6 in my local intranet. And they work all very well for their periodic virtualwrite.

I use them in the same project with dedicated widgets and with “device selector” widgets.
The prod sketchs are bigger than the test one but respect the warning limit of the arduino IDE.

These 6 NANOs are all I use on the server. And the server is a rasp zero that runs only the blynk server, nothing else.

Are you using any widgets with a timed update frequency other than PUSH frequency?

No, they are all in push mode.

Dmitriy ->About the model of phone : it seems not linked because there is no difference when I use NOX emulator.

@Alx-I Try reverting to the 0.4.8 library and test again… the v0.5.0 has made some changes that affect, or prevent, the past issues with sending too many / too fast Blynk commands… but seems to have some hard to pin down side effects with regards to connection reliability. Might or might not be relevant in your issue.

1 Like

Thanks for suggestion Gunner, I’ll try soon and give feedback about it :wink:

But, but , BUT… in the meantime…

I’ve found how to make it works fast and reliable.
Nothing to be proud because can"t explain the why, but content it works very well like this!
The problem is not about too much communications to handle by server but…… too few communications ! D)
I have tested with this slightly different sketch (see below).
The only difference with the prevous one is that I make a periodic « Blynk.virtualWrite » one time each 2 seconds. By doing that It’s like if I was keeping the NANO « online » with the server, and so it reacts immediatly at each of my manual commands « BLYNK_WRITE(V27) ». I’ve made a lot of tries, it’s 100% working over hundreds TX.
For me, it’s just Magical, but perhaps developers can explain that??

//<<LIBRARIES>>
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save flash space
#define BLYNK_DEBUG           // Comment this out to disable prints and save flash space
#define BLYNK_NO_BUILTIN        // Disable built-in analog & digital pin operations to spare
#define BLYNK_NO_FLOAT          // Disable float operations to spare flash space
#define BLYNK_NO_INFO           // Skip device info to spare flash space
#include <BlynkSimpleUIPEthernet.h>   // ENC28J60 ethernet BLYNK library

//<<VARIABLES>>
  unsigned long lastRunTime;   // mémoire du timing de la dernière requête au NANO Slave
  unsigned long currentTime;
  byte x=0;
  
void setup() {
  Serial.begin(9600);                           // start serial for output 
  Ethernet.begin("DE:ED:BA:FE:AA:A1", IPAddress(192,168,0,51),IPAddress(192,168,0,1),IPAddress(192,168,0,1),IPAddress(255,255,255,0));    //!!!!Changer MAC et IP arduino!!!!                                                             //!!!!Changer Auth Token / IP Serveur / Port!!!!
  Blynk.config("d9ee4fa34c9545cca6ccb7787f733d35", "192.168.0.17", 8442);    
} 

BLYNK_WRITE(V27){ //TEST COMMAND
int buttonstate = param.asInt();  
  if (buttonstate == 1) {
    x++;
    Blynk.virtualWrite(V6, x);   
  } 
}

void loop(){  
currentTime = millis();
  
while (Blynk.connected()==false) {Blynk.disconnect(); Blynk.connect();}  //wait connection serveur//semble mieux reprendre la connexion que Blynk.run(); //reste true ~10sec qd la connexion est perdue -> cfr heartbeat? & la boucle tourne au ralentis (~15sec) qd =false -> cfr fonctions discoonnect/connect?
Blynk.run(); 
 
  if ((currentTime - lastRunTime >= 2000) ){     //timer low-cost  
    lastRunTime = currentTime;
    Blynk.virtualWrite(V5, currentTime/60000);    //nbre minutes       
    }   
}

I will do more tests to find the minimum « Blynk.virtualWrite » frequency needed to keep the « BLYNK_WRITE(V27) » working fine.
In the serial it looks like the minimum traffic when the device do nothing is about 30sec.
Is there anyhing to match/understand about that?
Is it adjustable on the server.properties file (is it the heartbeat ?)
[1909021] <[06|00|03|00|00]
[1909054] >[00|00|03|00|C8]
[1919022] <[06|00|04|00|00]
[1919054] >[00|00|04|00|C8]
[1929023] <[06|00|05|00|00]
[1929056] >[00|00|05|00|C8]
[1939024] <[06|00|06|00|00]
[1940557] >[14|01|D9|00|07]

Hello,
My very last tests confirm that the BLYNK_WRITE commands work fine only if they are executed quickly just next a heartbeat ping, or an virtualwrite traffic. If I wait about 1 second later to execute the BLYNK_WRITE command, either the command is only displayed with some seconds late on the serial, or it causes a heartbeat timeout (particularly if a second command is sent and also in waiting).

This bad behavior happens only if I have at least a second device (nano+enc28j60) online.
One lonely device works perfectly whatever the timing of the BLYNK_WRITE command.

As workaround, I’m changing my sketchs to make my devices send one virtualwrite each 1,5 sec, instead of about 1 virtualwrite by minutes for now.
But I don’t find it very stylish, so I would have prefered to accelerate the ping interval of 10 sec to 1-2 seconds.
I tried to play with “#DEFINE HEARTBEAT 1”, but I can’t see any effect on the timeout or frequency of ping.
Is it possible to do that by instruction in the sketch?

Or the best of all, a fix from the Blynk Team should be the best!

@Costas : Concerning the check of memory, it displays an unchanging “freeMemory()=509” duing the run of the sketch, else if I use the BLYNK_WRITE(V27) command…

freeMemory()=509
freeMemory()=509
freeMemory()=509
freeMemory()=509
freeMemory()=509
freeMemory()=509
[236724] Heartbeat timeout: 236724, 220723, 234726
[236747] Disconnected
[239727] Connecting to 192.168.0.17:8442
[240248] <[02|00|01|00] 
[240249] <d9ee4fa34c9545cca6ccb7787f733d35
[240285] >[00|00|01|00|C8]
[240286] Ready (ping: 33ms).
[240315] Free RAM: 470
[240353] <[14|00|02|00|06]
[240369] <vw[00]5[00]4
freeMemory()=509
freeMemory()=509
freeMemory()=509
freeMemory()=509

Hi,

My workaround finally fails!
After the upload of the new sketch to all my devices, the BLYNK_WRITE(V27) works again bad as before.
It seems the test device has “lost its advantage” of staying online with the server now that all the other devices also send virtualwrite each 1,5sec…

I have no more idea to try to solve the problem.
Could anyone of blynk team try this simple sketch and check the comportment ?
Should not a so simple sketch just work fine?

//TEST STABILITY

//<<LIBRARIES>>
#define BLYNK_PRINT Serial    // Comment this out to disable prints and save flash space
#define BLYNK_DEBUG           // Comment this out to disable prints and save flash space
#define BLYNK_NO_BUILTIN        // Disable built-in analog & digital pin operations to spare flash space
#define BLYNK_NO_FLOAT          // Disable float operations to spare flash space
#define BLYNK_NO_INFO           // Skip device info to spare flash space
#include <BlynkSimpleUIPEthernet.h>   // ENC28J60 ethernet BLYNK library
#include <MemoryFree.h>


//<<VARIABLES>>
  unsigned long lastRunTime;   // mémoire du timing de la dernière requête au NANO Slave
  unsigned long lastRunTime2;  
  unsigned long currentTime;
  byte x=0;
  
void setup() {
  Serial.begin(9600);                           // start serial for output 
  Ethernet.begin("DE:ED:BA:FE:AA:A1", IPAddress(192,168,0,51),IPAddress(192,168,0,1),IPAddress(192,168,0,1),IPAddress(255,255,255,0));   
  Blynk.config("XXXXXXXXXXX", "192.168.0.17", 8442);    
} 

BLYNK_WRITE(V27){ //TEST COMMAND -> works bad, late, or lead to heartbeat
int buttonstate = param.asInt();  
  if (buttonstate == 1) {
    x++;
    Blynk.virtualWrite(V6, x*10000);   
  } 
}

void loop(){  
currentTime = millis();
  
while (Blynk.connected()==false) {Blynk.disconnect(); Blynk.connect();}  
Blynk.run(); 
 
  if ((currentTime - lastRunTime >= 1500) ){     //timer low-cost  
    lastRunTime = currentTime;
    Blynk.virtualWrite(V5, currentTime);    //nbre minutes       
    }   
}

Very last tests, still KO when several NANO ethernet are online…
I’ve tried with different values of BLYNK_HEARTBEAT & BLYNK_TIMEOUT_MS -> not better, sometimes worst.
I removed everything that is not usefull in the sketch to just keep the BLYNK_WRITE:

//TEST STABILITY "BLYNK_WRITE(Vx)"

#define BLYNK_PRINT Serial    // Comment this out to disable prints and save flash space
#define BLYNK_DEBUG           // Comment this out to disable prints and save flash space
#define BLYNK_NO_BUILTIN        // Disable built-in analog & digital pin operations to spare flash space
#define BLYNK_NO_FLOAT          // Disable float operations to spare flash space
#define BLYNK_NO_INFO           // Skip device info to spare flash space
#include <BlynkSimpleUIPEthernet.h>   // ENC28J60 ethernet BLYNK library
#include <MemoryFree.h>

//#define BLYNK_HEARTBEAT 10      //1->1000  (no effect)
//#define BLYNK_TIMEOUT_MS  750   //7->75000 (less than 75 is worst)
  
void setup() {
Serial.begin(9600);                         
Ethernet.begin("DE:ED:BA:FE:AA:A1", IPAddress(192,168,0,51),IPAddress(192,168,0,1),IPAddress(192,168,0,1),IPAddress(255,255,255,0));    
Blynk.config("xxxxxxxxxxxxxxxxxxxxxxxx", "192.168.0.17", 8442);    
} 

BLYNK_WRITE(V27){ //TEST COMMAND
int buttonstate = param.asInt();  
  if (buttonstate == 1) {
    //do nothing  
  } 
}

void loop(){  
while (Blynk.connected()==false) {Blynk.disconnect(); Blynk.connect();}  
Blynk.run();    
}

The first BLYNK_WRITE works usually, the second rarely, followed by a heartbeat timeout.
It demonstrates that the BLYNK_WRITE isn’t reliable on a NANO+ethernet.
I can’t do anything more and regret not having any feedback or informations about this from blynk team.
If it can’t work with this hardware, just say it please. I stop investigating and go on anything else…

        /___/ v0.5.0 on Arduino Uno

[137] Disconnected
[157] Connecting to 192.168.0.17:8442
[5157] Connecting to 192.168.0.17:8442
[5679] <[02|00|01|00] 
[5680] <d9ee4fa34c9545cca6ccb7787f733d35
[5712] >[00|00|01|00|C8]
[5713] Ready (ping: 33ms).
[5737] Free RAM: 651
[15681] <[06|00|02|00|00]
[15714] >[00|00|02|00|C8]
[25682] <[06|00|03|00|00]
[25714] >[00|00|03|00|C8]
[35683] <[06|00|04|00|00]
[35735] >[14|00]c[00|07]
[35736] >vw[00]27[00]1
[35737] >[14|00]d[00|07]
[35747] >vw[00]27[00]0
[35773] >[00|00|04|00|C8]
[45684] <[06|00|05|00|00]
[47685] <[06|00|06|00|00]
[49686] <[06|00|07|00|00]
[51687] <[06|00|08|00|00]
[51801] Heartbeat timeout: 51801, 35800, 51687
[51823] Disconnected
[56688] Connecting to 192.168.0.17:8442
[57824] Disconnected
[61689] Connecting to 192.168.0.17:8442
[62211] <[02|00|01|00] 
[62212] <d9ee4fa34c9545cca6ccb7787f733d35
[62246] >[00|00|01|00|C8]
[62247] Ready (ping: 33ms).
[62273] Free RAM: 651
[72215] <[06|00|02|00|00]
[72248] >[00|00|02|00|C8]