Concept of a flexible but simple smart network
-
made a few steps forward
launched ESP8266 node & bridge and STM32 bridge and TCP/IP router based on linux (orangepi)
bellow is my working example
list of supported platforms:- STM8S/IAR
- STM32F0/Keil - draft
- ATMEL/Atmel studio - draft
- Arduino ESP8266
- Arduino STM32
- Linux/g++
i;m working on 2 libs. first is to handle platform dependant things. second is platform independant smart devices network
regardless platform and regardless communication hardware the framework allows to transfer messages using RX/TX notation with 16 bit global addressing.
Addressing is organized as 4096 segments where 4094 are 15 node segments each and 2 segments are for broadcadstingframework allows to connect potentially absolutelly different communication hardware
currently i'm running:- simple one wire (1 wire signal + 2 wire power) network
- wifi based nodes
- twisted pair connected ethernet devices
bridge between different types of network is organized on TCP/IP application server running currently on linux
etc. potentially allows to connect network segments regardless physicall location, only internet connection is requiredwhy i'm doing this? mostly for fan but also to implement 2 principles:
- application layer to be independant from hardware and transport. message format is universal and is the same regardless platform and communication hardware. Addressing is also universal. Application should not take care about intermediate specific, this is handled by other components
- avoid a central unit. each device can communicate with each device. the only central component is application server. but is is very simple, robust and reliable. failover is supported
My example:

-
for esp8266 i made an universal bridge application
it can be used for both:-
single node, esp8266 is running a final application. on the photo above my thermostats to measure room temperature, report it and to send ON/OFF commands to heaters
-
bridge. can be used to connect other type networks wirelessly to application server. UART is used for this + json translation. currently this is implemented to connect heating controllers located on each floor

main and failover servers can be configured
also each node is configured to handle from one to a few network segments. this allows simple routing from application server back to node
esp8266 is using ArduinoOTA and zero hardcording.
after fresh programming esp creates AP and smartphone can be used to preconfigure a node
any updates are keeping configuration except major updates there stored structure can be affectedapplication server is also support MQTT translation
etc. it looks like a routing between my network and MQTT server
RX/TX adresing are mapped to MQTT topic while message is translated into JSON:

-
-
-
just published my libraries
anyonw is welsome on review and comments https://github.com/axillent :-
list item stavrp C++ multiplafrom suport library, platforms are at different level of support
-
list item smartletsp C++ smart devices network
-
list item swilib and integration of above two libraries with arduino framework
-