MQTT topics config & CallBack refactoring

This commit is contained in:
2019-03-04 04:49:35 +03:00
parent 23e493097e
commit 141bb9c657
13 changed files with 258 additions and 78 deletions

View File

@@ -65,6 +65,10 @@
#define CONFIG_SERVER QUOTE(MY_CONFIG_SERVER)
#endif
#ifndef HOMETOPIC
#define HOMETOPIC "/myhome"
#endif
/*
#ifndef OUTTOPIC
#define OUTTOPIC "/myhome/s_out/"
#endif
@@ -76,6 +80,19 @@
#ifndef INTOPIC
#define INTOPIC "/myhome/in/"
#endif
*/
#ifndef OUTTOPIC
#define OUTTOPIC "s_out"
#endif
#ifndef CMDTOPIC
#define CMDTOPIC "command"
#endif
#ifndef INTOPIC
#define INTOPIC "in"
#endif
#define MQTT_SUBJECT_LENGTH 20
#define MQTT_TOPIC_LENGTH 20