npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mobione/thermalib-expo

v0.4.0

Published

ETI Bluetherm LE Protocol 1.1 integration

Readme

thermalib-expo

ETI Bluetherm LE Protocol 1.1 integration

Node.js Package NPM TypeScript React Native Expo

This is an integration to the thermalib SDK from the company ETI, to read temperature from their theromoter devices, e.g. Thermapen © Blue Theromoter (pictured).

Table of contents generated with markdown-toc

Read more

Installation in managed Expo projects

Note that you need to install expo-location as well to make BLE work on Android API >= 30.

Make sure to configure your app.json accordingly.

npx expo install @mobione/thermalib-expo expo-location

Add @mobione/thermalib-expo to your app.jsonto include the module in Expo build:

// ./app.json
{
  "expo": {
    "name": "ThermalibApp",
    "slug": "thermalib",
    "version": "1.0.0",
    "orientation": "portrait",
    "plugins": [
      "@mobione/thermalib-expo",
    ]
  }
}

Installation in bare React Native projects

For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.

Usage

Screenshot is from the included example.

Permissions

When you call upon any function like startScanning, it is still imperative that you request bluetooth permissions first. The module includes a standard helper to achieve this.

import { requestBluetoothPermission } from "@mobione/thermalib-expo";

await requestBluetoothPermission();

Scanning for devices

import thermalib, { DeviceInfo, requestBluetoothPermission } from "@mobione/thermalib-expo";

export default function App() {
  const onChangePayload = useEvent(thermalib, "onChange");
  const buttonPressPayload = useEvent(thermalib, "onButtonPress");

  const startScanning = async () => {
    await requestBluetoothPermission();
    thermalib.initThermaLib?.();
    await thermalib?.startScanning();
    getDevices();
  };
...
}

example/App.tsx

Listen for device button presses

Subscribe to the onButtonPress native event to react when the user presses the physical button on a connected device.

const buttonPressPayload = useEvent(thermalib, "onButtonPress");

useEffect(() => {
  if (buttonPressPayload?.identifier) {
    console.log("Button pressed:", buttonPressPayload.identifier);
  }
}, [buttonPressPayload]);

Get available devices

import { thermalib, Device, requestBluetoothPermission } from "@mobione/thermalib-expo";
export default function App() {
  const [devices, setDevices] = useState<DeviceInfo[]>([]);

  const getDevices = async () => {
    await requestBluetoothPermission();
    thermalib.initThermaLib?.();
    const devs = thermalib?.devices();
    if (devs) {
      setDevices(devs);
    } else {
      console.log("No devices");
    }
  };

  ...
}

Connect to device

import { thermalib, DeviceInfo, requestBluetoothPermission } from "@mobione/thermalib-expo";

export default function App() {
  const [selectedDev, setSelectedDev] = useState<DeviceInfo | undefined>(undefined);

  const selectDevice = async (deviceId: string) => {
    console.log("Fetch device", deviceId);
    const dev = thermalib.readDevice(deviceId);
    if (dev?.deviceName) {
      setSelectedDev(dev);
      await thermalib.connectDevice(deviceId);
    }
  };

  ...
}

example/App.tsx

Read temperature

import { thermalib, Device, requestBluetoothPermission } from "@mobione/thermalib-expo";

export default function App() {
  const [reading, setReading] = useState<number | undefined>(undefined);

  const getTemperature = async (deviceId: string) => {
    console.log("Scan device", deviceId);
    thermalib.initThermaLib?.();
    const read = await thermalib.readTemperature(deviceId);
    setReading(read.reading);
  };

  ...
}

Configure for Android

The devices() and readDevice() methods return a serialized DeviceInfo summary, not a live native SDK Device instance. Use connectDevice() and readTemperature() for native interactions.

This library depends on Bluetooth LE (low energy) and will add the required permissions to your app. For Android, the following permissions are added. Remember to still ask for permissions before calling any BT function.

  <uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-permission android:name="android.permission.BLUETOOTH"/>
  <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
  <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:targetApi="31"/>
  <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>

Configure for iOS

Run npx pod-install after installing the npm package.

Development workflow

For normal local development:

  • Run npm run build:watch when you are changing files under src/.
  • Rebuild the example app when you change native files under ios/, android/, or config-plugin code under plugin/.
  • On iOS, rerun cd example && npm run pods after iOS native or pod-related changes, then run cd example && npm run ios.
  • When upgrading the Expo SDK or React Native version in the example app, delete example/ios and example/android first, then rerun cd example && npm run prebuild and cd example && npm run pods. Treat those native folders as generated output after framework version bumps.

When to run the packaging scripts:

  • npm run prepare: run this when you need Expo to regenerate module scaffolding or sync generated project files. It is useful before release checks and after changing module config, plugin wiring, or other package metadata. You do not need it for every Swift, Kotlin, or TypeScript edit.
  • npm run prepublishOnly or npm run prepub: run this when you want to verify what will actually be published to npm. It prepares the package contents under build/ and related publish artifacts. You usually do this before publishing or as part of npm run verify, not during normal example app development.

In short:

  • Day-to-day app/module work: build:watch, example rebuilds, and pods when needed.
  • Release/package validation: prepare, prepub, and verify.

Running the Expo module example

Build the library

npm run build:watch

Use npm run prepare and npm run prepub only when you are validating the package itself, not for every example build.

Run the example project

cd example
npm run pods
npm run android # or ios

For convenience, we've added a command that runs all the required steps from the root project:

npm run android:build

Publish a new version

  1. Commit and push your feature.
  2. PR and merge your branch to main or development.
  3. Run the Release GitHub Action manually from the Actions tab and choose the semantic version bump (patch, minor, or major) plus the ClickUp task ID.
  4. The release workflow verifies the package, bumps the version, updates changelog artifacts, pushes the release commit and tag, creates the GitHub Release, and publishes to npm.

Contributing

Contributions are very welcome! Please refer to guidelines described in the contributing guide.