“In ver.217 the 17 program space is 2433 bytes what shows one program needs 143 bytes. Is there a program structure layout?”
– As Shawn said, the program data structure is in program.h. Also, you can take a look at defines.h which shows the EEPROM layout — because most controller settings and programs are stored in EEPROM, it shows you where the program data exists. I believe the very first two bytes of the program data region are a program version identifier, and a program counter (i.e. how many valid programs there are). From the third byte, it stores each program in a ProgramStruct defined in program.h. In defines.h, MAX_PROGRAMDATA indicates the entire program data size. That minus 2, divided by PROGRAMSTRUCT_SIZE, gives the maximum number of programs allowed.
“To handle the flow and current alerts we need minimum of 112 bytes plus some OPTION bytes as I see now.
The only option is to decrease the number of programs by one or two to make the space.”
– Yes, you can reduce the number of programs to achieve this. The easiest way is to go to defines.h, reduce MAX_PROGRAMDATA. The rest of it (like MAX_NUMBER_PROGRAMS in program.h) is automatically calculated.
“There is a 24aa.. I2C eeprom in the OS design. I haven’t found any code what using this memory.
What is the original purpose?”
– This is a Microchip 24aa02e48 eeprom that comes with a hardware programed Mac address. Another use of this is to store the hardware type (i.e. AC vs. DC) so that the firmware can tell which version it is. The AC vs. DC signature is software programed (i.e. at the time of flashing the initial firmware, this signature is programed into the eeprom). Other than that, the rest of the eeprom space is available to store custom data.
“From ver.216 minor4(?) SD is a must. As I see this is needed for additional storage space. Do you have some plan for increase the internal memory space?”
– I think SD is a must from firmware 2.1.7 on OS hardware version 2.3. The reason is that some of the advanced features, such as IFTTT, remote and RF stations, etc. require storing data onto the SD card. Technically it’s not mandatory (for example, this is not enforced on OS hardware version 2.0 to 2.2, because they don’t support some of the advanced features). So if you don’t need them you don’t have to enforce SD card (and as I said, the firmware does not enforce it for OS 2.0 to 2.2)