ESP and DHT22 LOW MEMORY

Posted on
  • Hi. I'm use esp32-wroom-32 and DHT22 sensor with DHT22.js script.

    I call the read function every 5 seconds and every time I get less and less memory, the log below as it was at the beginning of work was 1917, and after a while it was already 1887 and so on until there is an error.

    What my problem?

    My code:

      setInterval(function() {
        this.dht.read((response) => {
    
          console.log(response)
          console.log(process.memory())
          console.log('_____')
    
        });
      }, 5000);
        
    

    My logs:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    {
      "raw": "100000010001011010000000011100001000100­001",
      "rh": 111.4, "temp": 45 }
    { "free": 1917, "usage": 383, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.989 }
    _____
    {
      "raw": "010000001000101100000000001110000100001­111",
      "rh": 55.6, "temp": 22.5 }
    { "free": 1929, "usage": 371, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.954 }
    _____
    {
      "raw": "010000001000110010000000001110000100010­101",
      "rh": 56.2, "temp": 22.5 }
    { "free": 1926, "usage": 374, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.96 }
    _____
    {
      "raw": "010000001000110100000000001110000100010­111",
      "rh": 56.4, "temp": 22.5 }
    { "free": 1922, "usage": 378, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.956 }
    _____
    {
      "raw": "010000001000110001000000001110001000010­101",
      "rh": 56.1, "temp": 22.6 }
    { "free": 1919, "usage": 381, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.965 }
    _____
    {
      "raw": "010000001000101000000000001110001000001­100",
      "rh": 55.2, "temp": 22.6 }
    { "free": 1915, "usage": 385, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.958 }
    _____
    {
      "raw": "010000001000101000000000001110001000001­100",
      "rh": 55.2, "temp": 22.6 }
    { "free": 1912, "usage": 388, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.96 }
    _____
    {
      "raw": "010000001000110001000000001110001000010­101",
      "rh": 56.1, "temp": 22.6 }
    { "free": 1908, "usage": 392, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.964 }
    _____
    {
      "raw": "010000001001010011000000001110001000110­111",
      "rh": 59.5, "temp": 22.6 }
    { "free": 1905, "usage": 395, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.961 }
    _____
    {
      "raw": "010000001001010111000000001110001000111­011",
      "rh": 59.9, "temp": 22.6 }
    { "free": 1901, "usage": 399, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.967 }
    _____
    {
      "raw": "010000001001010011000000001110001000110­111",
      "rh": 59.5, "temp": 22.6 }
    { "free": 1898, "usage": 402, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.963 }
    _____
    {
      "raw": "010000001001001001000000001110001000101­101",
      "rh": 58.5, "temp": 22.6 }
    { "free": 1894, "usage": 406, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.969 }
    _____
    {
      "raw": "010000001000111011000000001110001000011­111",
      "rh": 57.1, "temp": 22.6 }
    { "free": 1887, "usage": 413, "total": 2300, "history": 179,
      "gc": 0, "gctime": 1.966 }
    _____
    
  • As always, check you wiring. Loose wire can lead to communication errors. And the DHT22 uses a single wire bit-banged protocol, that's not as robust as for example I2C or SPI.

    The DHT22 module does retry up to 10 times by default if can't communicate with the DHT22 or there is a CRC error. With 500ms delay between each retry, worst case that's over your 5000ms interval.
    If you have a logic analyzer (even a <10USD one), you can check the communication for retries.
    Or if not, you can log the time between the start and end:

      setInterval(function() {
        var t0 = new Date
        this.dht.read((response) => {
          var t1 = new Date()
          console.log(response)
          console.log(process.memory())
          console.log('start:', t0, 'end:', t1, 'elapsed:', t1-t0)
          console.log('_____')
        });
      }, 5000);
    

    And if my theory is right, you will see some corelation in over 5 second communication and memory leak. Then you can either increase the interval to ~10 seconds, or you can pass in a lower retry count.

  • I not have analyser...

    Log:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >WARNING: Scan stop failed
    WARNING: set rssi scan not implemeted yet
     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    {
      "raw": "100000010010101010000000011001100001000­111",
      "rh": 119.4, "temp": 40.8 }
    { "free": 1872, "usage": 428, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.99 }
    start: Date: Thu Jan 1 1970 00:00:36 GMT+0000 end: Date: Thu Jan 1 1970 00:00:41 GMT+0000 elapsed: 41829.603
    _____
    {
      "raw": "010000001001010110000000001100110100100­101",
      "rh": 59.8, "temp": 20.5 }
    { "free": 1884, "usage": 416, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.956 }
    start: Date: Thu Jan 1 1970 00:00:41 GMT+0000 end: Date: Thu Jan 1 1970 00:00:42 GMT+0000 elapsed: 42525.681
    _____
    {
      "raw": "010000001001010110000000001100110100100­101",
      "rh": 59.8, "temp": 20.5 }
    { "free": 1881, "usage": 419, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.957 }
    start: Date: Thu Jan 1 1970 00:00:46 GMT+0000 end: Date: Thu Jan 1 1970 00:00:46 GMT+0000 elapsed: 46926.537
    _____
    {
      "raw": "010000001001010011000000001100110100100­010",
      "rh": 59.5, "temp": 20.5 }
    { "free": 1877, "usage": 423, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.958 }
    start: Date: Thu Jan 1 1970 00:00:51 GMT+0000 end: Date: Thu Jan 1 1970 00:00:51 GMT+0000 elapsed: 51926.504
    _____
    {
      "raw": "010000001001010011000000001100110100100­010",
      "rh": 59.5, "temp": 20.5 }
    { "free": 1874, "usage": 426, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.958 }
    start: Date: Thu Jan 1 1970 00:00:56 GMT+0000 end: Date: Thu Jan 1 1970 00:00:56 GMT+0000 elapsed: 56926.781
    _____
    {
      "raw": "010000001001001101000000001100110100011­100",
      "rh": 58.9, "temp": 20.5 }
    { "free": 1867, "usage": 433, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.961 }
    start: Date: Thu Jan 1 1970 00:01:01 GMT+0000 end: Date: Thu Jan 1 1970 00:01:02 GMT+0000 elapsed: 62636.94
    _____
    {
      "raw": "010000001001011000000000001100110100100­111",
      "rh": 60, "temp": 20.5 }
    { "free": 1863, "usage": 437, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.961 }
    start: Date: Thu Jan 1 1970 00:01:06 GMT+0000 end: Date: Thu Jan 1 1970 00:01:06 GMT+0000 elapsed: 66927.156
    _____
    {
      "raw": "010000001001010010000000001100110100100­001",
      "rh": 59.4, "temp": 20.5 }
    { "free": 1860, "usage": 440, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.962 }
    start: Date: Thu Jan 1 1970 00:01:11 GMT+0000 end: Date: Thu Jan 1 1970 00:01:11 GMT+0000 elapsed: 71928.198
    _____
    {
      "raw": "010000001001010100000000001100110100100­011",
      "rh": 59.6, "temp": 20.5 }
    { "free": 1856, "usage": 444, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.963 }
    start: Date: Thu Jan 1 1970 00:01:16 GMT+0000 end: Date: Thu Jan 1 1970 00:01:16 GMT+0000 elapsed: 76928.198
    _____
    {
      "raw": "010000001001010010000000001100110100100­001",
      "rh": 59.4, "temp": 20.5 }
    { "free": 1853, "usage": 447, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.964 }
    start: Date: Thu Jan 1 1970 00:01:21 GMT+0000 end: Date: Thu Jan 1 1970 00:01:21 GMT+0000 elapsed: 81928.796
    _____
    {
      "raw": "010000001001010010000000001100110100100­001",
      "rh": 59.4, "temp": 20.5 }
    { "free": 1849, "usage": 451, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.965 }
    start: Date: Thu Jan 1 1970 00:01:26 GMT+0000 end: Date: Thu Jan 1 1970 00:01:26 GMT+0000 elapsed: 86928.826
    _____
    {
      "raw": "010000001001010011000000001100110100100­010",
      "rh": 59.5, "temp": 20.5 }
    { "free": 1846, "usage": 454, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.966 }
    start: Date: Thu Jan 1 1970 00:01:31 GMT+0000 end: Date: Thu Jan 1 1970 00:01:31 GMT+0000 elapsed: 91927.032
    _____
    {
      "raw": "010000001001001110000000001100111000011­110",
      "rh": 59, "temp": 20.6 }
    { "free": 1842, "usage": 458, "total": 2300, "history": 202,
      "gc": 0, "gctime": 1.964 }
    start: Date: Thu Jan 1 1970 00:01:36 GMT+0000 end: Date: Thu Jan 1 1970 00:01:36 GMT+0000 elapsed: 96928.07
    _____
    
  • If set >5 sec - return -1 rh.
    But if you call the read function two times at once, then the correct true value is returned.

    How to fix this?..

  • Try to add trace to your program, and stop it after 3 runs. trace would print the inner state, and provide some information an what's wrong. I'd guess the module would not clean up everything.
    If using line 1 doesn't give any hints try line 2, and finally line 3.

    console.log(global["\xFF"].timers); //print only timers, short info
    trace(global["\xFF"].timers); //print only timers, full info
    trace(); //prints full info
    
  • use console.log(global["\xFF"].timers);

    I see nothing wrong

    Log:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    { "err": true, "checksumError": true,
      "raw": "100000010010000000000000011010000000100­10",
      "temp": -1, "rh": -1 }
    { "free": 1962, "usage": 338, "total": 2300, "history": 120,
      "gc": 0, "gctime": 1.998 }
    [
      undefined,
      { "time": 4441824, "interval": 5000000,
        "callback": function () {
      this.dht.read((response) => {
          console.log(response)
          console.log(process.memory())
          console.log(global["\xFF"].timers);
          console.log('_____')
        });
    }
       },
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      { "time": 11404,
        "callback": function () {a.read(c,--d)}
       },
      undefined,
      { "time": 61235,
        "callback": function () {
      a.watch&&(a.watch=clearWatch(a.watch));v­ar e=parseInt(b.substr(2,8),2)+parseInt(b.s­ubstr(10,8),2)+parseInt(b.substr(18,8),2­)+parseInt(b.substr(26,8),2);e&&(e&255)=­=parseInt(b.substr(34,
    8),2)?c({raw:b,rh:.1*parseInt(b.substr(2­,16),2),temp:.2*parseInt(b.substr(19,15)­,2)*(.5-b[18])}):1<d?setTimeout(function­(){a.read(c,--d)},500):c({err:!0,checksu­mError:0<e,raw:b,temp:-1,rh:-1})
    }
       }
     ]
    _____
    {
      "raw": "010000010001111110000000011010000000100­011",
      "rh": 115, "temp": 41.6 }
    { "free": 1942, "usage": 358, "total": 2300, "history": 120,
      "gc": 0, "gctime": 2.015 }
    [
      undefined,
      { "time": 4315877, "interval": 5000000,
        "callback": function () {
      this.dht.read((response) => {
          console.log(response)
          console.log(process.memory())
          console.log(global["\xFF"].timers);
          console.log('_____')
        });
    }
       },
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      { "time": 2925,
        "callback": function () {
      a.watch&&(a.watch=clearWatch(a.watch));v­ar e=parseInt(b.substr(2,8),2)+parseInt(b.s­ubstr(10,8),2)+parseInt(b.substr(18,8),2­)+parseInt(b.substr(26,8),2);e&&(e&255)=­=parseInt(b.substr(34,
    8),2)?c({raw:b,rh:.1*parseInt(b.substr(2­,16),2),temp:.2*parseInt(b.substr(19,15)­,2)*(.5-b[18])}):1<d?setTimeout(function­(){a.read(c,--d)},500):c({err:!0,checksu­mError:0<e,raw:b,temp:-1,rh:-1})
    }
       },
      undefined,
      undefined,
      { "time": 508484,
        "callback": function () {a.read(c,--d)}
       }
     ]
    _____
    {
      "raw": "010000001001000001000000001101000000010­011",
      "rh": 57.7, "temp": 20.8 }
    { "free": 1954, "usage": 346, "total": 2300, "history": 120,
      "gc": 0, "gctime": 1.995 }
    [
      undefined,
      { "time": 3636446, "interval": 5000000,
        "callback": function () {
      this.dht.read((response) => {
          console.log(response)
          console.log(process.memory())
          console.log(global["\xFF"].timers);
          console.log('_____')
        });
    }
       },
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      undefined,
      { "time": 42163,
        "callback": function () {
      a.watch&&(a.watch=clearWatch(a.watch));v­ar e=parseInt(b.substr(2,8),2)+parseInt(b.s­ubstr(10,8),2)+parseInt(b.substr(18,8),2­)+parseInt(b.substr(26,8),2);e&&(e&255)=­=parseInt(b.substr(34,
    8),2)?c({raw:b,rh:.1*parseInt(b.substr(2­,16),2),temp:.2*parseInt(b.substr(19,15)­,2)*(.5-b[18])}):1<d?setTimeout(function­(){a.read(c,--d)},500):c({err:!0,checksu­mError:0<e,raw:b,temp:-1,rh:-1})
    }
       }
     ]
    _____
    
  • Something is not right, start and end is the same after the second call, and elapsed is continuously increasing. Might be some watch / timeout stuck somewhere, the DHT22 library sets timeouts in multiple places...
    Try to run reset(1), remove power from the board, and run again with 10000 timeout.

  • memory is ok. but rh and temp -1. why?..

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    { "err": true, "checksumError": true,
      "raw": "100000010010100110000000011001000000111­01",
      "temp": -1, "rh": -1 }
    { "free": 1981, "usage": 319, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.969 }
    start: Date: Thu Jan 1 1970 00:00:15 GMT+0000 end: Date: Thu Jan 1 1970 00:00:21 GMT+0000 elapsed: 5565.295
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010110110000000011001000001001­01",
      "temp": -1, "rh": -1 }
    { "free": 1981, "usage": 319, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.952 }
    start: Date: Thu Jan 1 1970 00:00:25 GMT+0000 end: Date: Thu Jan 1 1970 00:00:31 GMT+0000 elapsed: 5564.528
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010101100000000011001000001000­00",
      "temp": -1, "rh": -1 }
    { "free": 1981, "usage": 319, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.949 }
    start: Date: Thu Jan 1 1970 00:00:35 GMT+0000 end: Date: Thu Jan 1 1970 00:00:41 GMT+0000 elapsed: 5549.423
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010101000000000011001000000111­10",
      "temp": -1, "rh": -1 }
    { "free": 1981, "usage": 319, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.953 }
    start: Date: Thu Jan 1 1970 00:00:45 GMT+0000 end: Date: Thu Jan 1 1970 00:00:51 GMT+0000 elapsed: 5564.674
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010100110000000011001001000111­10",
      "temp": -1, "rh": -1 }
    { "free": 1972, "usage": 328, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.967 }
    start: Date: Thu Jan 1 1970 00:00:55 GMT+0000 end: Date: Thu Jan 1 1970 00:01:01 GMT+0000 elapsed: 5570.317
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010100100000000011001001000111­01",
      "temp": -1, "rh": -1 }
    { "free": 1972, "usage": 328, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.97 }
    start: Date: Thu Jan 1 1970 00:01:05 GMT+0000 end: Date: Thu Jan 1 1970 00:01:11 GMT+0000 elapsed: 5568.358
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010100000000000011001001000110­11",
      "temp": -1, "rh": -1 }
    { "free": 1972, "usage": 328, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.964 }
    start: Date: Thu Jan 1 1970 00:01:15 GMT+0000 end: Date: Thu Jan 1 1970 00:01:21 GMT+0000 elapsed: 5565.552
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010011100000000011001001000110­01",
      "temp": -1, "rh": -1 }
    { "free": 1972, "usage": 328, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.963 }
    start: Date: Thu Jan 1 1970 00:01:25 GMT+0000 end: Date: Thu Jan 1 1970 00:01:31 GMT+0000 elapsed: 5576.903
    _____
    { "err": true, "checksumError": true,
      "raw": "100000010010011000000000011001001000101­11",
      "temp": -1, "rh": -1 }
    { "free": 1972, "usage": 328, "total": 2300, "history": 126,
      "gc": 0, "gctime": 1.963 }
    start: Date: Thu Jan 1 1970 00:01:35 GMT+0000 end: Date: Thu Jan 1 1970 00:01:41 GMT+0000 elapsed: 5576.975
    _____
    
  • Do you have a pullup resistor (4k7 - 10k) between the data and VCC?
    IIRC without an external resistor, it didn't work properly with the ESP32, I think it's internal pullup resistor is not strong enough.

  • Ok, did some testing, and can confirm @Linyx's findings with the DHT22:

    • MDBT42Q module (2v04) - works flawlessly
    • ESP8266 - I have one that's been running for months without issue
    • ESP32 (tested with 2v01 and 2v04) - doesn't work.

    Checked the communication with a logic analyzer, and the DHT22 sends the right response (temperature and humidity valid, checksum ok). It's just the ESP32 can't pick up the response properly.

    Anybody any idea?

  • Hmm, can't test this by myself (no DHT22).

    • could you test with a not minified module ?
    • could you add console.log(process.memory().free) to setWatch to see wether it happens there ?
    • next possible point could be one of the setTimeout
  • This log if call read every 10 secs, setWatch not work:

     ____                 _
    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v04 (c) 2019 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.905 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.887 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.892 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.892 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.887 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.892 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.892 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.892 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.888 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.884 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.884 }
    _____
    { "err": true, "checksumError": false,
      "raw": "",
      "temp": -1, "rh": -1 }
    { "free": 2028, "usage": 272, "total": 2300, "history": 141,
      "gc": 0, "gctime": 1.887 }
    _____
    > 
    
  • this log when call
    this.dht.read(function (a) {});
    this.dht.read(function (a) {});

    0
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.916 }
    0
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.864 }
    00
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.864 }
    000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.876 }
    000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.859 }
    0000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    0000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.864 }
    00000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.865 }
    000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.225 }
    000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.884 }
    0000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.879 }
    0000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    0000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    0000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.876 }
    000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.892 }
    000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    0000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    0000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    0000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    0000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    00000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.105 }
    000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.878 }
    000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.882 }
    0000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    0000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    00000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.994 }
    000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.876 }
    000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.88 }
    0000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.876 }
    0000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.891 }
    00000000000000000000000
    { "free": 1981, "usage": 319, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    00000000000000000000000
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    000000000000000000000001
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.882 }
    000000000000000000000001
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    0000000000000000000000010
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.879 }
    0000000000000000000000010
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.873 }
    00000000000000000000000100
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.882 }
    00000000000000000000000100
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    000000000000000000000001000
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    000000000000000000000001000
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.892 }
    0000000000000000000000010000
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    0000000000000000000000010000
    { "free": 1980, "usage": 320, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.881 }
    00000000000000000000000100000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000000000001000000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.927 }
    00
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.925 }
    0000000000000000000000010000000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.939 }
    00000000000000000000000100000000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000000000001000000000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.927 }
    00000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.927 }
    0000000000000000000000010000000000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000
    { "free": 1986, "usage": 314, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    00000000000000000000000100000000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000000000001000000000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.924 }
    00000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.242 }
    0000000000000000000000010000000000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.932 }
    000000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    00000000000000000000000100000000000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.923 }
    0000000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.927 }
    000000000000000000000001000000000000000
    { "free": 1985, "usage": 315, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    00000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­0
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    0000000000000000000000010000000000000000­00
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.927 }
    00000000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­0000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­00000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    00000000000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000000
    { "free": 1984, "usage": 316, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.939 }
    0000000000000000000000010000000000000000­0000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    0000000000000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­00000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    00000000000000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    0000000000000000000000010000000000000000­000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­0000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.932 }
    0000000000000000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­00000000000
    { "free": 1983, "usage": 317, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.94 }
    00000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    0000000000000000000000010000000000000000­000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    0000000000000000000000010000000000000000­0000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.93 }
    0000000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­00000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    00000000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.929 }
    0000000000000000000000010000000000000000­000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    000000000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.94 }
    0000000000000000000000010000000000000000­0000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000000000
    { "free": 1982, "usage": 318, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.928 }
    0000000000000000000000010000000000000000­00000000000000000
    { "free": 1949, "usage": 351, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.978 }
    00000000000000000000000000000
    { "free": 1949, "usage": 351, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.951 }
    0
    { "free": 1949, "usage": 351, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.952 }
    0000000000000000000000010000000000000000­000000000000000000
    { "free": 1949, "usage": 351, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.951 }
    000000000000000000000000000000
    { "free": 1949, "usage": 351, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    00
    { "free": 1949, "usage": 351, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.951 }
    0000000000000000000000010000000000000000­0000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.954 }
    0000000000000000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.188 }
    000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­00000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.954 }
    00000000000000000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­000000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    000000000000000000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    00000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­0000000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.966 }
    000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.954 }
    0000000000000000000000010000000000000000­00000000000000000000000
    { "free": 1948, "usage": 352, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    00000000000000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    000000000000000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    00000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­0000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.967 }
    000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­00000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    00000000000000000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­000000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    000000000000000000000000000000000000000
    { "free": 1947, "usage": 353, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    00000000000
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.102 }
    0000000000000000000000010000000000000000­0000000000000000000000000000
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000000000000000000000­
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.968 }
    000000000000
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­00000000000000000000000000000
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000000000000000000000­0
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    0000000000000
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­000000000000000000000000000000
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.953 }
    0000000000000000000000000000000000000000­00
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    00000000000000
    { "free": 1946, "usage": 354, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.576 }
    0000000000000000000000000000000000000000­000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.968 }
    000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    0000000000000000000000010000000000000000­00000000000000000000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000000000000000000000­0000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.948 }
    0000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    0000000000000000000000010000000000000000­000000000000000000000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    0000000000000000000000000000000000000000­00000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.943 }
    00000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.955 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.084 }
    0000000000000000000000000000000000000000­000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    000000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.953 }
    0000000000000000000000010000000000000000­00000000000000000000000000000000000
    { "free": 1945, "usage": 355, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.957 }
    0000000000000000000000000000000000000000­0000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    0000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.995 }
    0000000000000000000000010000000000000000­000000000000000000000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.948 }
    0000000000000000000000000000000000000000­00000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    00000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.358 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.912 }
    0000000000000000000000000000000000000000­000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    000000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.913 }
    0000000000000000000000010000000000000000­00000000000000000000000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.949 }
    0000000000000000000000000000000000000000­0000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    0000000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.167 }
    0000000000000000000000010000000000000000­000000000000000000000000000000000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.948 }
    0000000000000000000000000000000000000000­00000000000
    { "free": 1944, "usage": 356, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.98 }
    00000000000000000000000
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.957 }
    0000000000000000000000000000000000000000­000000000000
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.945 }
    000000000000000000000000
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.994 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    0000000000000000000000000000000000000000­0000000000000
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000000
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.933 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.877 }
    0000000000000000000000000000000000000000­00000000000001
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    00000000000000000000000001
    { "free": 1943, "usage": 357, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.956 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011
    { "free": 1942, "usage": 358, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.957 }
    0000000000000000000000000000000000000000­000000000000011
    { "free": 1942, "usage": 358, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.945 }
    000000000000000000000000011
    { "free": 1942, "usage": 358, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.994 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110
    { "free": 1942, "usage": 358, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    0000000000000000000000000000000000000000­0000000000000110
    { "free": 1942, "usage": 358, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.945 }
    0000000000000000000000000110
    { "free": 1942, "usage": 358, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.842 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101
    { "free": 1874, "usage": 426, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.981 }
    0000000000000000000000000000000000000000­00000000000001101
    { "free": 1874, "usage": 426, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.957 }
    00000000000000000000000001101
    { "free": 1874, "usage": 426, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.957 }
    0
    { "free": 1874, "usage": 426, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011
    { "free": 1871, "usage": 429, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.139 }
    0000000000000000000000000000000000000000­000000000000011011
    { "free": 1871, "usage": 429, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    000000000000000000000000011011
    { "free": 1871, "usage": 429, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.917 }
    01
    { "free": 1871, "usage": 429, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.299 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111
    { "free": 1871, "usage": 429, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.96 }
    0000000000000000000000000000000000000000­0000000000000110111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0000000000000000000000000110111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.96 }
    011
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.96 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.96 }
    0000000000000000000000000000000000000000­00000000000001101111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    00000000000000000000000001101111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.003 }
    0111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.937 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.972 }
    0000000000000000000000000000000000000000­000000000000011011111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.945 }
    000000000000000000000000011011111
    {`"free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.998 }
    01111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.933 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.952 }
    0000000000000000000000000000000000000000­0000000000000110111111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.937 }
    0000000000000000000000000110111111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.917 }
    011111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.96 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.972 }
    0000000000000000000000000000000000000000­00000000000001101111111
    { "free": 1870, "usage": 430, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.96 }
    00000000000000000000000001101111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.959 }
    0111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0000000000000000000000000000000000000000­000000000000011011111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.941 }
    000000000000000000000000011011111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.93 }
    01111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.944 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.973 }
    0000000000000000000000000000000000000000­0000000000000110111111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0000000000000000000000000110111111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    011111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.96 }
    0000000000000000000000000000000000000000­00000000000001101111111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.937 }
    00000000000000000000000001101111111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.933 }
    0111111111
    { "free": 1869, "usage": 431, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.936 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111
    { "free": 1868, "usage": 432, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.353 }
    0000000000000000000000000000000000000000­000000000000011011111111111
    { "free": 1868, "usage": 432, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    000000000000000000000000011011111111111
    { "free": 1868, "usage": 432, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.999 }
    01111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.003 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.965 }
    0000000000000000000000000000000000000000­0000000000000110111111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.942 }
    0000000000000000000000000110111111111111­
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.941 }
    011111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.913 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.972 }
    0000000000000000000000000000000000000000­00000000000001101111111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0000000000000000000000000110111111111111­1
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0111111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    0000000000000000000000000000000000000000­000000000000011011111111111111
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.942 }
    0000000000000000000000000110111111111111­11
    { "free": 1867, "usage": 433, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.078 }
    0000000000000000000000000110111111111111­111111
    { "free": 1866, "usage": 434, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.95 }
    011111111111111111
    { "free": 1866, "usage": 434, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.001 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111111111111
    { "free": 1866, "usage": 434, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.973 }
    0000000000000000000000000000000000000000­00000000000001101111111111111111111
    { "free": 1866, "usage": 434, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.941 }
    0000000000000000000000000110111111111111­1111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.934 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000000000000000000000­000000000000011011111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.945 }
    0000000000000000000000000110111111111111­11111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.961 }
    01111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.958 }
    0000000000000000000000000110111111111111­111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    011111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.001 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.95 }
    0000000000000000000000000000000000000000­00000000000001101111111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.942 }
    0000000000000000000000000110111111111111­1111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.265 }
    0111111111111111111111
    { "free": 1865, "usage": 435, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.954 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111111111111111
    { "free": 1864, "usage": 436, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000000000000000000­000000000000011011111111111111111111111
    { "free": 1864, "usage": 436, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.001 }
    0000000000000000000000000110111111111111­11111111111
    { "free": 1864, "usage": 436, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.969 }
    01111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.001 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000000110111111111111­111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.974 }
    011111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.958 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­1
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000000110111111111111­1111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.06 }
    0111111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.951 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­11
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000000110111111111111­11111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    01111111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.001 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111
    { "free": 1863, "usage": 437, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.95 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­111
    { "free": 1862, "usage": 438, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.198 }
    0000000000000000000000000110111111111111­111111111111111
    { "free": 1862, "usage": 438, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    011111111111111111111111111
    { "free": 1862, "usage": 438, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.005 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111111111111111111111
    { "free": 1862, "usage": 438, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.272 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­1111
    { "free": 1862, "usage": 438, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­1111111111111111
    { "free": 1862, "usage": 438, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0111111111111111111111111111
    { "free": 1862, "usage": 438, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111111111111111111111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.978 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­11111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.964 }
    0000000000000000000000000110111111111111­11111111111111111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­111111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0000000000000000000000000110111111111111­111111111111111111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111111111111111111111111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.063 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­1111111
    { "free": 1933, "usage": 367, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.962 }
    0000000000000000000000000110111111111111­1111111111111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111111111111111111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.97 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­11111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0000000000000000000000000110111111111111­11111111111111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­111111111111111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­01101111111111111111111111111111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­1111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.975 }
    0000000000000000000000000110111111111111­1111111111111111111111
    { "free": 1932, "usage": 368, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­011011111111111111111111111111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.948 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­11111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­11111111111111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.975 }
    0000000000000000000000000110111111111111­111111111111111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­1
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­1111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­1111111111111111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.948 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­11
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­11111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.276 }
    0000000000000000000000000110111111111111­11111111111111111111111111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.946 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­111
    { "free": 1931, "usage": 369, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­111111111111111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­1111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­1111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.58 }
    0000000000000000000000000110111111111111­1111111111111111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.958 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­11111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.947 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­11111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­11111111111111111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.964 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.948 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­111111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­111111111111111111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 2.202 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­1111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.964 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­1111111111111111111
    { "free": 1930, "usage": 370, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000110111111111111­1111111111111111111111111111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­11111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.966 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­11111111111111111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.965 }
    0000000000000000000000000110111111111111­11111111111111111111111111111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.975 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­111111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000000000000000000000­0000000000000110111111111111111111111111­111111111111111111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.964 }
    0000000000000000000000000110111111111111­111111111111111111111111111111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.963 }
    0000000000000000000000010000000000000000­0000000000000000000000000000000000000000­0110111111111111111111111111111111111111­1111111111
    { "free": 1929, "usage": 371, "total": 2300, "history": 114,
      "gc": 0, "gctime": 1.965 }
    000
    
  • d length >600 symbols and memory low

  • Could you add ESP32.getState, to see how heap goes

  • all time

    {
      "sdkVersion": "v3.1.3-dirty",
      "freeHeap": 35712, "BLE": true, "Wifi": true, "minHeap": 33112 }
    
  • So, heap runs fine.
    I'm pretty sure, disabling BLE or Wifi doesn't change anything, true ?

  • anyway -1 rh...

  • Issue https://github.com/espruino/Espruino/iss­ues/1687 was created by ApocalypseLinyx

  • Ok, time to bring the toys back.
    With this test I have set a LED to pin, active low.

    First test.

    function tt () {
      ht = {};
      //ht.pin = D0; // esp8266
      ht.pin = D12; // esp32 pico4
    
      setInterval (function () {
        var d = "";
        ta = getTime ();
        tb = 0;
    
        pinMode (ht.pin, 'opendrain');
    
        ht.watch = setWatch (function (t) {
          d = 0 + | (t.time-t.lastTime> 0.000050); // 50 usec (time in sec)
        }, ht.pin, {edge: 'falling', repeat: true});
    
        //pinMode(ht.pin, 'opendrain');
    
        setTimeout (function () {
          pinMode (ht.pin, 'input_pullup');
          tb = getTime ();
          console.log (tb-ta);
        }, 1000);
    
        setTimeout (function () {
          Clear watch (ht.watch);
          console.log ('d =' + d);
          console.log (process.memory ());
        }, 200);
    
    
      }, 3000);
    }
    
    TT ();
    
    

     
    It only gives me short pulses, and not for 1 second, as expected.
    If I remove clearWatch (ht.watch), I get a short pulse, then full pulse length and it uses all the memory.

    On esp8266 there are no problems.

    Next test.

    function tt () {
      ht = {};
      //ht.pin = D0; // esp8266
      ht.pin = D12; // esp32 pico4
    
      setInterval (function () {
        var d = "";
        ta = getTime ();
        tb = 0;
    
        //pinMode(ht.pin, 'opendrain');
    
        ht.watch = setWatch (function (t) {
          d = 0 + | (t.time-t.lastTime> 0.000050); // 50 usec (time in sec)
        }, ht.pin, {edge: 'falling', repeat: true});
    
        pinMode (ht.pin, 'opendrain');
    
        setTimeout (function () {
          pinMode (ht.pin, 'input_pullup');
          tb = getTime ();
          console.log (tb-ta);
        }, 1000);
    
        setTimeout (function () {
          Clear watch (ht.watch);
          console.log ('d =' + d);
          console.log (process.memory ());
        }, 200);
    
    
      }, 3000);
    }
    
    TT ();
    
    

    Here pinMode has been moved to after set_Watch and I can determine pulse length on LED.
    Also works on esp8266.

    And now for a workaround, so it works on both esp8266 and esp32 pico4 as I have.

    Hope this is something you can use?

    // testWatch02
    
    function DHT22 (pin) {
      this.pin = pin;
    }
    
    DHT22.prototype.read = function (cb, n) {
      if (! n) n = 10;
      var d = "";
      var ht = this;
    
      // start watching for state change
      ht.watch = setWatch (function (t) {
        d = 0 + | (t.time-t.lastTime> 0.00005);
      }, ht.pin, {edge: 'falling', repeat: true});
    
      pinMode (ht.pin, 'opendrain'); // PB obs It sets the output low immediately
    
      // raise pulse after 10ms
      setTimeout (function () {pinMode (ht.pin, 'input_pullup'); pinMode (ht.pin);}, 10);
    
      // stop looking after 100ms
      setTimeout (function () {
        if (ht.watch) {ht.watch = clearWatch (ht.watch); }
    
    d = d.substr (1); // PB you are a genius
        var cks =
            parseInt (d.substr (2.8) 2) +
            parseInt (d.substr (10.8), 2) +
            parseInt (d.substr (18.8), 2) +
            parseInt (d.substr (26.8), 2);
        if (cks && (((cks & 0xFF) == parseInt (d.substr (34.8), 2))) {
          cb ({
            raw: d,
            rh: parseInt (d.substr (2.16), 2) * 0.1,
            temp: parseInt (d.substr. (19.15), 2) * 0.2 * (0.5-d [18])
          });
        } else {
          if (n> 1) setTimeout (function () {ht.read (cb, - n);}, 500);
          // else cb ({err: true, checksumError: cks> 0, raw: d, temp: -1, rh: -1});
          else cb ({err: true, checksumError: cks> 0, raw: d, temp: -1, rh: -1, n: n});
        }
      }, 100);
    };
    
    DHT22.prototype.getName = function () {
    return 'Frida';
    };
    / *
    exports.connect = function (pin) {
        return new DHT22 (pin);
    };
    * /
    
    
    function dd () {
      esp = 0;
      if (esp) {
        pin = D0; // esp8266
        // esp8266 version 2v00.68 (c) 2018 G.Williams
        var ESP8266 = require ('ESP8266');
        ESP8266.setCPUFreq (80);
        console.log (ESP8266.getState ());
      } else {
        pin = D12; // esp32 pico4
        // esp32 pico4 version 2v02 (c) 2018 G.Williams
        console.log (ESP32.getState ());
      }
    
    // var dht = require ("DHT22a"). connect (pin);
      var dht = new DHT22 (pin);
    
      console.log (dht.getName ());
    
      setInterval (function () {
    
        dht.read (function (a) {
          console.log ("Temp is" + a.temp.toFixed (1) .toString () +
                      ", RH is" + a.rh.toFixed (1) .toString () +
                      "\ Nraw:" + a.raw +
                      "\ nn:" + a.n +
                      "\ Nerr:" + a.err +
                      ", cse:" + a.checksumError);},
                 1);
    
        setTimeout (function () {
          console.log ("E-Flags: [" + E.getErrorFlags () + "] \ n \ n");},
                   1000);
    
      }, 3000);
    
    }
    
    
    dd ();
    
    // save ();
    

    And some outputs.

    Temp is 35.1, RH is 92.3
    raw:010000001110011011000000010101111111­111110
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 92.4
    raw:010000001110011100000000010101111111­111111
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 92.5
    raw:010000001110011101000000010101111100­000000
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 92.6
    raw:010000001110011110000000010101111100­000001
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 92.7
    raw:010000001110011111000000010101111100­000010
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 92.8
    raw:010000001110100000000000010101111100­000011
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 92.9
    raw:010000001110100001000000010101111100­000100
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 93.0
    raw:010000001110100010000000010101111100­000101
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 93.1
    raw:010000001110100011000000010101111100­000110
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    Temp is 35.1, RH is 93.2
    raw:010000001110100100000000010101111100­000111
    n: undefined
    err:undefined, cse:undefined
    E-Flags: []
    
    

    Happy coding.

  • What changed from #1 (good temperature readings) to #8 (checksum error)? The length of the raw output changed by one bit. What did you change?

    The code in #20 looks non-functional, e.g. parseInt (d.substr (2.8) 2) + can't work.

    I copied in the module as reference, with some notes:

    /* Copyright (C) 2014 Spence Konde. See the file LICENSE for copying permission. */
    /*
    This module interfaces with a DHT22 temperature and relative humidity sensor.
    Usage (any GPIO pin can be used):
    
    var dht = require("DHT22").connect(C11);
    dht.read(function (a) {console.log("Temp is "+a.temp.toString()+" and RH is "+a.rh.toString());});
    
    the return value if no data received: {"temp": -1, "rh": -1, err:true, "checksumError": false}
    the return value, if some data is received, but the checksum is invalid: {"temp": -1, "rh": -1, err:true, "checksumError": true}
      */
    
    function DHT22(pin) {
      this.pin = pin;
    }
    
    DHT22.prototype.read = function (cb, n) {
      if (!n) n=10;
      var d = "";
      var ht = this;
      digitalWrite(ht.pin, 0);
      pinMode(ht.pin,"output"); // force pin state to output
      // start watching for state change
      this.watch = setWatch(function(t) {
        d+=0|(t.time-t.lastTime>0.00005);
      }, ht.pin, {edge:'falling',repeat:true} );
      // raise pulse after 1ms
      setTimeout(function() {pinMode(ht.pin,'input_pullup');pinMode(­ht.pin);},1);
      // stop looking after 50ms
      setTimeout(function() {
        if(ht.watch){ ht.watch = clearWatch(ht.watch); }
        var cks =
            parseInt(d.substr(2,8),2)+
            parseInt(d.substr(10,8),2)+
            parseInt(d.substr(18,8),2)+
            parseInt(d.substr(26,8),2);
        if (cks&&((cks&0xFF)==parseInt(d.substr(34,­8),2))) {
          cb({
            raw : d,
            rh : parseInt(d.substr(2,16),2)*0.1,
            temp : parseInt(d.substr(19,15),2)*0.2*(0.5-d[1­8])
          });
        } else {
          if (n>1) setTimeout(function() {ht.read(cb,--n);},500);
          else cb({err:true, checksumError:cks>0, raw:d, temp:-1, rh:-1});
        }
      }, 50);
    };
    
    exports.connect = function(pin) {
        return new DHT22(pin);
    };
    

    From my point of view line 22 is not necessary, or if it is lines 21 and 22 should be swapped.
    Line 23 could read // read d based on signal change interval

    Lines 27 and 28 could be moved to the end and then rewritten. Since the lines will be only executed once everything is set up there's no need to use a setTimer in this case:

    //trigger data transmission
    pinMode(ht.pin,'input_pullup');
    pinMode(ht.pin);
    

    Line 29 could read // parse the received data d (50ms length)
    Line 31 could be changed to clearWatch(ht.watch);, using if is not necessary.
    And I'd change line 1 to if (!n) n=1; because one try should be enough if nothing else was specified.

    And if your raw data is too long, capturing also the trigger you can add d = d.substr (1); //remove trigger signal to the code. I don't have this sensor, so I can't try.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

ESP and DHT22 LOW MEMORY

Posted by Avatar for Linyx @Linyx

Actions