diff --git a/waterishos-gen2-mesh/ESP8266MeshHelloWorld.ino b/waterishos-gen2-mesh/ESP8266MeshHelloWorld.ino index 4c71170..a77a141 100644 --- a/waterishos-gen2-mesh/ESP8266MeshHelloWorld.ino +++ b/waterishos-gen2-mesh/ESP8266MeshHelloWorld.ino @@ -10,7 +10,7 @@ #define FIRMWARE_ID 0x1337 #define FIRMWARE_VER "0.1" -wifi_conn networks[] = NETWORK_LIST; +wifi_conn networks[] = {WIFI_CONN("ssid 1", NETWORK_PASSWORD, NULL, 0),WIFI_CONN("ssid 2", NETWORK_PASSWORD, NULL, 0),NULL,}; const char* mesh_password = MESH_PASSWORD; const char* mqtt_server = MQTT_SERVER; const int mqtt_port = MQTT_PORT; @@ -37,16 +37,7 @@ int cnt = 0; // Note: All of the '.set' options below are optional. The default values can be // found in ESP8266MQTTMeshBuilder.h -ESP8266MQTTMesh mesh = ESP8266MQTTMesh::Builder(networks, mqtt_server, mqtt_port) - .setVersion(FIRMWARE_VER, FIRMWARE_ID) - .setMeshPassword(mesh_password) -#if ASYNC_TCP_SSL_ENABLED - .setMqttSSL(mqtt_secure, mqtt_fingerprint) -#if MESH_SECURE - .setMeshSSL(ssl_cert, ssl_cert_len, ssl_key, ssl_key_len, ssl_fingerprint) -#endif //MESH_SECURE -#endif //ASYNC_TCP_SSL_ENABLED - .build(); +ESP8266MQTTMesh mesh = ESP8266MQTTMesh::Builder(networks, mqtt_server, mqtt_port).setVersion(FIRMWARE_VER, FIRMWARE_ID).setMeshPassword(mesh_password).build(); void callback(const char *topic, const char *msg); diff --git a/waterishos-gen2-mesh/settings.h b/waterishos-gen2-mesh/settings.h new file mode 100644 index 0000000..e69de29 diff --git a/waterishos-gen2-mesh/settings.h.example b/waterishos-gen2-mesh/settings.h.example new file mode 100644 index 0000000..e69de29