BlueWave Studio forum
How to: Install DS18B20 temperature sensor in OAP - Printable Version

+- BlueWave Studio forum (
+-- Forum: OpenAuto Pro (
+--- Forum: Temperature sensor (
+--- Thread: How to: Install DS18B20 temperature sensor in OAP (/showthread.php?tid=2551)

How to: Install DS18B20 temperature sensor in OAP - tthenrie - 04-06-2021

I successfully installed my DS18B20 temperature sensor and it's reading temps and correctly displaying them in OAP. Mine is the waterproof sensor that I intend to install outside the cab of my pickup to read outside air temps. Here's the  one I used:

DS18B20 Temperature Sensor

How to install and get it working:

1. Make correct connections: I used 3.3V (the sensor will handle 3-5v). The pins I used are 1 (3/3v), 25 (ground), and 7 (GPIO4 - default for One-Wire connection). Make sure you do not cross the + and - connections to the pi. The connectors that came with my sensor were crossed. If your sensor gets hot, check the connections again!
2. Exit OAP and open a terminal. In /boot/config.txt, under the section [pi4], set

This will default to gpio pin 4 (you can also do this by going to Interfaces in raspi-config or the Raspberrypi Preferences-Raspberry Pi Configuration utility). If that pin is already used in your setup, or you want to set up more than one sensor, designate a different one-wire gpio pin as follows:

      dtoverlay=w1-gpio,gpiopin=whatever gpio pin number you designate

(note:  I have see "gpiopin=" as "gpio_pin=" also. I suppose they are interchangeable. I use the latter. If one doesn't work, try the other)

3. Reboot

4. In terminal, go to /sys/bus/w1/devices.

5. If all connections are correct and the device is working, the command "ls" should show a directory something like 28-xxxxxxxxxxxxxxx. This is the serial number of your device. Under that directory, you will find a file labeled w1_slave. That is where your data will be.

6. Check to make sure your device is functioning:

     cat /sys/bus/w1/devices/28-your device's serial number/w1_slave

This should give a readout something like this:

    38 01 55 05 7f a5 81 66 5e : crc=5e YES
    38 01 55 05 7f a5 81 66 5e t=19500

The last number (t=19500) is the temperature in Celsius. Hold the device in your hand and wait a minute or two and cat the file again and you should see an increase in the temperature reading.

7. Go into the OpenAuto Pro settings under Appearance and enable Show Temperature and select C or F for your temperature display.

8.  Exit OAP and go back to terminal. Go to /home/pi/.openauto/config/openauto_system.ini and enter the identifiers for your device.

    sudo nano .openauto/config/openauto_system.ini

Look for the line:

Add to the end of that line your device's location. The line should look something like:

    TemperatureSensorDescription=/sys/bus/w1/devices/28-your device's serial number/w1_slave

9. Reboot and you should see the temperature showing in the top bar. Note that OAP isn't set up to display more than one temperature sensor. If you have more than one installed, you will select which one OAP shows by setting the serial number of the device in .openauto/config/openauto_system.ini.

That should do it.

Maybe a function suggestion for our developers...would it be difficult to add an Appearance setting to select and display two and devices - one for outside air temp and one for inside air temp?


RE: How to: Install DS18B20 temperature sensor in OAP - Daniel_BlueWave - 04-06-2021

Thank you for posting your solution and configuration.

Everything can be implemented. The thing is that there is no much space left at the top bar. We would like to keep good readability of that area and new OBD features are coming:

RE: How to: Install DS18B20 temperature sensor in OAP - gammelobst - 04-26-2021


multiple sensors sounds useful. An own Temp-Tile would be nice to display multiple sensors with additional configurable Names.
Maybe they could be integrated in the OBD-Section as additional widget.
For outside-, trunk- or Amplifier-Temp use as examples.
Amplifier-Temp value display would be needed by myself.

RE: How to: Install DS18B20 temperature sensor in OAP - GSPW - 04-27-2021

(04-26-2021, 09:24 PM)gammelobst Wrote: Amplifier-Temp value display would be needed by myself.

That's a very good point!