Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hi

Ich habe einen Master + WLAN + Temperatursensor, alle mit aktueller Firmware.

Ich habe den Verdacht, dass wenn ich den WIFI Power Mode zweimal auf LOW_POWER setze, dass es dann einen Fehler gibt.

 

Folgendes node.js script wird alle 15 Minuten aufgerufen

    var ipcon = new TF.IPConnection();

    var masterBrick = new TF.BrickMaster('6esCZX', ipcon);

    var tempBricklet = new TF.BrickletTemperature('dCf', ipcon);

    tempBricklet.setI2CMode(TF.BrickletTemperature.I2C_MODE_SLOW);

   

    ipcon.connect(HOST, PORT, function(error) {

        cb("Could not open connection: "+error);       

    });

 

    ipcon.on(TF.IPConnection.CALLBACK_CONNECTED, function(connectReason) {

        masterBrick.setWifiPowerMode(TF.BrickMaster.WIFI_POWER_MODE_LOW_POWER);

        tempBricklet.getTemperature(

            function(temp) {

                cb(null, temp/100);

                ipcon.disconnect();

            },

            function(error) {

                cb("Could not read temperature: "+error);

                ipcon.disconnect();

            }

        );

    });

 

Ich bekomme immer "Could not read temperature: 31".

Wenn ich die Zeile

masterBrick.setWifiPowerMode(TF.BrickMaster.WIFI_POWER_MODE_LOW_POWER);

weglasse, dann funktioniert es.

Geschrieben
  • Autor

hab ich probiert:

    ipcon.on(TF.IPConnection.CALLBACK_CONNECTED, function(connectReason) {

        masterBrick.setWifiPowerMode(TF.BrickMaster.WIFI_POWER_MODE_LOW_POWER);

        // Get temperature

        setTimeout(function(){

            tempBricklet.getTemperature(

                function(temp) {

                    console.log(null, temp/100);

                    ipcon.disconnect();

                },

                function(error) {

                    console.log("Could not read temperature: "+error);

                    ipcon.disconnect();

                }

            );

        }, 1500);

    });

 

hilft nix. Erst wenn ich "masterBrick.setWifiPowerMode" weglasse dann funktioniert es.

Geschrieben
  • Autor

Hi TF

Ist nicht dringend, aber hattet ihr mal Zeit das nachzustellen?

Ich kann den Fehler reproduzieren.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.