You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi @DaveNI,

    This looks great! I'm really impressed by how quickly the pages are being served up too - looks like 200ms from beginning to end to get here!

    It still looks very cold in your house though...

    How are you sending the temperature readings from different rooms to the one webpage? Is it some kind of radio, or are you doing it all over ethernet?

    I actually have to implement something like this really soon too - the usual thermostat in the hallway is doing a useless job of regulating temperature here, and during the day all I care about is keeping the 'office' warm. I've bought some EQ-3 MAX! E-TRVs in the hope that I can control them from Espruino - we'll see what happens!

    If you want to get around CORS, I think you just have to modify the server's headers. For instance:

    var http = require("http");
    http.createServer(function (req, res) {
     res.header("Access-Control-Allow-Origin"­, "*"); // <---- this
      res.writeHead(200);
      res.end("Hello World"); 
    }).listen(80);
    

    I think that should work - although your current solution seems to work fine!

    We should definitely get some kind of UI module put on the Espruino website - seems a shame to have to reimplement things each time...

About

Avatar for Gordon @Gordon started