Update: 2020-05-24

Esp8266 BH1750 als Arduino Tab.

BH1750.ino

// ****************************************************************
// Sketch Esp8266 BH1750 Modular(Tab)
// created: Jens Fleischer, 2018-09-07
// last mod: Jens Fleischer, 2018-09-10
// For more information visit: https://fipsok.de
// ****************************************************************
// Hardware: Esp8266, BH1750, 2 x 4k7 Ohm Widerstand
// VCC an 3V3
// GND an GND
// SCL an D1 = GPIO5
// SDA an D2 = GPIO4
// ADD an (nicht verbunden oder GND I2C-Adresse 0x23) - (VCC I2C-Adresse 0x5C)
// 4k7 Ohm Widerstand von VCC auf D1
// 4k7 Ohm Widerstand von VCC auf D2
// Getestet auf: Nodemcu, Wemos D1 Mini Pro
/******************************************************************
  Copyright (c) 2018 Jens Fleischer. All rights reserved.

  This file is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.
  This file is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.
*******************************************************************/
// Diese Version von BH1750 sollte als Tab eingebunden werden.
// #include <ESP8266WebServer.h> muss im Haupttab aufgerufen werden
// Die Funktionalität des ESP8266 Webservers ist erforderlich.
// Die Funktion "bh1750();" muss im Setup aufgerufen werden.
/**************************************************************************************/

#include <Wire.h>
#include <BH1750.h>     // https://github.com/claws/BH1750

BH1750 lux(0x23);    

void bh1750() {
  Wire.begin();
  if (!lux.begin(BH1750::ONE_TIME_HIGH_RES_MODE)) {       // einmalige Messung Sensor geht anschliesend in den Abschaltmodus.
    Serial.println("Keinen BH1750 Sensor gefunden!");     // "BH1750::CONTINUOUS_HIGH_RES_MODE" für dauerhafte Messung
  }
  server.on("/bh1750", []() {
    server.send(200, "application/json", "\"" + (String)lux.readLightLevel() + "\"");
  });
}

Die Webseite zum Esp8266 BH1750.

bh1750.html

<!DOCTYPE HTML> <!-- For more information visit: https://fipsok.de -->
<html lang="de">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="style.css">
    <title>BH1750 Beleuchtungsstärke</title>
    <script>
      function renew() {
        fetch('/bh1750').then(function (response) {
           return response.json();
        }).then(function (text) {
           var elem = document.querySelector('#wert');
           text != '54612' ? elem.innerHTML = text + ' lx' : elem.innerHTML = 'Fehler';
        });
      }
      document.addEventListener('DOMContentLoaded', renew);
      setInterval(renew, 1000);
    </script>
    <style>
      body {
        padding: 10px;
        font-size: 3em;
      }
      main {
		display: flex;
        flex-direction: column;
        align-items: center;		
        background-color: black;
        width: 280px;
        height: 100px;
        padding: 0.2em;		
        border: .15em solid #aeaeab;
        box-shadow: 5px 10px 5px rgba(0, 0, 0, 0.7);
        border-radius: .2em;
      }
      span {
        color: #02fc07;
        position: relative;
        top: 0.5em;
        left: .3em;
        letter-spacing: .1em;
        font-weight: bold
      }
    </style>
  </head>
  <body>
    <main>
      <span id='wert'></span>
    </main>
  </body>
</html>