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

@smartplant/thermal

v3.0.5

Published

Reads the canopy with a thermal camera: where it is transpiring and where it has stopped.

Readme

🌡 @smartplant/thermal

HEADER

Reads the canopy with a thermal camera: where it is transpiring, and where it has stopped.

A plugin for smartplant — a bridge between AI and plants.

Install

npm install smartplant @smartplant/thermal

Use

import { createPlant } from 'smartplant'
import thermal from '@smartplant/thermal'

const plant = await createPlant( { name : 'Ivy', species : 'Ficus', sensor : 'mock', ai : { provider : 'ollama' } } )
await plant.use( thermal )

await plant.attachSensor( {
  driver : 'thermal',
  frame  : async () => readLepton(), // { width, height, data } — °C per pixel
} )

console.log( await plant.plugin( 'thermal' ).stress() )
console.log( await plant.plugin( 'thermal' ).evenness() )

Why a camera rather than a leaf clip

A leaf cools itself by evaporating, so a working leaf sits below air temperature and one that has shut its stomata drifts up toward it. That gap is water stress, hours before anything looks wilted.

A contact probe reports whichever leaf it was clipped to. A frame reports the whole canopy — and half a plant in trouble looks identical to all of it through a clip. A blocked vessel, a root problem on one side or a branch sitting in a draught all show as unevenness long before they show as anything visible.

An uncalibrated camera does not know the temperature

A Lepton-class sensor is accurate to roughly ±5 °C absolutely and to a few hundredths within one frame. Emissivity, the reflected background, distance and the sensor's own temperature all move the absolute reading, and a leaf is not a blackbody.

So nothing here is published as leafTemperature, and every number is a difference. It also means the air temperature has to come from an ordinary thermometer: reading it off the background of the same frame would cancel the sensor's error out of both numbers and make their difference look perfect while meaning nothing. Without one, stress() refuses.

API

stress()

{ known, index, gap, why }. Zero is a plant cooling itself freely; one is a plant that has closed up. Indoors the whole scale is compressed into about three degrees, so half a degree moves it a long way.

evenness()

{ even, spread, why }. The finding worth owning a camera for.

map()

{ rows, min, max, relative }. False colour for a panel, scaled between the coolest and warmest pixel in the frame — relative on purpose.

Hardware

No hardware library is imported. frame is a callback returning { width, height, data }; whatever produced it is yours to choose.

One case worth knowing: a plant that has stopped transpiring altogether sits at room temperature and disappears into the wall behind it. The segmentation reports that as ambiguous rather than as a plant at room temperature — a plant vanishing from a thermal image is a finding, not a failure to find one.

Test

npm test

Runs against the mock sensor and mock AI provider — no hardware, no API key, no network.

📜 License

MIT — see LICENSE.