diff --git a/tests/Test_config.h b/tests/Test_config.h index 7eb874d..4167399 100644 --- a/tests/Test_config.h +++ b/tests/Test_config.h @@ -33,19 +33,20 @@ /*-------------DEFINE YOUR NETWORK PARAMETERS BELOW----------------*/ //MQTT Parameters definition //#define mqtt_server_name "www.mqtt_broker.com" // instead of defining the server by its IP you can define it by its name, uncomment this line and set the correct MQTT server host name -#define mqtt_user "your_username" // not compulsory only if your broker needs authentication -#define mqtt_pass "your_password" // not compulsory only if your broker needs authentication -#define Gateway_Name "OpenMQTTGateway" +char mqtt_user[20] = "your_username"; // not compulsory only if your broker needs authentication +char mqtt_pass[20] = "your_password"; // not compulsory only if your broker needs authentication +char mqtt_server[40] = "192.168.1.17"; +char mqtt_port[6] = "1883"; +#define Gateway_Name "/OpenMQTTGateway" +#define Base_Topic "home" #define WifiManager_password "your_password" -#define version_Topic "home/" Gateway_Name "/version" -#define will_Topic "home/" Gateway_Name "/LWT" +#define version_Topic Base_Topic Gateway_Name "/version" +#define will_Topic Base_Topic Gateway_Name "/LWT" #define will_QoS 0 #define will_Retain true #define will_Message "Offline" #define Gateway_AnnouncementMsg "Online" #define MDNS_SD //comment if you don't want to use mdns for discovering automatically your ip server -char mqtt_server[40] = "192.168.1.17"; -char mqtt_port[6] = "1883"; //set minimu quality of signal so it ignores AP's under that quality #define MinimumWifiSignalQuality 8 @@ -162,7 +163,7 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress /*-------------------CHANGING THEM IS NOT COMPULSORY-----------------------*/ /*--------------MQTT general topics-----------------*/ // global MQTT subject listened by the gateway to execute commands (send RF, IR or others) -#define subjectMQTTtoX "home/commands/#" +#define subjectMQTTtoX Base_Topic Gateway_Name "/commands/#" #define subjectMultiGTWKey "toMQTT" //variables to avoid duplicates