Closed klew closed 5 months ago
Supla SRPC layer will now build "network client" instance based on used Supla::Network type (class for handling Wi-Fi, or Ethernet, etc.) Client build is done by "main" network interface. Currently multiple network interfaces can be added. So "main" will be first enabled network interface. Network interfaces are checked based on order of class instance creation. So in order to build client based on custom network interface, you'll have to override following method:
virtual Supla::Client *createClient();
It should return pointer to Supla::Client instance implemented on top of required transport client.
Completed in 4f0adf4
Currently network client is generated based on selected HW type (for Arduino Mega, ESP8266/ESP32), however some network interfaces (like W5500) connected to ESP32 is using standard Ethernet lib in Arduino, which requires EthernetClient classes and not WiFiClient.
Network interface should provide interface to obtain proper Network::Client implementation.