Number of Devices / Tasks limited to 12 ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
sm0k0
Normal user
Posts: 15
Joined: 24 Sep 2016, 10:41

Number of Devices / Tasks limited to 12 ?

#1 Post by sm0k0 » 18 Feb 2017, 16:11

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.

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: Number of Devices / Tasks limited to 12 ?

#2 Post by psy0rz » 18 Feb 2017, 17:39

Yes the limit is 12. Try changing TASKS_MAX in ESPEasy.ino and recompile the project.

Edwin
Please support ESPEasy development via Patreon or buy us a coffee.

sm0k0
Normal user
Posts: 15
Joined: 24 Sep 2016, 10:41

Re: Number of Devices / Tasks limited to 12 ?

#3 Post by sm0k0 » 18 Feb 2017, 22:31

Hi Edwin,
:D thanks for your advise. Works perfect !

Thanks & regards
sm0k0

DavidVT
Normal user
Posts: 18
Joined: 26 Nov 2016, 04:27

Re: Number of Devices / Tasks limited to 12 ?

#4 Post by DavidVT » 19 Feb 2017, 14:00

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?

lars@baekmark.dk
Normal user
Posts: 3
Joined: 29 May 2017, 13:53

Re: Number of Devices / Tasks limited to 12 ?

#5 Post by lars@baekmark.dk » 29 May 2017, 14:07

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

Martinus

Re: Number of Devices / Tasks limited to 12 ?

#6 Post by Martinus » 29 May 2017, 20:04

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...

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

Re: Number of Devices / Tasks limited to 12 ?

#7 Post by grovkillen » 15 Jun 2017, 14:19

I put this on the wiki... is it correctly formalized you think?

https://www.letscontrolit.com/wiki/inde ... 2_tasks.3F
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

themanfrommoon
Normal user
Posts: 48
Joined: 23 May 2017, 21:38
Location: Malente / Germany

Re: Number of Devices / Tasks limited to 12 ?

#8 Post by themanfrommoon » 02 Oct 2017, 21:09

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

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

Re: Number of Devices / Tasks limited to 12 ?

#9 Post by grovkillen » 02 Oct 2017, 21:47

What types of devices? Please list the whole 15 devices.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

themanfrommoon
Normal user
Posts: 48
Joined: 23 May 2017, 21:38
Location: Malente / Germany

Re: Number of Devices / Tasks limited to 12 ?

#10 Post by themanfrommoon » 02 Oct 2017, 22:03

15 pieces of DS18b20 1-wire temperature sensors

Domosapiens
Normal user
Posts: 283
Joined: 06 Nov 2016, 13:45

Re: Number of Devices / Tasks limited to 12 ?

#11 Post by Domosapiens » 02 Oct 2017, 23:42

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 4738 times
16 of the 20 sensors on display:
display crop 20170816_233138.png
display crop 20170816_233138.png (306.29 KiB) Viewed 4738 times
Last edited by Domosapiens on 03 Oct 2017, 16:53, edited 2 times in total.
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

themanfrommoon
Normal user
Posts: 48
Joined: 23 May 2017, 21:38
Location: Malente / Germany

Re: Number of Devices / Tasks limited to 12 ?

#12 Post by themanfrommoon » 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

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: Number of Devices / Tasks limited to 12 ?

#13 Post by toffel969 » 03 Oct 2017, 09:09

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.
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

AndrewJ
Normal user
Posts: 229
Joined: 14 Feb 2017, 12:38

Re: Number of Devices / Tasks limited to 12 ?

#14 Post by AndrewJ » 03 Oct 2017, 13:19

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

Domosapiens
Normal user
Posts: 283
Joined: 06 Nov 2016, 13:45

Re: Number of Devices / Tasks limited to 12 ?

#15 Post by Domosapiens » 03 Oct 2017, 16:49

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
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

lukasz@tasz.eu
Normal user
Posts: 1
Joined: 06 Jan 2018, 23:17

Re: Number of Devices / Tasks limited to 12 ?

#16 Post by lukasz@tasz.eu » 06 Jan 2018, 23:24

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

wesley5
Normal user
Posts: 1
Joined: 11 Jan 2018, 05:03

Re: Number of Devices / Tasks limited to 12 ?

#17 Post by wesley5 » 11 Jan 2018, 05:05

Change TASKS_MAX in ESPEasy.ino and recompile
Watch movies online GoMovies

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Number of Devices / Tasks limited to 12 ?

#18 Post by papperone » 11 Jan 2018, 07:13

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)...
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

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

Re: Number of Devices / Tasks limited to 12 ?

#19 Post by grovkillen » 11 Jan 2018, 08:18

wesley5 wrote:
11 Jan 2018, 05:05
Change TASKS_MAX in ESPEasy.ino and recompile
https://www.letscontrolit.com/wiki/inde ... 2_tasks.3F
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Domosapiens
Normal user
Posts: 283
Joined: 06 Nov 2016, 13:45

Re: Number of Devices / Tasks limited to 12 ?

#20 Post by Domosapiens » 11 Jan 2018, 10:45

Change TASKS_MAX in ESPEasy.ino and recompile
See hexemeister's suggestion to prevent data structure overlapping...
https://github.com/letscontrolit/ESPEas ... -344511468
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

Jufo
Normal user
Posts: 35
Joined: 12 Mar 2017, 13:47

Re: Number of Devices / Tasks limited to 12 ?

#21 Post by Jufo » 04 Jul 2018, 11:17

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

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

Re: Number of Devices / Tasks limited to 12 ?

#22 Post by grovkillen » 04 Jul 2018, 13:09

It's in the globals now. Just search using the IDE search function
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Jufo
Normal user
Posts: 35
Joined: 12 Mar 2017, 13:47

Re: Number of Devices / Tasks limited to 12 ?

#23 Post by Jufo » 04 Jul 2018, 13:44

can I ask for more details, I will do it for the first time I need to change from 12 to 15 tasks.

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

Re: Number of Devices / Tasks limited to 12 ?

#24 Post by grovkillen » 04 Jul 2018, 14:12

What IDE do you use! (PlatformIO or Arduino?)
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Jufo
Normal user
Posts: 35
Joined: 12 Mar 2017, 13:47

Re: Number of Devices / Tasks limited to 12 ?

#25 Post by Jufo » 04 Jul 2018, 19:57

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

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

Re: Number of Devices / Tasks limited to 12 ?

#26 Post by grovkillen » 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.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

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

Re: Number of Devices / Tasks limited to 12 ?

#27 Post by TD-er » 04 Jul 2018, 21:46

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)

Jufo
Normal user
Posts: 35
Joined: 12 Mar 2017, 13:47

Re: Number of Devices / Tasks limited to 12 ?

#28 Post by Jufo » 07 Jul 2018, 21:15

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
Last edited by Jufo on 08 Jul 2018, 09:36, edited 2 times in total.

Jufo
Normal user
Posts: 35
Joined: 12 Mar 2017, 13:47

Re: Number of Devices / Tasks limited to 12 ?

#29 Post by Jufo » 07 Jul 2018, 21:25

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

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

Re: Number of Devices / Tasks limited to 12 ?

#30 Post by grovkillen » 08 Jul 2018, 02:15

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.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Jufo
Normal user
Posts: 35
Joined: 12 Mar 2017, 13:47

Re: Number of Devices / Tasks limited to 12 ?

#31 Post by Jufo » 08 Jul 2018, 09:40

Is it planned to extend the number of tasks?
If it can not be extended normally?

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

Re: Number of Devices / Tasks limited to 12 ?

#32 Post by grovkillen » 08 Jul 2018, 10:47

Yes its planned but not in the near future. We'll have to get the overall system 100% stable and released.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Jufo
Normal user
Posts: 35
Joined: 12 Mar 2017, 13:47

Re: Number of Devices / Tasks limited to 12 ?

#33 Post by Jufo » 08 Jul 2018, 11:16

Ok, in that case, use two wemos d1 mini.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest