The design of the Grow By Wire system considers a module to be a single device, hence a single module Id. This is true for, say, the web server, which is contained on an ESP8266 board. It is not true for say, the Sensor Module, or Switch Module, which are contained on a Wemos Mega 2560, which contains an ESP8266 built into the board, but they are two distinct devices, connected by a hardware serial line.
What this means, is, a module may consist of one or two devices, or boards... So far, this has not been an issue, I've simply referred to them as the module (2560) and server (8266). I called the 8266 a server only because it was the access point to the network and database.
Now that I'm doing firmware updates, it IS important to know the board type, since different boards use different methods of uploading firmware.
So, earlier today I ripped apart everything I had done up to this point regarding firmware updates, and started a fresh design, starting with the database.
With utter disregard for the work I was about to create, I butchered my existing tables and redesigned it so modules now contain boards, and those boards can have their own configuration information (currently related to firmware updates, but this can expand) Because modules are at the heart of the entire system, almost every program was broken, all the modules were failing, and constantly rebooting trying to get connected...
Trying not to panic, I just methodically went through each program, made changes where needed, and now I have everything running again.
I also have the new code for the Firmware Updater about half finished, so far it can do local serial updates for regular arduino boards, and serial updates for esp8266 boards. The esp8266 was a challenge, it uses python scripts to do the uploads. I'm happy to say that it's working great, and looks fantastic!
I need to add the code back in to do the serial updates on another computer via the Grow By Wire RPC Server... Also, the code for Over The Air (OTA) network uploads is there, just needs some testing.