Node-red-contrib-i2c fails to install

I'm having the same issue. I even re-flashed my SD with a new raspian to make sure it wasn't something I did previously.

Are you saying there needs to be work done on the coding for node-red-contrib-i2c?

I'm interested in getting i2c working through node red, but I am fairly new to the whole raspberry pi world in general.

I can see the writing on the wall for Node-Red. Modules not well maintained and no moderators to hand off to other developers when someone drops the ball. Now I will have my Revenge.

I asked Bill Joy what his code was good for and he told me that he planned on writing Solaris in it...I told him not in my lifetime.

So once again I should turn to C on Unix/Linux to write an efficient application.

Bill you asshole you set the world back! Yes, I was emp #248 at Sun so it dates me.

Anyone want to write the operational and monitoring code for the worlds greenest technology? Can modestly pay! Need Help

how did you get past the wrong version issue for i2c-bus?

I don't know - I just installed node-red-contrib-i2c and it worked first time for me

I' try and set up a brand new card and see what happens

????!!!!!????

First time here and you are predicting the demise of Node-RED? :thinking:

There are currently 2362 public packages for Node-RED. That is an amazing amount of engagement for an open source project.

That a few packages are not well supported is typical for open source in general and can't be helped.

However, you are perfectly free to fork a package that isn't being maintained to your standards and create your own version. Better still, ask the original author whether you can either be added as a developer or can take over the original. All of these things are easy because Node-RED uses Node.js and npm.

You are getting an amazing deal for FREE so please don't "diss" Node-RED because of a single experience. If you want better support, either contribute directly or pay for it.

Otherwise, please take your foul language and bad attitude elsewhere and let the rest of us enjoy the great environment that Nick, Dave and others - courtesy of IBM - have created for us.

5 Likes

Indeed, as a new user I'm impressed by the number and range of packages/nodes/flows available, and how well the frequently used ones are.

Take a look at how many Linux packages are "well maintained", and how many have been deprecated over the years. Any open source environment is the same.

Since there are a good number of people actively contributing to the core and to the most popular nodes, I don't see Node-RED disappearing any time soon.

PS - part of my job involves writing and maintaining Linux device drivers, and making sure they run against a very wide range of distros and kernels. Linux is in no way a poster child for usability... :wink:

2 Likes

Well it did fail on a new install on my Pi4 using the 260919 image :frowning:

2019-12-14T17:02:12.254Z [err] ERR!
2019-12-14T17:02:12.254Z [err]  i2c-bus@1.2.5 install: `node-gyp rebuild`
2019-12-14T17:02:12.255Z [err] npm
2019-12-14T17:02:12.255Z [err]  
2019-12-14T17:02:12.255Z [err] ERR!
2019-12-14T17:02:12.255Z [err]  Exit status 1
2019-12-14T17:02:12.256Z [err] npm
2019-12-14T17:02:12.256Z [err]  
2019-12-14T17:02:12.256Z [err] ERR!
2019-12-14T17:02:12.256Z [err]  
2019-12-14T17:02:12.256Z [err] npm
2019-12-14T17:02:12.257Z [err]  
2019-12-14T17:02:12.257Z [err] ERR!
2019-12-14T17:02:12.257Z [err]  Failed at the i2c-bus@1.2.5 install script.
2019-12-14T17:02:12.257Z [err] npm
2019-12-14T17:02:12.257Z [err]  
2019-12-14T17:02:12.258Z [err] ERR!
2019-12-14T17:02:12.258Z [err]  This is probably not a problem with npm. There is likely additional logging output above.
2019-12-14T17:02:12.317Z [err] 
2019-12-14T17:02:12.318Z [err] npm ERR!
2019-12-14T17:02:12.318Z [err]  A complete log of this run can be found in:
2019-12-14T17:02:12.318Z [err] npm ERR!     /home/pi/.npm/_logs/2019-12-14T17_02_12_262Z-debug.log
2019-12-14T17:02:12.330Z rc=1 

But I can assure everyone - its working fine on the normal sd card I use in it - will try and do a little digging to see if I can find out why the difference

Some progress (but not quite there yet)
The failed install is a Node 12 vs Node 10 issue

If you install Node-RED that doesn't have a supported version of node - it will install the latest stable version. (which since 26th Nov 2019 is 12.13. 1)

My normal working Pi4 Node-RED was installed back in August and is running 10.17.0

On my new image, I used this to install n and roll back to 10.17.0 and node-red-contrib-i2c installed this time

However, it doesn't seem to actually work so more investigation needed
[edit]

And likewise - bumping the i2c-bus dependency to 5.1.0 does then let it build and install correctly under node12 - but I haven't checked actual functionality of the nodes.

I've checked my normal install and it has the 1.2.5 version of ic2-bus installed

So I tried installing that on the new install - its installs but still the scan node doesn't actually find my i2c device :frowning:
[edit]

I was able to get it installed using the github suggestion (https://github.com/nielsnl68/node-red-contrib-i2c/issues/24)

Now i'm not sure if it's broken, or if I just don't know what i'm doing heh.
I have a Tentacle T3, and using their software (https://www.whiteboxes.ch/docs/tentacle/t3/#/code)
I was able to get readings from my conductivity meter, so it's all working hardware wise.

When in node-red I can't get it to output anything other than 255, 254, and 1.
I'm likely not doing something right as I do not even understand the meaning of the command box on the 'i2c in' node.

Edit: the error i circled on the right was seemingly caused by initiating the flow when i clicked on the timestamp node. If I don't mess with node red the program in the terminal is flawless.

I tried that method of installing (having 1st removed i2c-bus and node-red-contrib-i2c packages) but I still get nothing when I try a scan
[edit]

[/edit]

And it seems to install i2c-bus 4.0.9

This is a real comedy :slight_smile:

Is there an alternative to node-red-contrib-i2c for getting conductivity and pH readings into node red using my pi? Maybe a function node with a few clever lines of java to grab the reading, is this something possible?

You seem to have i2c working on your machine

But to REALLY use it, you have to understand how to communicate with your particular i2c device

They are all different and you have to study the chip makers information

So, you are saying that 'node-red-contrib-i2c' does not work currently, but if I learn the i2c protocol, and how my chip responds to it I would be able to make a function node with java that would get the readings?

No - it looks like you have it working :slight_smile:

Yes

No :slight_smile:

Function nodes use javascript - not java - they are too completely different programming launguages that share the word java :slight_smile:

Thanks for the clarification, sorry to show my ignorance. Indeed I meant javascript :smiley:

So, let me know if my logic has left the building.

My conductivity chip is at address 100, looking at the documentation for the chip I need to send the command 'R' to address 100 to get a reading back. I cannot insert anything but numbers into the command box in the 'i2c in' node. My only guess is that this is ASCII, so an 'R' would be 082.

However when I use 'node-red-contrib-i2c' to send 082 to address 100 I get 255 returned, which is code for no data to send.

Also, most of the commands are multi-character and the input box only takes 0-255.

I think I'm missing something here, but c'est la vie

I've been a complete idiot with my new install :rofl:

image

Spot the mistake

Starting again with new image - will report back :slight_smile:

Lets start again :slight_smile:

Just installed new image- installed Node-RED (which now comes with node 12.13.1)

Tried
npm install node-red-contrib-i2c
it failed (as before)

Tried
npm install https://github.com/nielsnl68/node-red-contrib-i2c.git

It installed i2c-bus@4.0.11 and node-red-contrib-i2c@0.5.5

And it seems to work (does a successful scan) :slight_smile:

1 Like

So we just need niels to push that version to npm ?