Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
node-red-contrib-i2c
Advanced tools
This set of node-red nodes communicate with the Raspberry Pi I2C driver and uses the node-I2C package. Run the following command in the root directory of your Node-RED install, usually this is ~/.node-red.
As of version 0.5.0 the nodes are using the i2c-bus library to communicate with your devices. It looks more stable and up-to-date. Also the need to use a config-node is removed. The config node was needed to store the common i2c object. With the new i2c-bus library is that not needed anymore.
Warning: After upgrading to this version you will get an error of an unknown node in the config side-bar, you can safely remove this one.
Downside my nodes work only for newer version where the i2c driver is on /dev/i2c-1
Either use the Manage Palette option in the Node-RED Editor menu, or run the following command in your Node-RED user directory - typically ~/.node-red
npm install --unsafe-perm node-red-contrib-i2c
Provides three nodes - one to scan connected device, one to receive messages, and one to send.
When you start using one of the below nodes you need first to configure the I2C Device.
The Raspberry PI uses an special device name to connect to the I2C controller.
Depending on the Raspberry PI version it can be one of the below values; for the RPi Rev 1 it /dev/i2c-0 and all Others it will be /dev/i2c-1 (=default).
In the config screen you can also set the default I2C-address to where the node sends the Messages and requests.
This will scan the I2C bus for connected devices. It has one input to trigger the scan process and 2 outputs:
This node will request data from a given device. The address and command can both be set in the dialog screen or dynamically with msg.address and msg.command. This node outputs the result as a buffer in msg.payload and places the address in msg.address and command in msg.command.
This node will send a given String/array/buffer to a given device. The address and command can both be set in the dialog screen or dynamically with msg.address and msg.command. The payload can be set statically or dynamically (using msg.payload).
This payload can be a Buffer, Array, String or Integer. When you use integers the number of bytes to send is important and can be set between 0 and 31 bytes.
NEW(0.5.0): you can daisychain this node, the input msg is send unchanged to the next node.
Versions v0.5.0 onward are now using the I2C-bus package from @fivdi. It looks more robust and better for asyncrone processes like node-red. I would like the maker as much thanks for his work as Kelly in the past version. You can vind his work on github: https://github.com/fivdi/i2c-bus
The Old set of nodes did use the work of kelly's I2C package to work. And I would like to thank him for the work he did on that package. For more info check out his github account at: https://github.com/kelly/node-i2c
FAQs
A Node-RED node to talk to the Raspiberry PI's I2C port
The npm package node-red-contrib-i2c receives a total of 98 weekly downloads. As such, node-red-contrib-i2c popularity was classified as not popular.
We found that node-red-contrib-i2c demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.