I found the cause. WHITESPACE! Yep, if I change the number of spaces at the end of the line of code, after the ; mqtt.connect(); and upload/flash, I will get a different client_id from Mosquitto.
Other changes to whitespace may have the same result. Further experiments will follow.
I am using the Web IDE. I have my source code in Atom (because I edit everything in Atom) and then copy/paste the code into the Web IDE. I use the 'Send to Espruino' icon to upload/flash the code to the esp8266. I connect to the esp8266 over wifi to upload/flash. I reset() before every upload/flash and save() after.
In WebIDE under Communications I have Reset before Send set, and Set Current Time set.
Minification Settings:
Minification and Module Minification are both set to 'Esprima (offline)'
All check boxes are checked.
Later I may toggle some settings and see if I get different results.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I found the cause. WHITESPACE! Yep, if I change the number of spaces at the end of the line of code, after the ;
mqtt.connect();
and upload/flash, I will get a different client_id from Mosquitto.Other changes to whitespace may have the same result. Further experiments will follow.
I am using the Web IDE. I have my source code in Atom (because I edit everything in Atom) and then copy/paste the code into the Web IDE. I use the 'Send to Espruino' icon to upload/flash the code to the esp8266. I connect to the esp8266 over wifi to upload/flash. I reset() before every upload/flash and save() after.
In WebIDE under Communications I have Reset before Send set, and Set Current Time set.
Minification Settings:
Minification and Module Minification are both set to 'Esprima (offline)'
All check boxes are checked.
Later I may toggle some settings and see if I get different results.