I did a command prompt to python. it working with v2.7
]]>Happy hacking!
]]>I went ahead and dumped an empty sketch to the board, then tried again and it worked without issue!
]]>netInfo homeNet = { .mqttHost = "192.168.1.174", //can be blank if not using MQTT
...
Still prints out "QTT Server: YOUR MQTT-IP."
When I went back to the web configure page and set the MQTT IP in there it properly updated and now works great!
Thanks for the help, you rock!
]]> myESP.addSubscription("/deskLEDs");
myESP.setMQTTCallback(MQTTcallback);
myESP.begin();
I was following your tutorial "New ESP Mini-Project (Web Config!!!) & Announcement" and it is really awesome. However, I am having an issue when I try to use your example sketch with MQTT.
I added two lines to the loadConfig function and added MQTTcallback function just to print out for debugging. And of course, configured the MQTT IP address and wifi settings. I am not getting any errors, but the MQTTcallback function never runs.
When I use your example OTA sketch and just set up the basic config and add some print lines to the MQTTcallback function then everything works great. So I know my MQTT server is good.
What am I doing wrong to get MQTT working with the example provided in the video?
void loadConfig(){
//check for a good config file and start ESPHelper with the file stored on the ESP
if(ESPHelperFS::begin()){
Serial.println("Filesystem loaded - Loading Config");
if(ESPHelperFS::validateConfig("/netConfig.json") == GOOD_CONFIG){
Serial.println("Config loaded");
delay(10);
myESP.addSubscription("/deskLEDs"); //Code I added
myESP.setMQTTCallback(MQTTcallback); //Code I added
myESP.begin("/netConfig.json");
}
void MQTTcallback(char* topic, uint8_t* payload, unsigned int length) {
//put mqtt callback code here
//put mqtt callback code here
char newPayload[50];
memcpy(newPayload, payload, length);
newPayload[length] = '\0';
Serial.print("MQTT payload: ");
Serial.println(newPayload);
}
Thanks so much for your help and creating this forum!!
]]>