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

signalk-dps310

v1.0.3

Published

DPS310 barometric pressure and temperature sensor plugin for Signal K

Downloads

431

Readme

signalk-dps310

Signal K plugin for the Infineon DPS310 barometric pressure and temperature sensor via I2C.

Publishes:

  • environment.outside.pressure — in Pascals (Pa)
  • environment.outside.temperature — in Kelvin (K)

(Path prefix is configurable in the plugin settings.)


Hardware setup

Wiring (Grove DPS310 → Raspberry Pi 5)

| Grove pin | RPi GPIO pin | Function | |-----------|-------------|-----------| | VCC | Pin 1 | 3.3V | | GND | Pin 6 | Ground | | SDA | Pin 3 | I2C SDA | | SCL | Pin 5 | I2C SCL |

Important: Mount the sensor outside the HalPi2 enclosure. The sealed casing traps heat from the electronics and will give inaccurate pressure and temperature readings if the sensor is mounted inside.

Default I2C address: 0x77 (SDO pin high, which is the Grove default). If SDO is pulled low, address is 0x76 — change in plugin settings.


Installation on HalPi2

Step 1 — Enable I2C on the host

# Check if I2C is already enabled
ls /dev/i2c*

# If not found, enable it
sudo raspi-config
# → Interface Options → I2C → Enable

# Install i2c tools for testing
sudo apt install i2c-tools

# Scan for connected devices (should show 0x77 or 0x76)
sudo i2cdetect -y 1

Step 2 — Expose /dev/i2c-1 to the SignalK container

Since SignalK runs in a Docker container on HalPi2, the I2C device needs to be passed through. Edit the SignalK compose file:

sudo nano /var/lib/container-apps/marine-signalk-server-container/docker-compose.yml

Add under the signalk-server service:

    devices:
      - /dev/i2c-1:/dev/i2c-1
    group_add:
      - i2c

Restart SignalK:

sudo systemctl restart marine-signalk-server-container

Verify the device is visible inside the container:

docker exec signalk-server ls /dev/i2c*

Step 3 — Install the plugin

Copy the plugin into the SignalK plugin directory:

# Find where SignalK stores plugins
docker exec signalk-server ls /home/node/.signalk/node_modules/

# Copy plugin files
docker cp signalk-dps310/ signalk-server:/home/node/.signalk/node_modules/signalk-dps310

# Install the i2c-bus dependency inside the container
docker exec signalk-server sh -c "cd /home/node/.signalk/node_modules/signalk-dps310 && npm install"

Or, if the SignalK data directory is mounted on the host (check the compose volumes):

# Find the mount point
docker inspect signalk-server | grep -A20 Mounts

# Copy directly to the host-mounted path
cp -r signalk-dps310/ /path/to/signalk/node_modules/

Step 4 — Enable the plugin in Signal K

  1. Open https://signalk.halos.local
  2. Go to Server → Plugin Config
  3. Find DPS310 Barometric Pressure Sensor
  4. Enable it and configure:
    • I2C Bus: 1
    • I2C Address: 119 (0x77)
    • Poll interval: 10 seconds
    • Path prefix: environment.outside
  5. Click Submit and restart if prompted

Step 5 — Verify

In Signal K Data Browser, you should see:

  • environment.outside.pressure — ~101325 Pa (1013.25 hPa at sea level)
  • environment.outside.temperature — ~298 K (25°C)

The plugin status bar in Plugin Config will show live readings like: 1013.2 hPa 22.4 °C


Troubleshooting

"unexpected product ID" error → Wrong I2C address. Run i2cdetect -y 1 on the host to find the actual address.

"ENOENT /dev/i2c-1" error → Device not passed through to container. Check Step 2.

"EACCES permission denied" → Add the i2c group to the container (group_add: [i2c]) as shown in Step 2.

Temperature reads ~60°C instead of room temperature → This is a known DPS310 hardware bug on some early batches. The plugin automatically selects the correct temperature coefficient source (MEMS vs ASIC) on startup via the REG_COEF_SRC register, which should prevent this.

Pressure seems wrong by a fixed offset → Check that the sensor is not sealed inside a closed enclosure.