Page 1 of 1

Number of Devices / Tasks limited to 12 ?

Posted: 18 Feb 2017, 16:11
by sm0k0
Hi all,

i`m currently working on a heating temp monitor for 3 heater circuits based on an Wemos Mini D1. In the past i used 24 x DS18B20, 3 Hall Sensors ( Flow Meter) and a 4x20 lCD display.

In general it was really easy to port all devices to the Wemos (very very ..) until i reached Task 12 (Device 12) on Page 3.

Is there a known limitation to 3 config pages with 12 tasks in total and if this is not a bug, does anyone has an idea to get over the 12 devices ?

many thanks in advance & best regards
sm0k0

EDIT: sorry forgot FW release, tried R120 and R147.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 18 Feb 2017, 17:39
by psy0rz
Yes the limit is 12. Try changing TASKS_MAX in ESPEasy.ino and recompile the project.

Edwin

Re: Number of Devices / Tasks limited to 12 ?

Posted: 18 Feb 2017, 22:31
by sm0k0
Hi Edwin,
:D thanks for your advise. Works perfect !

Thanks & regards
sm0k0

Re: Number of Devices / Tasks limited to 12 ?

Posted: 19 Feb 2017, 14:00
by DavidVT
Worked for me also, 9 DS18b20 sensors all reading perfect on Sonoff 4Ch! :D

I am now getting two GPIOs listed in the GPIO column of the first 12 devices. The real GPIO# listed above GPIO0.
Seems to work fine?

Re: Number of Devices / Tasks limited to 12 ?

Posted: 29 May 2017, 14:07
by lars@baekmark.dk
Hi sm0k0

I need to use more than 12 tasks like you, and my understanding is that you have already compiled the firmware R147 . Any chance that you can share your version that support more than 12 tasks? I'm using a ESP8266DEV with 4 meg's. Actual its a board from panStamp with 6 relays, but I need to add more sensors

TIA
Lars
sm0k0 wrote: 18 Feb 2017, 22:31 Hi Edwin,
:D thanks for your advise. Works perfect !

Thanks & regards
sm0k0

Re: Number of Devices / Tasks limited to 12 ?

Posted: 29 May 2017, 20:04
by Martinus
Beware that the task settings need to be stored in a config file (Mega) or flash area (classic ESP Rxxx) with a specific and fixed memory layout.
Changing preset #defines could lead to writing outside these fixed boundaries and this may well lead to overwriting other data areas.
In V2, i think it will overwrite the controller config if you set the value > 12.

Also be aware that more RAM will be used when changing the max number of tasks, even if they are idle.

In other words: if you change one define, you may need to change more of them and also know how the internals work...

Re: Number of Devices / Tasks limited to 12 ?

Posted: 15 Jun 2017, 14:19
by grovkillen
I put this on the wiki... is it correctly formalized you think?

https://www.letscontrolit.com/wiki/inde ... 2_tasks.3F

Re: Number of Devices / Tasks limited to 12 ?

Posted: 02 Oct 2017, 21:09
by themanfrommoon
Hello,

I need 15 devices / tasks.
I understand that it is possible to change it.
My programming skills are about 25 years old, and actually I have no idea how to do it.

Could anybody give me an instruction how to do this in detail. Step by step for a noob?

Please not like "compile it" ..... because I have no idea how to compile it :-)
This is why I asked for "Step by step for a noob". :roll:

Thanks a lot and best regards,
Chris

Re: Number of Devices / Tasks limited to 12 ?

Posted: 02 Oct 2017, 21:47
by grovkillen
What types of devices? Please list the whole 15 devices.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 02 Oct 2017, 22:03
by themanfrommoon
15 pieces of DS18b20 1-wire temperature sensors

Re: Number of Devices / Tasks limited to 12 ?

Posted: 02 Oct 2017, 23:42
by Domosapiens
Chris

Currently running on #4 ESP's (LoLin type):
Using a 24 task version adapted from ESPEasy_v2.0.0-dev11_normal_4096.bin.
With #20 DS18b20 Tasks, #1 LCD2004 Task, 1 PIR Switch input Task, #1 Load Task and #1 FreeMem Task.
#20 DS18b20 with a Delay(=refresh rate) of 29/30/31 seconds (to somewhat prevent clustering in the scheduler)
#1 LCD2004 Task with a Delay(=refresh rate) of 30 seconds (optimal, that should be twice as fast as the DS18b20, but never tried 15 seconds)
All values are send to Domoticz.
Average load < 25%
FreeMem around 20300 byte (enough for smooth operation)

GPIO connections:
LCD2004:
SDA=GPIO4=D2
SCL=GPIO5=D1
#8 DS18b20: GPIO14=D5
#8 DS18b20: GPIO12=D6
#4 DS18b20: GPIO16=D0
PIR Display: GPIO13=D7


Download first the regular dev11 version here:
https://github.com/letscontrolit/ESPEas ... -dev11.zip
Then,
Flash your ESP with ESPEasy_v2.0.0-dev11_normal_4096.bin
Configure your Wifi stuff.
Configure your Controller, but don't use Nr 1, Use 2 or 3 Instead.
As Martinus wrote..
In V2, i think it will overwrite the controller config if you set the value > 12.
indeed ... i have seen that Controller Nr 1 data was overwritten.

Then update with the OTA function and use this 24 Tasks binary for DS18b20 (striped version, many other devices are removed)
https://wetransfer.com/downloads/b56f2b ... 315/3d87e2
(download available for 7 days)

Start to fill your DS18b20 Tasks, but regularly re-boot during that process, otherwise ESPEasy goes below its needed minimum FreeMem.
When you are half-way, do an off/on reboot because of the number of Flash cycles (limited to 100)

2 Units under test (per plug, I use a bundle of #8 or #4 DS18b20 sensors) :
2 MUC units crop 20170824_170506.png
2 MUC units crop 20170824_170506.png (471.6 KiB) Viewed 27690 times
16 of the 20 sensors on display:
display crop 20170816_233138.png
display crop 20170816_233138.png (306.29 KiB) Viewed 27690 times

Re: Number of Devices / Tasks limited to 12 ?

Posted: 03 Oct 2017, 01:31
by themanfrommoon
Hi Domosapiens,

thanks a lot!

I tried this, and finally it works.

I had some issues regarding the Controller.
It overwrites controller 1 and controller 3, finally with controller 2 it works.


Could you please explain how you build the .bin file?

I would like to change it with the source of dev 12 and also with 15 devices and not 24, to safe some memory.

Thanks and best regards,
Chris

Re: Number of Devices / Tasks limited to 12 ?

Posted: 03 Oct 2017, 09:09
by toffel969
themanfrommoon wrote: 03 Oct 2017, 01:31 Hi Domosapiens,

thanks a lot!

I tried this, and finally it works.

I had some issues regarding the Controller.
It overwrites controller 1 and controller 3, finally with controller 2 it works.


Could you please explain how you build the .bin file?

I would like to change it with the source of dev 12 and also with 15 devices and not 24, to safe some memory.

Thanks and best regards,
Chris
There are More than one way To Compile The bin.
I can only help you with The old school "arduino IDE" way.

Follow this tutorial

[ur]lhttps://www.letscontrolit.com/wiki/index.php/Tu ... are_Upload[/url]

Just instead of uploading The Firmware directly To The board, use The "Export bin" Function.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 03 Oct 2017, 13:19
by AndrewJ
This is really good news, that it is possible to run so many Ds18b20's together. I'll give it a try..
Previously I seemed to hit a limit with 4 DS18B20'S, but that was with the normal ESPeasy (can't remember now which version).
Definitely inspiration to go further, thanks. :D

Re: Number of Devices / Tasks limited to 12 ?

Posted: 03 Oct 2017, 16:49
by Domosapiens
Could you please explain how you build the .bin file?
@Chris:
Some nice people did already a lot of effort for you!
It is called Wiki
https://www.letscontrolit.com/wiki/inde ... Platformio
Then follow the third bullet, starting with No:
https://www.letscontrolit.com/wiki/inde ... platformio


Edit ESPEasy.ino and adapt this line (223)
#define TASKS_MAX 12 // max 12!

And I moved a number of _P0xxxxxx files, that I obviously not needed, from the src directory to another place.

I went from 16 to 20 to 24 Tasks.
If I remember well, overwriting of the first Controller with garbage, started already with 16 Tasks.

Btw
@Mods: I like to suggest to offer a link to the wiki on this board as a sticky post

Re: Number of Devices / Tasks limited to 12 ?

Posted: 06 Jan 2018, 23:24
by lukasz@tasz.eu
Hi

first of all, thanks for letscontrolit.com! it is g r e a t!!!


one suggestion to this topic,
isn't it good idea to adjust - or create second plugin of ds18b20 that during creation will scan for all sensors, and then each time will ask next sensor for value,
and represent not only one value but array of last known values for each sensor?
power of letscontrolit is that each device has same firmware, but this is normal that on onewire there is much more then one sensor.

ofcourse external software mus be then aware of device ID

regards
Lukasz

Re: Number of Devices / Tasks limited to 12 ?

Posted: 11 Jan 2018, 05:05
by wesley5
Change TASKS_MAX in ESPEasy.ino and recompile

Re: Number of Devices / Tasks limited to 12 ?

Posted: 11 Jan 2018, 07:13
by papperone
wesley5 wrote: 11 Jan 2018, 05:05 Change TASKS_MAX in ESPEasy.ino and recompile
It's not that simple as this can lead to crashes and strange behaviour due to data structure overlapping (if I remember correctly)...

Re: Number of Devices / Tasks limited to 12 ?

Posted: 11 Jan 2018, 08:18
by grovkillen
wesley5 wrote: 11 Jan 2018, 05:05 Change TASKS_MAX in ESPEasy.ino and recompile
https://www.letscontrolit.com/wiki/inde ... 2_tasks.3F

Re: Number of Devices / Tasks limited to 12 ?

Posted: 11 Jan 2018, 10:45
by Domosapiens
Change TASKS_MAX in ESPEasy.ino and recompile
See hexemeister's suggestion to prevent data structure overlapping...
https://github.com/letscontrolit/ESPEas ... -344511468

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Jul 2018, 11:17
by Jufo
I tried to find the parameter in ESPEasy.ino:
#define TASKS_MAX 12 // max 12!"

but unfortunately I do not see it in the version ESPEasy_mega-20180625.

Please help.

Best Regards
Robert

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Jul 2018, 13:09
by grovkillen
It's in the globals now. Just search using the IDE search function

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Jul 2018, 13:44
by Jufo
can I ask for more details, I will do it for the first time I need to change from 12 to 15 tasks.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Jul 2018, 14:12
by grovkillen
What IDE do you use! (PlatformIO or Arduino?)

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Jul 2018, 19:57
by Jufo
I have never used an IDE (PlatformIO or Arduino) but will adapt to the instructions.
I always flash a ready bin file.

Best Regards,
Robert

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Jul 2018, 20:26
by grovkillen
Then you need to study the wiki and try to resolve the issue with self compile. We do not have the time to support self compilers, sorry.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Jul 2018, 21:46
by TD-er
Increasing those limits can result in data corruption of the settings.
The current method of storing settings is based on blocks in the settings file. When you increase that setting, those blocks may start overwrite data of adjacent blocks (e.g. controller settings)

Re: Number of Devices / Tasks limited to 12 ?

Posted: 07 Jul 2018, 21:15
by Jufo
I got a little lost in all this.
What do I have to do to extend from 12 to 15 devices?
Help, please.

Best Regards
Robert

Re: Number of Devices / Tasks limited to 12 ?

Posted: 07 Jul 2018, 21:25
by Jufo
grovkillen wrote: 04 Jul 2018, 20:26 Then you need to study the wiki and try to resolve the issue with self compile. We do not have the time to support self compilers, sorry.
Okay, I read Arduino's instructions:
https://www.letscontrolit.com/wiki/inde ... are_Upload

What next do I need to do to change the range to 15?

Best Regards
Robert

Re: Number of Devices / Tasks limited to 12 ?

Posted: 08 Jul 2018, 02:15
by grovkillen
You need to update the specific ino file. But I will not give you more specific instructions than that since I don't want to have to support you if you're experiencing problem because of corrupted settings. Sorry.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 08 Jul 2018, 09:40
by Jufo
Is it planned to extend the number of tasks?
If it can not be extended normally?

Re: Number of Devices / Tasks limited to 12 ?

Posted: 08 Jul 2018, 10:47
by grovkillen
Yes its planned but not in the near future. We'll have to get the overall system 100% stable and released.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 08 Jul 2018, 11:16
by Jufo
Ok, in that case, use two wemos d1 mini.

Re: Number of Devices / Tasks limited to 12 ?

Posted: 04 Feb 2020, 21:48
by tparvais
Hello

I recompile ESPEasy_mega-20191208.zip with TASKS_MAX=20

This is not working perfectly.

I observed on Wemos D1 mini, after wifi config, and changing IP address to fix and then reboot, the Wemos cycles during boot with the following code below :

any idea ? Cnot qure this is related to Max 20 tasks ? which paramters in Arduino compiler should I use ?

Thanks

`load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
¬U87 : Info :

INIT : Booting version: (custom) (ESP82xx Core 2_6_3, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2)
88 : Info : INIT : Free RAM:36192
89 : Info : INIT : Warm boot #538 Last Task: Background Task - Restart Reason: Exception
91 : Info : FS : Mounting...
140 : Info : FS : Mount successful, used 75802 bytes of 1953282
148 : Info : CRC : No program memory checksum found. Check output of crc2.py
158 : Info : CRC : SecuritySettings CRC ...OK
370 : Info : INIT : Free RAM:33056
371 : Info : INIT : I2C
372 : Info : INIT : SPI not enabled
461 : Info : INFO : Plugins: 46 [Normal] (ESP82xx Core 2_6_3, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2)
565 : Info : WIFI : Set WiFi to STA
599 : Info : WIFI : Start network scan
600 : Info : WIFI : Connecting Orange-70a attempt #0
Exception (9):
epc1=0x40275724 epc2=0x00000000 epc3=0x00000000 excvaddr=0x3fff0f96 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffd40 end: 3fffffc0 offset: 01a0
3ffffee0: 0000000e 3fff4c6c 3fff03cc 3fff0c44
3ffffef0: 3fff0c24 3fff0c04 00000020 4010168b
3fffff00: 3fff0c24 3fff4c6c 00000002 40223a28
3fffff10: 40276030 00000000 40276030 00000000
3fffff20: 40276030 00000000 40276030 00000000
3fffff30: 3fff0c24 3fff0c04 3fff0170 40237c59
3fffff40: 3fff4c00 0027002f 80ff0f8c 40268f4c
3fffff50: 2e310029 3ffe865c 00000002 3fff18dc
3fffff60: 3fff03c9 3ffe865c 3fff0f8c 4024e59e
3fffff70: 3fff4000 003d003f 8027005d 40273ed4
3fffff80: 3fff324c 005b006f 00efeffe feefeffe
3fffff90: feefeffe feefeffe feefeffe 3fff1a0c
3fffffa0: 3fffdad0 00000000 3fff19cc 4026a16c
3fffffb0: feefeffe feefeffe 3ffe86e0 4010194d
<<<stack<<<

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

Re: Number of Devices / Tasks limited to 12 ?

Posted: 08 Feb 2020, 00:29
by tparvais
Problem solved with News release

Re: Number of Devices / Tasks limited to 12 ?

Posted: 19 May 2020, 17:43
by f4gqk
Hello,

I'm looking for a compiled file where

TASKS_MAX is greater than 12?

Do you have a link ?


I can't compile a bin file to put it on my Wemos

Thanks

Sebastien

Re: Number of Devices / Tasks limited to 12 ?

Posted: 19 May 2020, 21:35
by Ath
f4gqk wrote: 19 May 2020, 17:43 I'm looking for a compiled file where

TASKS_MAX is greater than 12?
Currently, only the ESP32 builds support over 12 tasks, 32 to be exact.
Downloads are available from the ESPEasy Github releases page
You will need the Esspressif ESP32 flash tool to upload it to the device, or install the VSCode/platformio tooling to build & upload yourself, as the flash tool in the release package doesn't seem to work for ESP32's