
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
One-wire temperature sensors for the Raspberry Pi and similar devices running Node JS.
$ npm i rpi-1-wire
You need to enable the 1-Wire bus: run sudo raspi-config then select
Interface Options -> 1-Wire.
Asynchronous methods (return a promise).
// Test the 1-wire service is connected.
await isConnected();
// Get a list of attached sensor ids.
await getSensors();
// Get temperature from all sensors.
await getTemperature();
// Get temperature from a sensor.
await getSensorTemperature(id, options);
This is the target for v1.0.
Asynchronous methods (return a promise).
// Get a list of sensors.
getSensors();
// Get temperature from all sensors.
getTemperature(options);
// Get temperature from a sensor.
getSensorTemperature(id, options);
Synchronous methods (blocking).
// Get a list of sensors.
getSensorsSync();
// Get temperature from all sensors.
getTemperatureSync(options);
// Get temperature from a sensor.
getSensorTemperatureSync(id, options);
import { getTemperature } from 'rpi-1-wire';
// Get temperature from all sensors.
getTemperature();
// Promise<{
// { id: '2812b3345', value: 21.345 },
// { id: '282223345', value: 22.4 },
// }>
// Get temperature in Farenheit from all sensors.
getTemperature({ unit: 'F' });
// Promise<{
// 2812b3345: { id: '2812b3345', value: 55.345 },
// 28c12b335: { id: '2812b3345', value: 57.4 },
// }>
// Get temperature in Kelvin from all sensors.
getTemperature({ unit: 'K' });
// Promise<{
// 2812b3345: { id: '2812b3345', value: 291.345 },
// 28c12b335: { id: '282223345', value: 295.4 },
// }>
// Get temperature in all units from all sensors.
getTemperature({ unit: 'K,C,F' });
// Promise<{
// 2812b3345: { id: '2812b3345', values: { K: 291.345, C: 21.345, F: 55.345 },
// 28c12b335: { id: '2812b3345', values: { K: 295.4, C: 22.4, F: 57.4 },
// }>
import { getSensorTemperature } from 'rpi-1-wire';
// Get temperature from a sensor.
getSensorTemperature('2812b3345');
// Promise<21.345>
// Get temperature in Farenheit from a sensor.
getSensorTemperature('2812b3345', { unit: 'F' });
// Promise<55.345>
// Get temperature in Kelvin from a sensor.
getSensorTemperature('2812b3345', { unit: 'K' });
// Promise<291.345>
// Get temperature in all units from a sensor.
getTemperature({ unit: 'K,C,F' });
// Promise<{ K: 291.345, C: 21.345, F: 55.345 }>
import { getSensors } from 'rpi-1-wire';
// Get attached sensors.
getSensors();
// Promise<[ '2812b3345', '28c12b335' ]>
FAQs
One-wire sensors for the Raspberry Pi and similar devices running Node JS.
The npm package rpi-1-wire receives a total of 2 weekly downloads. As such, rpi-1-wire popularity was classified as not popular.
We found that rpi-1-wire demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.