• Hey everybody,

    I tried your example but it doesn't work.

    var Ruuvitag = require('Ruuvitag');
    function onInit() {
      Ruuvitag.setEnvOn(true);
      setInterval(function() {
        console.log(Ruuvitag.getEnvData());
      }, 5000);
    }
    

    After restarting the ruuvi I get this message:

    in function called from system
    Uncaught Error: Field or method "getData" does not already exist, and can't create it on undefined
    at line 1 col 12
    exports.env.getData()

    in function "getEnvData" called from line 5 col 33
    console.log(Ruuvitag.getEnvData());

    What could be the problem?

About

Avatar for Jens @Jens started