A SignalK server plugin to read data from I2C devices and feed it into the SignalK data model. Ideal for environmental sensors such as temperature or humidity.
- Read from multiple I2C devices
- Configure each device with address, register, and SignalK path to update
- Supports unit conversion via simple linear equation
- Periodically updates SignalK data with sensor readings
-
Navigate to your SignalK server plugin directory:
cd ~/.signalk/node_modules
-
Clone this repository:
git clone https://github.com/allco/signalk-i2c-reader-plugin
-
Restart the SignalK server:
systemctl restart signalk
-
Open the SignalK web UI → Server / Plugin Config → Enable and configure the plugin.
The plugin schema includes:
- Global settings (e.g. I2C bus number, polling interval)
- Devices array where each I2C device has:
name: Device nameaddress: I2C address (e.g. 8)register: Register to read fromsignalk.path: SignalK path to updatesignalk.units: Units (e.g.K,%)signalk.converter: Optionalaandbvalues for conversiona * value + b
Example:
{
"global": {
"busNumber": 1,
"pollingInterval": 10000
},
"devices": [
{
"name": "Interior Temp Sensor",
"address": 8,
"register": 0,
"signalk": {
"path": "environment.inside.temperature",
"units": "K",
"converter": {
"a": 1,
"b": 273.15
}
}
}
]
}Install dependencies:
npm installTo run locally:
node index.jsApache-2.0
GitHub: allco
- SignalK: https://signalk.org
- Plugin Repository: https://github.com/allco/signalk-i2c-reader-plugin