• Try minify yourself.. at least some parts.. first place i would start is console.log. You have quite a lot of them and multiple times in a row.

    In your setupId function for example:

      console.log("NAME: " + gFriendlyName);
      console.log("SERIAL: " + gSerialNumber);
      console.log("UUID: " + gUuid);
    

    Try to combine this to a single console.log

      console.log("NAME: " + gFriendlyName, "SERIAL: " + gSerialNumber, "UUID: " + gUuid);
    

    I am not aware of a minifier that does this for you without breaking everything.
    Using arrow functions could scrape another few bytes. I could take a stab at minifying this
    later today.

    Edit

    Offloading fixed strings etc. to a eeprom could help too.

  • You will not believe me.... I tried this way and the code got LONGER, surprisingly :)
    Anyway I will not come down 2500 chars with that :(

    p.s. the thing is doing on-off works with Alexa, but after a while get nuts and give numbers due to memory leaks.

About

Avatar for Vasily @Vasily started