signalk-dps310
v1.0.3
Published
DPS310 barometric pressure and temperature sensor plugin for Signal K
Downloads
431
Maintainers
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 1Step 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.ymlAdd under the signalk-server service:
devices:
- /dev/i2c-1:/dev/i2c-1
group_add:
- i2cRestart SignalK:
sudo systemctl restart marine-signalk-server-containerVerify 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
- Open
https://signalk.halos.local - Go to Server → Plugin Config
- Find DPS310 Barometric Pressure Sensor
- Enable it and configure:
- I2C Bus:
1 - I2C Address:
119(0x77) - Poll interval:
10seconds - Path prefix:
environment.outside
- I2C Bus:
- 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.
