Ruuvilab
As seen on Kickstarter

Web Bluetooth

« Back to tutorials

Connect to RuuviTag using a web browser

plugin

Comments

Web Bluetooth is technology that allows you to design websites which use data from Bluetooth Low Eenergy devices near you.

This allows users to interact with their surroundings via Bluetooth connectivity.

The standard is advancing rapidly. Current implementation status can be found on GitHub

How to use it

Currently, Web Bluetooth has to use connectable GATT services.

These connections are created and managed by a JavaScript code running in a web browser. You can check out Google's Web Bluetooth samples for details.

To connect to a device, you need to provide a filter which selects only devices relevant to your application. For example, "name starts with 'Ruuvi'" or "has service XXX available".

After the connection has been established, you can read and write characteristics from the device. You can also subscribe to notifications coming from the device. This allows your website to react to events sensed by the device without continuous polling. You can also update the values with up-to-date information. 

You can also subscribe to notifications coming from the device. This allows your website to react to events sensed by the device without continuous polling. You can also update the values with up-to-date information. 

What can I do with it?

You can use Web Bluetooth to interact with connectable Bluetooth devices such as many heart rate monitors.

RuuviTag also has the beginnings of GATT profile implementation available. However, the profile is not yet officially supported.

The Bluetooth device has to be in the range of your computer (or phone). So this technology does not really suit reading remote devices like sensors.

For remote monitoring, you could consider using Node-RED and Raspberry Pi, for example.

Example

You can test the upcoming Ruuvi Web Bluetooth by uploading the unofficial DFU packet from GitHub to your RuuviTag and connecting to it using a demo which graphs the acceleration.

The demo is in a pre-alpha state and could do anything or nothing at all.

If you would like to contribute, leave a comment and check this.

Comments

Share your project

#ruuvitag / @ruuvicom

Ruuvi Innovations Ltd (Oy) / Finland

Web Design Niku Creative