more than 12 devices

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
bruno iemanon
Normal user
Posts: 18
Joined: 07 Oct 2019, 20:04

more than 12 devices

#1 Post by bruno iemanon » 27 Oct 2019, 18:39

I'm using 4 pcf8574 expanders to create 32 "switch input" devices.
But in the device-tab in espeasy there are only 12 devices to configure.

Is there a way to increase the amount of devices?

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

Re: more than 12 devices

#2 Post by TD-er » 27 Oct 2019, 20:01

You can try defines like these:
https://github.com/letscontrolit/ESPEas ... o.ini#L484

Look for USE_NON_STANDARD_24_TASKS in the code.

Going over 24 tasks will probably lead to a lot of other issues, which have not been tested.

The ESP32 has 32 tasks defined.

ps915
New user
Posts: 2
Joined: 27 Oct 2019, 20:31

Re: more than 12 devices

#3 Post by ps915 » 27 Oct 2019, 20:36

I am also trying to get more than 12 Devices working.

I set up Arduino IDE 1.6.12 and imported all libs. Compiled it for Wemods D1 Mini and compiling was sucessfull with the standard code an 12 Devices.
My question is: How to setup Arduino IDE with those buildflags to compile it for the 24 Devices!

Thanks!
Phil

ps915
New user
Posts: 2
Joined: 27 Oct 2019, 20:31

Re: more than 12 devices

#4 Post by ps915 » 29 Oct 2019, 12:38

I figured it out. Short tutorial here:

1. Set up ArduinoIDE like this: https://www.letscontrolit.com/wiki/inde ... are_Upload
install ESP8266 2.5.2 or higher

2. create a new blank file called platform.local.txt in the folder:
arduino-1.6.12P230 -> Portable -> packages -> esp8266 -> hardware -> esp8266 -> 2.5.2
added following lines to platform.local.txt

Code: Select all

compiler.c.extra_flags=-DUSE_NON_STANDARD_24_TASKS -DTASKS_MAX=24
compiler.c.elf.extra_flags=-DUSE_NON_STANDARD_24_TASKS -DTASKS_MAX=24
compiler.S.extra_flags=-DUSE_NON_STANDARD_24_TASKS -DTASKS_MAX=24
compiler.cpp.extra_flags=-DUSE_NON_STANDARD_24_TASKS -DTASKS_MAX=24
compiler.ar.extra_flags=
compiler.objcopy.eep.extra_flags=
compiler.elf2hex.extra_flags=
3. recompiled .bin file via ArduinoIDE: Sketch -> Export compiled Binary

4. copy the compiled Binary file (.bin) in the same folder where FlashESP8266.exe is located

5. Do a Factory Reset of the ESPeasy Node, if you have used it before (Tools -> Factory Reset -> Factory Reset)

6. Use FlashESP8266.exe to upload the Firmware

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: more than 12 devices

#5 Post by mrwee » 29 Oct 2019, 16:02

Brilliant! Tried it, and I got 24 x tasks. Have been looking for this change in ESPEasy for a long time.

I got one compile warning: "WARNING: library LiquidCrystal_I2C claims to run on avr architecture(s) and may be incompatible with your current board which runs on esp8266 architecture(s)", but it still compiled.

My flash settings needed to be (Wemos D1 mini pro - the old version):
2019-10-29_16-01-04.png
2019-10-29_16-01-04.png (26.37 KiB) Viewed 10751 times

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: more than 12 devices

#6 Post by mrwee » 29 Oct 2019, 18:08

Spoke too soon. Doesn't seem like rules are working.

Code: Select all

On MQTT#Connected do
 Publish %sysname%/IP,%ip%
 Publish IP/%sysname%,%ip%
 timerSet,1,300
endon

On Rules#Timer=1 do
 Publish %sysname%/IP,%ip%
 Publish %sysname%/Uptime,%c_m2dhm%(%uptime%)
 Publish IP/%sysname%,%ip%
 Publish Uptime/%sysname%,%c_m2dhm%(%uptime%)
 timerSet,1,300
endon
It's working on an old mega-20180801. I'm unsure if it's the new version (ESPEasy_mega-20191028 / 20104 - Mega / ESP82xx Core 2_5_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.1.2) or something else I've done (wrong?)

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: more than 12 devices

#7 Post by mrwee » 29 Oct 2019, 18:12

Just enabled debug log, it does fire the rule but nothing actually get's published. Will dig deeper

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

Re: more than 12 devices

#8 Post by TD-er » 29 Oct 2019, 20:38

Just to be sure it is not your bug, or maybe one of mine.
You could test with the build (or sources) of 20190928.
I changed a lot last month regarding the rules and there have been some reports of rules misbehaving.

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: more than 12 devices

#9 Post by mrwee » 29 Oct 2019, 22:04

TD-er wrote: 29 Oct 2019, 20:38 Just to be sure it is not your bug, or maybe one of mine.
You could test with the build (or sources) of 20190928.
I changed a lot last month regarding the rules and there have been some reports of rules misbehaving.
That's the version I'm currently running on, with the 24 task modification. Serial log tells me:

Code: Select all

5293 : MQTT : Intentional reconnect
5332 : MQTT : Connected to broker with client ID: esptest_25
5335 : Subscribed to: esptest/#
5338 : EVENT: MQTT#Connected
5382 : ACT  : Publish esptest/IP,192.168.1.156
5394 : Command: publish
5403 : ACT  : Publish IP/esptest,192.168.1.156
5414 : Command: publish
5419 : ACT  : timerSet,1,300
5427 : Command: timerset
but all I get on my mosquitto broker is the LWT message of "Connected" (Controller set to HomeAssistant / openHAB). Serial log is set to "Debug dev" but it doesn't log that much.

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

Re: more than 12 devices

#10 Post by TD-er » 29 Oct 2019, 22:10

mrwee wrote: 29 Oct 2019, 22:04 [...]

That's the version I'm currently running on, with the 24 task modification. Serial log tells me:
[...]
but all I get on my mosquitto broker is the LWT message of "Connected" (Controller set to HomeAssistant / openHAB). Serial log is set to "Debug dev" but it doesn't log that much.
Are you sure it is the sources from 20190928? (a month ago)
If you fetch the code, you will get the code from 20191028 (yesterday)

mrwee
Normal user
Posts: 225
Joined: 31 Aug 2016, 12:52

Re: more than 12 devices

#11 Post by mrwee » 29 Oct 2019, 22:19

:oops: No, sorry. Misread your post. Will check with 20190928 not 20191028 :D.
It won't be until sometime this weekend, as I'm traveling the next couple of days.

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests