# Temperature measurement outside the tag

**URL:** https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275
**Category:** 🇬🇧 Feature requests (voting)
**Created:** [9 April 2017 12:01 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275 "2017-04-09T12:01:21Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![roland\_schnurr](https://f.ruuvi.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@roland\_schnurr](https://f.ruuvi.com/u/roland_schnurr)
#### Post date: [9 April 2017 12:01 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/1 "2017-04-09T12:01:21Z")

</div>

Hi,

to measure a temperature on a specific place outside the tag, for example on a radiator, it would be useful to extend the tag (the temperature sensor) with a cable of maybe 10 centimeter. Would this be possible?

best regards  
roland

---

<div class="post-metadata">

### Author: ![lauri](https://f.ruuvi.com/user_avatar/f.ruuvi.com/lauri/32/18_2.png) [@lauri](https://f.ruuvi.com/u/lauri)
#### Post date: [10 April 2017 00:10 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/2 "2017-04-10T00:10:12Z")

</div>

Yes, it is possible to add external sensors.

Prototyping is easy. Just run Espruino on your RuuviTag and you’re almost ready to go. One might find these interesting:

[https://www.espruino.com/OneWire](https://www.espruino.com/OneWire)

[https://www.espruino.com/DS18B20](https://www.espruino.com/DS18B20)

---

<div class="post-metadata">

### Author: ![jari.isohanni](https://f.ruuvi.com/user_avatar/f.ruuvi.com/jari.isohanni/32/39_2.png) [@jari.isohanni](https://f.ruuvi.com/u/jari.isohanni)
#### Post date: [12 April 2017 14:16 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/3 "2017-04-12T14:16:09Z")

</div>

Its possible to use external sensor with Ruuvitag, see attached image. We used DS18B20 temperature sensor and attached it to GPIO pin. I’m not even into electronics, but still I was able make required connections. Prototyping was easy with Espruino, code below

> var ow = new OneWire(4);  
> device = ow.search()[0]; // search returns an array of device IDs  
> 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());  
> }, 1000);
> 
> ![](https://f.ruuvi.com/uploads/default/original/1X/b0751595b462f2a8bc89a056b791e126c42a9aa8.jpeg)

---

<div class="post-metadata">

### Author: ![jmpr76](https://f.ruuvi.com/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jmpr76](https://f.ruuvi.com/u/jmpr76)
#### Post date: [12 December 2018 09:34 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/4 "2018-12-12T09:34:11Z")

</div>

Hi. Is there any detailed instructions available how to connect 1-wire sensors to Ruuvi? Plan is to connect several 1-wire sensors (=1-wire network) to Ruuvi. 1-wire network is powered by own power supply.

If we use espruino fw in Ruuvi, can we still use RuuviStation mobile app for reading sensors ?

---

<div class="post-metadata">

### Author: ![lauri](https://f.ruuvi.com/user_avatar/f.ruuvi.com/lauri/32/18_2.png) [@lauri](https://f.ruuvi.com/u/lauri)
#### Post date: [12 December 2018 09:51 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/5 "2018-12-12T09:51:27Z")

</div>

Hey. Are you not going to use DS18 sensors? If not, what kind of sensors?

I’m not sure if anyone has shared Espruino code snippets about using Ruuvi’s official sensor data formats but it’s definitely possible to do so. Just follow the spec:

> **[ruuvi/ruuvi-sensor-protocols](https://github.com/ruuvi/ruuvi-sensor-protocols)**
>
> Contribute to ruuvi/ruuvi-sensor-protocols development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![jmpr76](https://f.ruuvi.com/letter_avatar_proxy/v4/letter/j/d2c977/32.png) [@jmpr76](https://f.ruuvi.com/u/jmpr76)
#### Post date: [12 December 2018 13:13 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/6 "2018-12-12T13:13:45Z")

</div>

Sensors are DS18. Currently i have 4 sensors in one network, powered with 5vdc USB power supply.

---

<div class="post-metadata">

### Author: ![alexhk](https://f.ruuvi.com/user_avatar/f.ruuvi.com/alexhk/32/1543_2.png) [@alexhk](https://f.ruuvi.com/u/alexhk)
#### Post date: [21 November 2019 07:27 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/7 "2019-11-21T07:27:26Z")

</div>

I apologize for resurrecting this old thread.

I am interested in connecting a DS1820 to a few of my RuuviTags.

I understand from the info above that this seems to be possible without too much of a hassle.

However, currently I am my RuuviTags out of the box with RuuviCollector and Influx/Grafana. Optimally, I’d continue doing that, but have the new temperature from the DS1820 collected in the same way.

I have no problem modifying RuuviCollector.

Does the Espruino code run in parallel to the standard firmware which sends the usual data such as temp and humidity? So I would simply be BLE advertising the new temp from DS18B20 temp data in addition to the standard temp/humidity from firmware with my own code? Or do I need to change the original firmware to include the temp from DS18B20?

Please give me a few pointers before I dive into this rabbit whole (reading up on Espruino, IDE etc in the meantime).

Thanks!!

---

<div class="post-metadata">

### Author: ![Scrin](https://f.ruuvi.com/user_avatar/f.ruuvi.com/scrin/32/326_2.png) [@Scrin](https://f.ruuvi.com/u/Scrin)
#### Post date: [21 November 2019 08:02 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/8 "2019-11-21T08:02:57Z")

</div>

> [@alexhk](#):
>
> Does the Espruino code run in parallel to the standard firmware which sends the usual data such as temp and humidity? So I would simply be BLE advertising the new temp from DS18B20 temp data in addition to the standard temp/humidity from firmware with my own code? Or do I need to change the original firmware to include the temp from DS18B20?

No, it’s either the standard firmware only, or Espruino only, or some other firmware only, and so on. So if you want to keep the “standard tag measurements” and append your own, you need to either modify the standard firmware, or use Espruino to read & send the same data as the standard firmware and add your own to that. If you are familiar with C, modifying the “default firmware” is probably easier than replicating it in Espruino, especially if you want a “production grade setup”.

Either way you will need to invent your own data format (and add support for it in the RuuviCollector) if you want to include two temperature readings, as none of the official data formats hold two different temperatures.

---

<div class="post-metadata">

### Author: ![otso](https://f.ruuvi.com/user_avatar/f.ruuvi.com/otso/32/1651_2.png) [@otso](https://f.ruuvi.com/u/otso)
#### Post date: [21 November 2019 18:15 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/9 "2019-11-21T18:15:06Z")

</div>

Here’s how I recently hacked support for multiple sensors in our development firmware:  
‹[https://blog.ruuvi.com/ruuvi-firmware-adding-a-new-sensor-6e973b2e8a9b](https://blog.ruuvi.com/ruuvi-firmware-adding-a-new-sensor-6e973b2e8a9b) .

TLDR: Each sensor is read sequentially and sent in a standard RAWv2 format, and the last byte of MAC address is modified to match the sensor, for example DS **18** B20 could become XX:XX:XX:XX:XX: **18**

---

<div class="post-metadata">

### Author: ![P\_E](https://f.ruuvi.com/user_avatar/f.ruuvi.com/p_e/32/1974_2.png) [@P\_E](https://f.ruuvi.com/u/P_E)
#### Post date: [19 February 2020 19:04 UTC](https://f.ruuvi.com/t/temperature-measurement-outside-the-tag/275/10 "2020-02-19T19:04:14Z")

</div>

Great stuff! Lacking the required coding skills I’m wondering has anyone shared their firmware for any external temperature sensor+Ruuvi combination (preferable capable of at least 0…100 degrees celsius)? I would definitely to give it a try with some of our existing Ruuvis, solder the sensor in and give it a go in our lab.
