-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
MAX_RULE_VARS and (maybe) MAX_RULE_MEMS limits. #4933
Comments
Ok got it. It was set to 8 for both Vars and Mems as Adrian said because of the uint8_t. Mems will stay at 5 as they are stored in flash using 10 bytes each as a number is stored as text to ease string compares. I'll change Vars to max 16 using uint16_t. |
Fix allowable MAX_RULE_VARS to 16 (#4933)
Great! Thanks Theo! |
MAX_RULE_MEMS has always been 5 and that's what has been reserved in flash. It was never supposed to change. |
Thanks again for quick answer! |
You need to move the rest of the config in settings.h to modify the memory map. MEMs is not just a uint16_t, it is also every MEM. 16 MEMs is A LOT of memory on EEPROM. So, if you do that all your config will be scrambled. Not backwards compatible. |
Forgetting about backward compatibility will it work or there is no chance for that? I'm asking for a case when I have a "green field" - new device (or erased with Thanks again for answering my not related questions (16 VARS is good enough for me)! My feature/change request was fulfilled in couple of hours - this is amazing! PS. |
Making the requested changes will enlarge the settings struc by 110 bytes and move the rules area down approaching the undocumented eeprom save area but still within the available flash page. So it could work. |
Thanks again Theo! |
Will get there eventually - just not a priority at the moment... also first week back at office so things are going to be hectic for the next few weeks... to make matters worse work is also about dealing with PR's and PoC's so I also need to find time in between as to differentiate between work and hobby :) |
Fix allowable MAX_RULE_VARS to 16 (arendst#4933)
Change max number of rule ``Mem``s from 5 to 16 (#4933)
Change max number of rule ``Var``s from 5 to 16 (#4933)
Have you look for this feature in other issues and in the wiki?
yes.
Is your feature request related to a problem? Please describe.
Starting from version 6.1.1.9 (this commit) there was a possibility to define own
MAX_RULE_VARS
andMAX_RULE_TIMERS
inuser_config_override.h
. So one could (reasonably, having in mind that it consumes memory) define his own values for those parameters. Starting from one of the latest dev release (this commit) there is new rules trigger introduced and a limit to have maximum 8 MEMS or VARS.Describe the solution you'd like
I would like to have the ability to define 16 VARS without compiler errors.
I had a conversation with Adrian on Discord, and he explained me that changing the limit for VARS could be rather simple, and it will consume another byte of memory (
uint16_t
instead ofuint8_t
forvars_event
). He also, very clearly, explained me that changingMAX_RULE_MEMS
is not so simple (because there have to be reserved another byte inEEPROM
, which can leads to compatibility problems during update) and only @arendst can make that decision and decide how to do it - so I'm asking Theo to consider that also.Describe alternatives you've considered
I don't have one.
Additional context
Significant majority of Tasmota users, just using precompiled bins. Those who compile the binaries on their own, realize that some changes can lead to larger memory consumption (changing number of vars, rule timers, etc.)... at least I want to believe in that ;)
(Please, remember to close the issue when the problem has been addressed)
I will.
The text was updated successfully, but these errors were encountered: