Ble_eddystone module on RuuviTag


#1

Trying to use basic tag to advertise temperature with Espruino.

Espruino docs have an example for using ble_eddystone module with Puck.js, see here:
https://www.espruino.com/Puck.js+Eddystone

This gets sent and accepted by RuuviTag with no errors, but I see nothing advertised.

Should this work?


#2

Have you disconnected the Web IDE from RuuviTag?

As long as the Web IDE is connected, RuuviTag will not start eddystone advertisements,


#3

Yes, I have disconnected and turned off the bluetooth on the laptop just to be sure. The URL is short and https - I have tried both with the https:// prefix and without.

But from your reply I infer that it should work and has been seen working on the basic tag?


#4

Yes, it should work on basic tag.

The URL has to be resolvable and have a valid SSL certificate (let’s encrypt is fine) to show up as an Android Nearby notification. Have you tried to scan for the URL using for example a Physical Web app?


#5

I have tried several URLs, all should meet the requirements. App used for scanning is the same Chrome that sees Ruuvitags with Eddystone firmware without problems.


#6

I just tried the example on https://www.espruino.com/Puck.js+Eddystone with my RuuviTag basic on Espruino 1.91_450 with no problems. The date of my version is 10th of March, I’ll check how it goes on 1.91_447 (13th of April).

Edit: I just tried on latest Espruino without problems. Could you please share the exact code you’re using so I can try to replicate the problem?


#7

I’m using this code to advertise temperature measured from OneWire device, it works:

function onInit()
{
var ow = new OneWire(4);
device = ow.search()[0];
if (device===undefined)
print(“No OneWire devices found”);
else
print(“device:”+device);

print("Getting temp");
var sensor = require("DS18B20").connect(ow);
setInterval(function() 
{
  console.log(sensor.getTemp());
  require("ble_eddystone").advertise("goo.gl/"+     sensor.getTemp());

}, 1000);
}
save();