22#elif defined(BOARD_HAS_GSM )
33#elif defined(BOARD_HAS_LORA )
44#elif defined(BOARD_HAS_NB )
5+ #elif defined(BOARD_HAS_ETHERNET )
56#else
67 #error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
78#endif
@@ -26,7 +27,7 @@ void initProperties() {
2627 ArduinoCloud .setBoardId (BOARD_ID );
2728 ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
2829#endif
29- #if defined(BOARD_HAS_WIFI ) || defined(BOARD_HAS_GSM ) || defined(BOARD_HAS_NB )
30+ #if defined(BOARD_HAS_WIFI ) || defined(BOARD_HAS_GSM ) || defined(BOARD_HAS_NB ) || defined( BOARD_HAS_ETHERNET )
3031 ArduinoCloud .addProperty (switchButton , WRITE , ON_CHANGE );
3132 ArduinoCloud .addProperty (oneShot , READWRITE , ON_CHANGE );
3233 ArduinoCloud .addProperty (minute , READWRITE , ON_CHANGE );
@@ -48,4 +49,9 @@ void initProperties() {
4849 LoRaConnectionHandler ArduinoIoTPreferredConnection (SECRET_APP_EUI , SECRET_APP_KEY , _lora_band ::EU868 , NULL , _lora_class ::CLASS_A );
4950#elif defined(BOARD_HAS_NB )
5051 NBConnectionHandler ArduinoIoTPreferredConnection (SECRET_PIN , SECRET_APN , SECRET_LOGIN , SECRET_PASS );
52+ #elif defined(BOARD_HAS_ETHERNET )
53+ /* DHCP mode */
54+ //EthernetConnectionHandler ArduinoIoTPreferredConnection;
55+ /* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
56+ EthernetConnectionHandler ArduinoIoTPreferredConnection (SECRET_OPTIONAL_IP , SECRET_OPTIONAL_DNS , SECRET_OPTIONAL_GATEWAY , SECRET_OPTIONAL_NETMASK );
5157#endif
0 commit comments