How to arrange code deployment

I gave depression and trouble making decisions
.. so help...

I want to build a modest HA and security system... Things like thermostat, door locks, alarms, IR blasters, ac power monitoring... Etc .. I can't build fast so I need to add piece by piece.

I had it going for a while last year... System were "nodes" and Nexus. Esp32s

Two methods

A nodes only have few basic functions common to EVERY node, Nexus contains logic and data for thier operation.

B ad hoc, Nexus still coordinator but doesn't make all decisions. Nodes are programmed unique.

It would depend on the nature of, and number of the nodes. I think, though, I would have the node transmit its identity, followed by the type of data, and the data itself. The Nexus, which I guess would be your master, would then take that information and decide on how to react to it. It would be easy then if later you perhaps wanted to use ir tracking to illuminate pathways/whatever, which could be difficult if the nodes had to do local decoding and talk to each other. In the old computer terms, a mainframe and dumb terminals, easy to add extra terminals.

I don't see that A and B are the only options.

If you design a standard communication system that can be extended then I see no reason why the nodes cannot be individually programmed yet only a small addition is needed to the code on the Master when a new node is deployed.

Indeed if you are sufficiently far sighted (I would not be) you could design all the options into the Master up front.

By standard system I mean a message that contains data in specific locations - for example the first item is the node ID, the second item defines the number of data items, then follows a series of pairs of items with a data indentifier followed by a data value.

...R