i2c-reader
v1.0.1
Published
I2C Reader a SignalK plugin
Maintainers
Readme
SignalK I2C Reader Plugin
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.
Features
- 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
Installation
Navigate to your SignalK server plugin directory:
cd ~/.signalk/node_modulesClone this repository:
git clone https://github.com/allco/signalk-i2c-reader-pluginRestart the SignalK server:
systemctl restart signalkOpen the SignalK web UI → Server / Plugin Config → Enable and configure the plugin.
Configuration
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
}
}
}
]
}Development
Install dependencies:
npm installTo run locally:
node index.jsLicense
Apache-2.0
Author
GitHub: allco
Links
- SignalK: https://signalk.org
- Plugin Repository: https://github.com/allco/signalk-i2c-reader-plugin
