You are reading a single comment by @sammachin and its replies. Click here to read the full conversation.
  • Tried with that build on the pixl and just updating the url to https but it still seems to be making the request over http, this is my code, do I need to do something else?

    digitalWrite(D12,1); // enable ESP8266
    Serial1.setup(115200, { rx: D2, tx : D3 });
    var wifi = require("ESP8266WiFi_0v25").connect(Seri­al1, function(err) {
      if (err) throw err;
      console.log("Connecting to WiFi");
      wifi.connect(SSID, PASSWORD, function(err) {
        if (err) throw err;
        console.log("WiFi Connected");
        getCharge();
      });
    });
    
    
    
    
    function getCharge(){
      var http = require("http");
      http.get("https://192.168.1.127/api/syst­em_status/soe", function(res) {
        var contents = "";
        res.on('data', function(data) { contents += data; });
        res.on('close', function() {
          var d = JSON.parse(contents);
          var charge = Math.round(d.percentage);
          g.clear();
          // Use the small font for a title
          g.setFontBitmap();
          g.drawString("Charge:");
          // Use a large font for the value itself
          g.setFontVector(40);
          g.drawString(`${charge}%`, (g.getWidth()-g.stringWidth(`${charge}%`­))/2,10);
          // Update the screen
          g.flip();
        });
      });
    }
    
About

Avatar for sammachin @sammachin started