# Airthings Radon meter shows UNDEF for short term and long term radon

**URL:** <https://community.openhab.org/t/airthings-radon-meter-shows-undef-for-short-term-and-long-term-radon/144380>\
**Category:** Bindings\
**Created:** [February 13, 2023, 6:55pm UTC](https://community.openhab.org/t/airthings-radon-meter-shows-undef-for-short-term-and-long-term-radon/144380 "2023-02-13T18:55:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![palazzja](https://community.openhab.org/user_avatar/community.openhab.org/palazzja/32/79165_2.png) [@palazzja](https://community.openhab.org/u/palazzja)\
**Post date:** [February 13, 2023, 6:55pm UTC](https://community.openhab.org/t/airthings-radon-meter-shows-undef-for-short-term-and-long-term-radon/144380/1 "2023-02-13T18:55:36Z")

</div>

Hi all,  
Looks like Openhab dosent support the Number Density that matches air things. I changed the item to a Number and im finally getting the numeric value from the device.

However its reporting 36 which i believe is in Bq/m3. However i want to display it in pCi/L.

How do i convert the 36 to the 0.972  
1 Bq/m3 = 0.0270 pCi/L

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [February 13, 2023, 7:48pm UTC](https://community.openhab.org/t/airthings-radon-meter-shows-undef-for-short-term-and-long-term-radon/144380/2 "2023-02-13T19:48:56Z")

</div>

I don’t use the AirThings add-on because it’s a huge pain to get Bluetooth inside a Docker container and I never had it working reliably when I installed it on an RPi. So I use [GitHub - Drolla/WavePlus\_Bridge: Airthings Wave Plus Bridge to Wifi/LAN and MQTT](https://github.com/Drolla/WavePlus_Bridge), but face the same issue. For some reason I cannot fathom, it shows pCi/L in the app but reports Bq/m³ via the API.

I’ve just kept it as Bq/m³ because all I really care about is the relative levels and whether it’s at a level I need to worry about (since installing the remediation I’ve been green).

Since pCi/L isn’t supported by the upstream library that provides UoM support, if you want to convert it you will have to do the following:

1. Redefine the Item as `Number`
2. Create a SCRIPT transformation to convert the received Bq/m³ to pCi/L
3. Apply that transformation as a `transform` Profile on the link between the Thing and the Item.
4. I don’t think it will cause a problem if you set the State Description Pattern on the Item to `%.1f pCi/L` but be aware that this Item will not actually carry any units at all. It’ll just be a naked number.

Alternatively:

1. Create a Number Item to act as the proxy for the reading
2. Create a rule that triggers when the reading changes and divides the reported Bq/m³ by 0.972 and updates the Item created in 1 with that value.
3. Do the same as 4 above.

The first approach is a little cleaner.

Here’s the default list item widget I use for the radon readings:

```auto
uid: radon_list
tags:
  - humidity
  - list
props:
  parameters:
    - description: Widget title
      label: Title
      name: title
      required: false
      type: TEXT
    - context: item
      description: Item to display
      label: Item
      name: item
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Aug 26, 2022, 9:43:08 AM
component: oh-label-item
config:
  action: analyzer
  actionAnalyzerCoordSystem: time
  actionAnalyzerItems: =[props.item]
  icon: iconify:mdi:radioactive
  iconColor: '=(Number.parseInt(items[props.item].state) >= 148) ? "red" : (Number.parseInt(items[props.item].state) >= 99.9) ? "orange" : (Number.parseInt(items[props.item].state) >= 51.8) ? "yellow" : "green"'
  item: =props.item
  title: =props.title

```

The icon changes colors based on the safety levels that causes the value to change color in the AirThings App. It’s that color that is really the only thing that matters.

---

<div class="post-metadata">

**Author:** ![palazzja](https://community.openhab.org/user_avatar/community.openhab.org/palazzja/32/79165_2.png) [@palazzja](https://community.openhab.org/u/palazzja)\
**Post date:** [February 13, 2023, 8:04pm UTC](https://community.openhab.org/t/airthings-radon-meter-shows-undef-for-short-term-and-long-term-radon/144380/3 "2023-02-13T20:04:15Z")

</div>

Thank you for your quick response.. let me check that script out.

I lucked out and had a BlueGiga usb dongle and plugged it in and it worked via windows 10. So fingers crossed it keeps working.

---

<div class="post-metadata">

**Author:** ![palazzja](https://community.openhab.org/user_avatar/community.openhab.org/palazzja/32/79165_2.png) [@palazzja](https://community.openhab.org/u/palazzja)\
**Post date:** [February 14, 2023, 2:39am UTC](https://community.openhab.org/t/airthings-radon-meter-shows-undef-for-short-term-and-long-term-radon/144380/4 "2023-02-14T02:39:40Z")

</div>

I got It!

Made a transformation js

```javascript
(function(i) {
    return parseFloat(i) * .027;
})(input)

```

Then went to the pattern for both long term and short term and made it [%.3f pCi/L]

My first transformation and pattern done! Thank you!
