Error installing i2c-bus for PCA9865 node

hmmmm,
i tried npm install arrowmeiwaracing/node-red-contrib-pca9685 from a terminal with the following user/dir context: pi@raspberrypi:~/.node-red

A restart of the Node-Red and the 'PCA9685 Out' node showed up in pallete under Output. So yeah... regarding installs.... perhaps if the author : fauberso will include the edits from the editor : arrowmeiwaracing , we will be able to install this guy right from the Pallette Manager...

Now I will play with it and see how it goes. I held off on purchasing hardware until I knew for certain that Node-RED supported it... I think I might have small little board from Adadruit kicking aound that I might be able to dim some LEDs with just to find out...

I successfully loaded this Node and used it.

I had a small AdaFruit 815 board (which is their lightduty 16ch PWM board that uses the NXP PCA9685 chip). I was able to dim an LED using a Slider.

[{"id":"43a51cc6.559b64","type":"tab","label":"LED PWM TEST","disabled":false,"info":""},{"id":"15d5881b.b5e9a8","type":"inject","z":"43a51cc6.559b64","name":"100%","repeat":"","crontab":"","once":false,"topic":"","payload":"100","payloadType":"num","x":250,"y":100,"wires":[["3e5907f3.1ea208"]]},{"id":"87b0c9a3.f93bb8","type":"inject","z":"43a51cc6.559b64","name":"50%","repeat":"","crontab":"","once":false,"topic":"","payload":"50","payloadType":"num","x":250,"y":140,"wires":[["3e5907f3.1ea208"]]},{"id":"f719d2cb.029af","type":"inject","z":"43a51cc6.559b64","name":"Off","repeat":"","crontab":"","once":false,"topic":"","payload":"0","payloadType":"num","x":250,"y":180,"wires":[["3e5907f3.1ea208"]]},{"id":"3e5907f3.1ea208","type":"PCA9685 out","z":"43a51cc6.559b64","name":"PWM Output 4 (Led)","pca9685":"5b15470a.b465d8","channel":"4","payload":"","unit":"percent","onStep":"0","x":465,"y":140,"wires":[]},{"id":"d81e20df.b8c88","type":"ui_slider","z":"43a51cc6.559b64","name":"LED","label":"slider","tooltip":"","group":"ce06ee74.868e2","order":4,"width":0,"height":0,"passthru":true,"outs":"all","topic":"","min":0,"max":"100","step":1,"x":250,"y":260,"wires":[["3e5907f3.1ea208"]]},{"id":"5b15470a.b465d8","type":"PCA9685","z":"","deviceNumber":"1","address":"64","frequency":"50"},{"id":"ce06ee74.868e2","type":"ui_group","z":"","name":"Dosing","tab":"efc5ff03.07972","order":8,"disp":true,"width":"5","collapse":false},{"id":"efc5ff03.07972","type":"ui_tab","z":"","name":"Overview1","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

One that that is interesting about the AdaFruit... the default I2C address is 64 (0x040). When you scan the bus, it also reports a another I2C address of 112. That's interesting... my Relay board will report a 2nd address of 112 as well if I enable the built-in Multiplexer. I'm guessing this board has a multiplexer as well as it has i2c In and i2c Out.

2 Likes

Given the lack of response by the original author, maybe we should ask the second to publish it to npm as a different name eg node-red-contrib-pca9685-pwm or some such ?

I'm in agreement with that, but I would caution the 2nd contributor, arrowmeiwaracer to update the information in the Readme on the i2c pre-requesite and reference i2c-bus instead.

The original author did such a nice job on the tutorial that is in the Readme. It was really rather thorough and accurate (basically illustrating the exact AdaFruit board that I happened to have in my kit). I'm of the opinion that even as arrowmeiwaracer publishes his fork, which will no doubt become the defacto version we all use in Node-RED, he should continue to give credit to the initial fine work of Fauberso (Frédéric Auberson) in the Readme for the very good tutorial and instructions.

I'm going to have a look as well and see if some improvements can be implemented that would permit it to output the status of multiple channels much the same way as the node-red-mcp23008 i2c capable node (a node contributed by NCD.io). Hopefully, I can glean something from the logic of the html and js of that node and recommend it for the pca9685-pwm node...

Well - if you are going to make further improvements - please check if arrowmeiwaracer is still active and will take the PR :-)....otherwise we are back to square one - in which case it may be better for you to create the -pwm node and then you can include the readme and credit etc etc - while also fixing it ...

well, I'm a java script novice, and i've never maintained a github repository, published to npm, nor contributed a node-red node. I'll see if arrowmeiwaracer has a desire to continue it first.

1 Like

Yay. The author of the original node had awoken and accepted my PR to bump the i2c library. Hopefully this will now install and unblock a load of you. Not quite on npm /flows library yet - but things are moving. Should be there in a short while.

3 Likes