Ok, glad you got that sorted - do you know what exactly the issue was? Missing client_id? Are you using up to date firmware, as it should really have reported a different error.
For your new error, could you just try removing console.log("topic: "+pub.topic); - it could be that pub doesn't have a field in it called topic?
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.
Ok, glad you got that sorted - do you know what exactly the issue was? Missing
client_id
? Are you using up to date firmware, as it should really have reported a different error.For your new error, could you just try removing
console.log("topic: "+pub.topic);
- it could be thatpub
doesn't have a field in it called topic?