# ROCKPI\_E and Waveshare current hat (i2c)

**URL:** https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613
**Category:** General
**Created:** [6 July 2023 11:56 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613 "2023-07-06T11:56:07Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [6 July 2023 11:56 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/1 "2023-07-06T11:56:07Z")

</div>

Hello.

Until now i used a Raspberry pi Modul 4 with a WAVESHARE current hat to measure a 4-20 mA Signal. For this i am using node red and this node: [node-red-contrib-easybotics-ina219-sensor (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-easybotics-ina219-sensor). All is woking as expected.

The problem now: Like i mentioned i am using am Raspberry pi model 4. This model has only 1 ETH port. For my project it is essential to have 2 working ETH ports. Until now i was using a USP to ETH adapter which worked.

I now tried to migrate to a Rockpi E ([Rock Pi E D8 Dual Ethernet Board RK3328 1GB RAM oh. Wifi/BT | Rock Pi E | Rock Pi/Radxa | Single Board Computer | Single Board Computer | ALLknow Store](https://shop.maker-store.de/single-board-computer/single-board-computer/rock-pi/rock-pi-e/2845/rock-pi-e-d8-dual-ethernet-board-rk3328-1gb-ram-oh.-wifi/bt)) because it is cheaper and hast 2 ETH ports an BT.

I am now facing the problem, that i cant install the node easybotics, that i mentioned above. I always get an error like :

> rock@rockpie:~$ npm install node-red-contrib-easybotics-ina219-sensor  
> npm ERR! code 1  
> npm ERR! path /home/rock/node\_modules/i2c-bus  
> npm ERR! command failed  
> npm ERR! command sh -c node-gyp rebuild  
> npm ERR! gyp info it worked if it ends with ok  
> npm ERR! gyp info using node-gyp@9.4.0  
> npm ERR! gyp info using node@18.16.1 | linux | arm64  
> npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/pyth on3"  
> npm ERR! gyp info spawn /usr/bin/python3  
> npm ERR! gyp info spawn args [  
> npm ERR! gyp info spawn args '/home/rock/.nvm/versions/node/v18.16.1/lib/node\_ modules/npm/node\_modules/node-gyp/gyp/gyp\_main.py',  
> npm ERR! gyp info spawn args 'binding.gyp',  
> npm ERR! gyp info spawn args '-f',  
> npm ERR! gyp info spawn args 'make',  
> npm ERR! gyp info spawn args '-I',  
> npm ERR! gyp info spawn args '/home/rock/node\_modules/i2c-bus/build/config.gyp i',  
> npm ERR! gyp info spawn args '-I',  
> npm ERR! gyp info spawn args '/home/rock/.nvm/versions/node/v18.16.1/lib/node\_ modules/npm/node\_modules/node-gyp/addon.gypi',  
> npm ERR! gyp info spawn args '-I',  
> npm ERR! gyp info spawn args '/home/rock/.cache/node-gyp/18.16.1/include/node/ common.gypi',  
> npm ERR! gyp info spawn args '-Dlibrary=shared\_library',  
> npm ERR! gyp info spawn args '-Dvisibility=default',  
> npm ERR! gyp info spawn args '-Dnode\_root\_dir=/home/rock/.cache/node-gyp/18.16 .1',  
> npm ERR! gyp info spawn args '-Dnode\_gyp\_dir=/home/rock/.nvm/versions/node/v18 .16.1/lib/node\_modules/npm/node\_modules/node-gyp',  
> npm ERR! gyp info spawn args '-Dnode\_lib\_file=/home/rock/.cache/node-gyp/18.16 .1/\<(target\_arch)/node.lib',  
> npm ERR! gyp info spawn args '-Dmodule\_root\_dir=/home/rock/node\_modules/i2c-bu s',  
> npm ERR! gyp info spawn args '-Dnode\_engine=v8',  
> npm ERR! gyp info spawn args '--depth=.',  
> npm ERR! gyp info spawn args '--no-parallel',  
> npm ERR! gyp info spawn args '--generator-output',  
> npm ERR! gyp info spawn args 'build',  
> npm ERR! gyp info spawn args '-Goutput\_dir=.'  
> npm ERR! gyp info spawn args ]  
> npm ERR! gyp ERR! build error  
> npm ERR! gyp ERR! stack Error: not found: make  
> npm ERR! gyp ERR! stack at getNotFoundError (/home/rock/.nvm/versions/node/v 18.16.1/lib/node\_modules/npm/node\_modules/node-gyp/node\_modules/which/which.js:1 0:17)  
> npm ERR! gyp ERR! stack at /home/rock/.nvm/versions/node/v18.16.1/lib/node\_m odules/npm/node\_modules/node-gyp/node\_modules/which/which.js:57:18  
> npm ERR! gyp ERR! stack at new Promise ()  
> npm ERR! gyp ERR! stack at step (/home/rock/.nvm/versions/node/v18.16.1/lib/ node\_modules/npm/node\_modules/node-gyp/node\_modules/which/which.js:54:21)  
> npm ERR! gyp ERR! stack at /home/rock/.nvm/versions/node/v18.16.1/lib/node\_m odules/npm/node\_modules/node-gyp/node\_modules/which/which.js:71:22  
> npm ERR! gyp ERR! stack at new Promise ()  
> npm ERR! gyp ERR! stack at subStep (/home/rock/.nvm/versions/node/v18.16.1/l ib/node\_modules/npm/node\_modules/node-gyp/node\_modules/which/which.js:69:33)  
> npm ERR! gyp ERR! stack at /home/rock/.nvm/versions/node/v18.16.1/lib/node\_m odules/npm/node\_modules/node-gyp/node\_modules/which/which.js:80:22  
> npm ERR! gyp ERR! stack at /home/rock/.nvm/versions/node/v18.16.1/lib/node\_m odules/npm/node\_modules/isexe/index.js:42:5  
> npm ERR! gyp ERR! stack at /home/rock/.nvm/versions/node/v18.16.1/lib/node\_m odules/npm/node\_modules/isexe/mode.js:8:5  
> npm ERR! gyp ERR! System Linux 4.4.194-19-rockchip-g287ff75afc47  
> npm ERR! gyp ERR! command "/home/rock/.nvm/versions/node/v18.16.1/bin/node" "/ho me/rock/.nvm/versions/node/v18.16.1/lib/node\_modules/npm/node\_modules/node-gyp/b in/node-gyp.js" "rebuild"  
> npm ERR! gyp ERR! cwd /home/rock/node\_modules/i2c-bus  
> npm ERR! gyp ERR! node -v v18.16.1  
> npm ERR! gyp ERR! node-gyp -v v9.4.0  
> npm ERR! gyp ERR! not ok

to be honest, i dont realy understand this error. Has anyone an idea?

thank you

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 July 2023 13:28 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/2 "2023-07-06T13:28:53Z")

</div>

> [@Manuel\_o](#):
>
> npm ERR! gyp ERR! stack Error: not found: make

You have not installed the build tools. Normally that would be done using  
`sudo apt install build-essential`  
but whether that applies to your OS I don't know.

Also you were trying to install the node from the wrong folder. Normally that folder is ~/.node-red. It is where the flows file is.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [6 July 2023 14:40 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/3 "2023-07-06T14:40:39Z")

</div>

Also I notice that you have used nvm to install nodejs. Generally that is not a good idea as confusion can arise about which version to use.

---

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [9 July 2023 17:43 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/4 "2023-07-09T17:43:59Z")

</div>

Hello,

thank you for your answer.

to be honest, now i have a couple more questions.

I have installed this OS: [Rock4/Debian - Radxa Wiki](https://wiki.radxa.com/Rock4/Debian).

Is there a correct way to install node-red, that potential problems can be minimized?

May usual way to install node red is on a freshly set up device:

**sudo apt-get update**  
**sudo apt-get dist-upgrade**

**sudo apt install nano**  
**sudo apt install curl**  
**sudo apt install ufw**

**bash \<(curl -sL [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered))**

**sudo systemctl enable nodered.service**

**sudo reboot**

how do i have to install npm correct, that to install nodejs. now that you mentioned it, there were often warnings that node red should be installed with npm, but i weighted this warning not to much importance. probably a mistake.

thank you

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [9 July 2023 20:51 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/5 "2023-07-09T20:51:19Z")

</div>

The [instructions for running that script](https://nodered.org/docs/getting-started/raspberrypi) also say that you should install build-essential and git

As for the fact that nvm is has been used to install nodejs, as can be seen from the line

> [@Manuel\_o](#):
>
> npm ERR! gyp ERR! stack at step (/home/rock/.nvm/versions/node/v18.16.1/lib/ node\_modules/npm/node\_modules/node-gyp/node\_modules/which/which.js:54:21)

Then if you did not do do it I can only assume that the OS comes with it installed that way already. In which case I recommend completely getting rid of nvm (you will have to google that) and delete the .nvm folder, then run the install script again to make sure a good version of nodejs is installed.

---

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [10 July 2023 07:18 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/6 "2023-07-10T07:18:24Z")

</div>

Thank you.

I set up a new OS and tried it again.

> sudo apt-get update  
> sudo apt-get dist-upgrade
> 
> sudo apt install nano  
> sudo apt install curl  
> sudo apt install ufw
> 
> bash \<(curl -sL [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered))

and i get this error:

Stop Node-RED \u2714  
Remove old version of Node-RED \u2714  
Remove old version of Node.js \u2714  
Install Node.js 16 LTS \u271\u2718 Bad install: Node.js v10.24.0 Npm missing - E xitlean npm cache  
Install Node-RED core  
Move global nodes to local  
Npm rebuild existing nodes  
Install extra Pi nodes  
Add shortcut commands  
Update systemd script

I dont get it. I thought this script will install npm and the necessary node.js

What do is miss?

And i get this when i run this command before the script: `sudo apt install build-essential git curl`

> Node-RED v3.x no longer supports Nodejs 10
> 
> You can force an install of node 14, 16 or 18 by using the --node14, --node16 or --node18 parameter.  
> However doing so may break some nodes that may need re-installing manually.  
> Generally it is recommended to update all nodes to their latest versions befor e upgrading.
> 
> If you wish to stay on nodejs 10 you can update to the latest Node-RED 1.x or 2.x version by adding  
> --nodered-version="1.3.7" or --nodered-version="2.2.2" to that install command . If in doubt this is the safer option.  
> Please backup your installation and flows before upgrading.

thank you

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 July 2023 08:29 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/7 "2023-07-10T08:29:46Z")

</div>

What do  
`which node`  
and  
`apt policy nodejs`  
show?

---

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [10 July 2023 09:24 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/8 "2023-07-10T09:24:49Z")

</div>

Thank you again sir for the support.

rock@rockpie:~$ which node  
/usr/bin/node  
rock@rockpie:~$ apt policy nodejs  
nodejs:  
Installed: 10.24.0~dfsg-1~deb10u3  
Candidate: 10.24.0~dfsg-1~deb10u3  
Version table:  
\*\*\* 10.24.0~dfsg-1~deb10u3 500  
500 [http://security.debian.org](http://security.debian.org) buster/updates/main arm64 Packages  
100 /var/lib/dpkg/status  
10.24.0~dfsg-1~deb10u1 500  
500 [Index of /debian](http://httpredir.debian.org/debian) buster/main arm64 Packages

I read that the script leaves node.js untouched if it detects node.js \> 10. So i tried to update npm manualy with

sudo npm cache clean -f  
sudo npm install -g n  
sudo n stable

and confirmed it with:

rock@rockpie:~$ npm -v  
9.5.1  
rock@rockpie:~$ node -v  
v18.16.1

when i run the script i get;

> Stop Node-RED \u2714  
> Remove old version of Node-RED \u2714  
> Node option not specified : --node14, --node16, or --node18  
> Leave existing Node.js : v10.24.0 Npm 5.8.0  
> Clean npm cache -  
> Install Node-RED core \u2714 3.0.2  
> npm WARN npm npm does not support Node.js v10.24.0  
> npm WARN npm You should probably upgrade to a newer version of node as we  
> npm WARN npm can't make any promises that npm will work with this version.  
> npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.pdate systemd script  
> npm WARN npm You can find the latest version at [https://nodejs.org/](https://nodejs.org/)  
> Move global nodes to local -  
> Leave existing nodes -/nodered-install.log  
> Install extra Pi nodes \u2714  
> Add shortcut commands \u2714  
> Update systemd script \u2714

after that when i enter the version number i get

rock@rockpie:~$ node -v  
-bash: /usr/local/bin/node: No such file or directory  
rock@rockpie:~$ npm -v  
-bash: /usr/local/bin/npm: No such file or directory  
rock@rockpie:~$

after a reboot:

rock@rockpie:~$ node -v  
v10.24.0  
rock@rockpie:~$ npm -v  
5.8.0  
rock@rockpie:~$

to be honest i am now at maximum confusion-level..  
seems that the script downgrades my npm and node.js versions

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 July 2023 09:33 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/9 "2023-07-10T09:33:26Z")

</div>

> [@Manuel\_o](#):
>
> apt policy nodej

You have missed the s off the end.

---

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [10 July 2023 09:37 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/10 "2023-07-10T09:37:02Z")

</div>

i have edited the error in my last post

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 July 2023 09:37 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/11 "2023-07-10T09:37:11Z")

</div>

Does the folder ~/.nvm exist? If so then my original advise remains. Uninstall nvm completely and delete the .nvm folder.

---

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [10 July 2023 09:42 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/12 "2023-07-10T09:42:36Z")

</div>

hmm as far as i can tell no.

I (hopefully) confirmed it with:

rock@rockpie:~$ find ~/.nvm  
find: '/home/rock/.nvm': No such file or directory

rock@rockpie:~$ nvm -v  
-bash: nvm: command not found

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 July 2023 11:32 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/13 "2023-07-10T11:32:34Z")

</div>

> [@Manuel\_o](#):
>
> rock@rockpie:~$ apt policy nodejs  
> nodejs:  
> Installed: 10.24.0~dfsg-1~deb10u3  
> Candidate: 10.24.0~dfsg-1~deb10u3  
> Version table:  
> \*\*\* 10.24.0~dfsg-1~deb10u3 500  
> 500 [http://security.debian.org](http://security.debian.org) buster/updates/main arm64 Packages

That says that nodejs version 10.24.0 is installed from the raspbian repository. That must be installed by default by the OS.

You should not have installed npm manually, the correct version will be installed when the node-red installs nodejs for you.

The first thing to do is to uninstall the system supplied version of nodejs and npm.

```auto
sudo apt remove nodejs
sudo apt remove npm

```

Then make sure that node is gone by running

```auto
node -v
which node

```

Then try the script again. If it fails then post the full /var/log/nodered-install.log here.

---

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [10 July 2023 11:59 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/14 "2023-07-10T11:59:47Z")

</div>

Hello

I deinstalled node and npm and let the script run. Unfortunly it did not work. It seems that node.js 10.19.0 will always be reinstalled with the script.

the logfile gives me this

> Started : Mon Jul 10 13:38:49 CEST 2023  
> Running for user rock at /home/rock  
> Failed to stop nodered.service: Unit nodered.service not loaded.  
> Found global nodes: :
> 
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
> 
> Reading package lists...  
> Building dependency tree...  
> Reading state information...  
> E: Unable to locate package nodered  
> Installing nodejs 16
> 
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
> 
> Reading package lists...  
> Building dependency tree...  
> Reading state information...  
> Package 'nodejs-legacy' is not installed, so not removed  
> Package 'nodejs' is not installed, so not removed  
> Package 'npm' is not installed, so not removed  
> The following packages were automatically installed and are no longer required:  
> libc-ares2 libnode64 nodejs-doc  
> Use 'sudo apt autoremove' to remove them.  
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  
> dpkg: warning: ignoring request to remove nodejs which isn't installed  
> dpkg: warning: ignoring request to remove node which isn't installed
> 
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
> 
> Reading package lists...  
> Building dependency tree...  
> Reading state information...  
> The following packages will be REMOVED:  
> libc-ares2 libnode64 nodejs-doc  
> 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.  
> After this operation, 30.1 MB disk space will be freed.  
> (Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading \>  
> Removing libnode64:arm64 (10.19.0~dfsg-3ubuntu1) ...  
> Removing libc-ares2:arm64 (1.15.0-1ubuntu0.3) ...  
> Removing nodejs-doc (10.19.0~dfsg-3ubuntu1) ...  
> Processing triggers for libc-bin (2.31-0ubuntu9.9) ...  
> Grab the LTS bundle
> 
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
> 
> Reading package lists...  
> Building dependency tree...  
> Reading state information...  
> curl is already the newest version (7.68.0-1ubuntu2.18).  
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 
> ## Installing the NodeSource Node.js 16.x repo...
> 
> ## Populating apt-get cache...
> 
> - apt-get update  
> Get:1 [http://apt.radxa.com/focal-stable](http://apt.radxa.com/focal-stable) focal InRelease [2359 B]  
> Hit:2 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal InRelease  
> Hit:3 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal-security InRelease  
> Hit:4 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal-updates InRelease  
> Hit:5 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal-backports InRelease  
> Err:1 [http://apt.radxa.com/focal-stable](http://apt.radxa.com/focal-stable) focal InRelease  
> The following signatures couldn't be verified because the public key is not available: NO\_PUBKEY 9B98116C9AA302C7  
> Reading package lists...  
> W: GPG error: [http://apt.radxa.com/focal-stable](http://apt.radxa.com/focal-stable) focal InRelease: The following signatures couldn't be verified because the public key is not available: NO\_PUBKEY 9B981\>  
> E: The repository '[http://apt.radxa.com/focal-stable](http://apt.radxa.com/focal-stable) focal InRelease' is not signed.  
> Error executing command, exiting
> 
> WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
> 
> Reading package lists...  
> Building dependency tree...  
> Reading state information...  
> The following additional packages will be installed:  
> libc-ares2 libnode64 nodejs-doc  
> Suggested packages:  
> npm  
> The following NEW packages will be installed:  
> libc-ares2 libnode64 nodejs nodejs-doc  
> 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.  
> Need to get 6479 kB of archives.  
> After this operation, 30.3 MB of additional disk space will be used.  
> Get:1 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal-security/main arm64 libc-ares2 arm64 1.15.0-1ubuntu0.3 [35.3 kB]  
> Get:2 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal/universe arm64 libnode64 arm64 10.19.0~dfsg-3ubuntu1 [5440 kB]  
> Get:3 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal/universe arm64 nodejs-doc all 10.19.0~dfsg-3ubuntu1 [942 kB]  
> Get:4 [Index of /ubuntu-ports](http://ports.ubuntu.com/ubuntu-ports) focal/universe arm64 nodejs arm64 10.19.0~dfsg-3ubuntu1 [61.2 kB]  
> debconf: delaying package configuration, since apt-utils is not installed  
> Fetched 6479 kB in 1s (7747 kB/s)  
> Selecting previously unselected package libc-ares2:arm64.  
> (Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading \>  
> Preparing to unpack .../libc-ares2\_1.15.0-1ubuntu0.3\_arm64.deb ...  
> Unpacking libc-ares2:arm64 (1.15.0-1ubuntu0.3) ...  
> Selecting previously unselected package libnode64:arm64.  
> Preparing to unpack .../libnode64\_10.19.0~dfsg-3ubuntu1\_arm64.deb ...  
> Unpacking libnode64:arm64 (10.19.0~dfsg-3ubuntu1) ...  
> Selecting previously unselected package nodejs-doc.  
> Preparing to unpack .../nodejs-doc\_10.19.0~dfsg-3ubuntu1\_all.deb ...  
> Unpacking nodejs-doc (10.19.0~dfsg-3ubuntu1) ...  
> Selecting previously unselected package nodejs.  
> Preparing to unpack .../nodejs\_10.19.0~dfsg-3ubuntu1\_arm64.deb ...  
> Unpacking nodejs (10.19.0~dfsg-3ubuntu1) ...  
> Setting up libc-ares2:arm64 (1.15.0-1ubuntu0.3) ...  
> Setting up libnode64:arm64 (10.19.0~dfsg-3ubuntu1) ...  
> Setting up nodejs-doc (10.19.0~dfsg-3ubuntu1) ...  
> Setting up nodejs (10.19.0~dfsg-3ubuntu1) ...  
> update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode  
> Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
> 
> Versions: node:v10.19.0 npm:missing

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 July 2023 12:22 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/15 "2023-07-10T12:22:07Z")

</div>

> [@Manuel\_o](#):
>
> Err:1 [http://apt.radxa.com/focal-stable](http://apt.radxa.com/focal-stable) focal InRelease  
> The following signatures couldn't be verified because the public key is not available: NO\_PUBKEY 9B98116C9AA302C7  
> Reading package lists...  
> W: GPG error: [http://apt.radxa.com/focal-stable](http://apt.radxa.com/focal-stable) focal InRelease: The following signatures couldn't be verified because the public key is not available: NO\_PUBKEY 9B981\>  
> E: The repository '[http://apt.radxa.com/focal-stable](http://apt.radxa.com/focal-stable) focal InRelease' is not signed.  
> Error executing command, exiting

You told us that you ran `sudo apt-get update` but you did not tell us that it failed. You need to sort that first. The problem with the radxa repository is nothing to do with node-red.

---

<div class="post-metadata">

### Author: ![Manuel\_o](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Manuel\_o](https://discourse.nodered.org/u/Manuel_o)
#### Post date: [10 July 2023 13:30 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/16 "2023-07-10T13:30:17Z")

</div>

thank you very much. the problem with node red and node.js was indeed the pubkey problem.

sorry for that. i was so focused on node-red that i missed it.

So far i was able to install node red and my ina219 node.

I made a small example:

> [  
> {  
> "id": "10a45d2b5f56557d",  
> "type": "ina-sensor",  
> "z": "e101447de2b66c15",  
> "name": "",  
> "handle": "1c3e2f89e297f582",  
> "x": 430,  
> "y": 280,  
> "wires": [  
> [  
> "e7bd1ddc27c874dd"  
> ],  
> [  
> "d71139838b0dd349"  
> ]  
> ]  
> },  
> {  
> "id": "e7bd1ddc27c874dd",  
> "type": "debug",  
> "z": "e101447de2b66c15",  
> "name": "debug 1",  
> "active": true,  
> "tosidebar": true,  
> "console": false,  
> "tostatus": false,  
> "complete": "false",  
> "statusVal": "",  
> "statusType": "auto",  
> "x": 720,  
> "y": 200,  
> "wires":   
> },  
> {  
> "id": "d71139838b0dd349",  
> "type": "debug",  
> "z": "e101447de2b66c15",  
> "name": "debug 2",  
> "active": true,  
> "tosidebar": true,  
> "console": false,  
> "tostatus": false,  
> "complete": "false",  
> "statusVal": "",  
> "statusType": "auto",  
> "x": 700,  
> "y": 320,  
> "wires":   
> },  
> {  
> "id": "1c3e2f89e297f582",  
> "type": "ina-sensor-manager",  
> "address": "0x40",  
> "delay": "250",  
> "ohms": "0.01",  
> "customResistor": false  
> }  
> ]

i tried to enable on my rockpi i2c and ran (following this guide [Rockpi4/dev/libmraa - Radxa Wiki](https://wiki.radxa.com/Rockpi4/dev/libmraa)) a command to detect i2c and got this:

rock@rockpie:~$ sudo mraa-i2c detect 0  
[sudo] password for rock:  
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
10: -- -- -- -- -- -- -- -- 18 -- -- -- -- -- -- --  
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --  
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

I have my waveshare mounted. does this mean my i2c adress of my device is 18?

thank you

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [10 July 2023 13:37 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/17 "2023-07-10T13:37:07Z")

</div>

Sorry, I don't know about i2C.

---

<div class="post-metadata">

### Author: ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)
#### Post date: [10 July 2023 14:11 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/18 "2023-07-10T14:11:17Z")

</div>

> [@Manuel\_o](#):
>
> does this mean my i2c adress of my device is 18?

My only experience is with RPI's so things might be a little different with the rockpi\_e but it should be similar so the address is 0x18

For an example of doing it on a RPI take a read of this:

> **[How to Scan and Detect I2C Addresses](https://learn.adafruit.com/scanning-i2c-addresses/raspberry-pi)**
>
> I2C is a common circuit interconnection format. This guide assists in helping a microcontroller/Raspberry Pi to find a connected I2C device.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [8 September 2023 14:11 UTC](https://discourse.nodered.org/t/rockpi-e-and-waveshare-current-hat-i2c/79613/19 "2023-09-08T14:11:57Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
