You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • @DrAzzy it's a publish-subscribe thing... So you connect to an MQTT server, and can push an ID+data, or can choose to subscribe to an ID, in which case you get sent any data that arrives for that ID.

    I guess it's nice in that there are already MQTT servers with debugging, so you can pretty much just focus on doing the embedded side of things.

    My main gripe is it's designed as a lightweight protocol, but there's no support for encryption. Their answer is 'just do it over TLS' but then suddenly there's a massive overhead and you might as well have just been sending human readable JSON :( End result is you end up having a separate MQTT server on a secure network that can then encrypt and store/push the data somewhere else.

    Now if someone did a magic box that bridged secure MQTT over TLS with MQTT on a low-power (one-way) radio then I'd be really interested. But because MQTT is totally insecure I'm not sure how that'd work - when I've asked they just say 'use a secure radio' :/

    @mkarliner yes, thanks for getting involved. So in your system you have a server on your local network that takes in MQTT data from something like Espruino, and that then serves up the UI? Or do you serve up the UI from the internet that then communicates with the local MQTT server?

    edit: Sorry - I see what happens now. Local MQTT server with Websocket support, and then the UI served off of your server. Quite a neat idea.

    To be fair Alex from Evothings did send me a one-sentence e-mail... He said if I sent him a free 'Espurino' board he'd add an example. Problem is, looking at their examples I'm just totally unconvinced their stuff does anything useful. For instance this one.

    So you've got all that code, you have to download an app, program it all up with their custom API, manually enter an IP address and actually you could have just done it all from Espruino without any apps with:

    function onPageRequest(req, res) {
      var a = url.parse(req.url, true);
      res.writeHead(200, {'Content-Type': 'text/html'});
      res.end('<html><body><a href="?led=1">on</a><br/><a href="?led=0">off</a></body></html>');
      if ("led" in a.query) digitalWrite(LED1, a.query["led"]);

Avatar for Gordon @Gordon started