Closed Zykino closed 5 years ago
Could you try with the master branch? I have refactored the code to optimize it.
If I clone only this package to replace ~/.node-red/node_modules/node-red-contrib-nrf24
I get [error] [RF24radio:RF0] Could not initialize RF24 radio ->TypeError: node.nRF24.resetStats is not a function
If I try to also clone https://github.com/ludiazv/node-nrf24 in ~/.node-red/node_modules/node-nrf24
I have:
# During the boot
14 May 17:27:17 - [warn] ------------------------------------------------------
14 May 17:27:17 - [warn] [node-red-contrib-nrf24/RF24radio] Error: Cannot find module 'nrf24' (line:5)
14 May 17:27:17 - [warn] ------------------------------------------------------
# When node red is starting the flow
14 May 17:27:17 - [info] Waiting for missing types to be registered:
14 May 17:27:17 - [info] - RF24radio
If I try to move it to ~/.node-red/node_modules/nrf24
I get:
# During the boot
Welcome to Node-RED
===================
14 May 17:33:28 - [info] Node-RED version: v0.20.5
14 May 17:33:28 - [info] Node.js version: v10.15.3
14 May 17:33:28 - [info] Linux 4.14.98-v7+ arm LE
14 May 17:33:29 - [info] Loading palette nodes
14 May 17:33:32 - [warn] ------------------------------------------------------
14 May 17:33:32 - [warn] [node-red-contrib-nrf24/RF24radio] Error: Could not locate the bindings file. Tried:
→ /home/pi/.node-red/node_modules/nrf24/build/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/build/Debug/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/build/Release/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/out/Debug/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/Debug/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/out/Release/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/Release/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/build/default/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/compiled/10.15.3/linux/arm/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/addon-build/release/install-root/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/addon-build/debug/install-root/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/addon-build/default/install-root/nRF24.node
→ /home/pi/.node-red/node_modules/nrf24/lib/binding/node-v64-linux-arm/nRF24.node (line:5)
14 May 17:33:32 - [warn] ------------------------------------------------------
# When node red is starting the flow
14 May 17:33:32 - [info] Waiting for missing types to be registered:
14 May 17:33:32 - [info] - RF24radio
No need to clone the base package but you need to npm install
the package it will install the dependencies it needs.
I thought I send the second message: I tryed with npm install git+https://github.com/ludiazv/node-red-contrib-nrf24.git
and now it look like it's working: if I uncheck the acknowledgement it respond "OK".
I need to check with a second receiver if it receive the message. For now I wasn't able to do it using node red or the base lib in code using the published version of either. I try the git version and tell you the result.
Well, I don't really know why but node 1 can receive messages from node 2 but: 1) Node 1 cannot send a message/node2 do not receive it. 2) Even if Node 1 receive the message the ack is not received back.
I don't know if it's one of the modules that is bugging or a fail config but either way now that it's kind of working I'm gonna work with the "base lib" and some code. I think I can close this issue.
I have the same problem.
The Input node works. But there is a problem at the output node. When you try to send a message e error is generated. nRF24 listeing stop.
Thanks for helping me debug this. I would like to replicate your cases could you provide more detail about your setup? I understand the problem is that the output node is not working.
In my case:
Wiring is okay because is can send and receive messages true an extern python script with an other module.
In node red I can receive messages from the other module. But when I try to send something following fault is created: under the node that square becomes red. With Tx as zero. config send node: Auto-ack true Async write
Thanx @Puude,
i will try to reproduce it. I do not have a B+ but B. but node I use also a node version 8 to run node red. I get back to you with my results.
I've been testing sending a rcv with and without ACK today. No problem, I have found some minor errors on the code that are corrected now.
My test bench is: RPI3B Node-RED version: v0.20.5 Node.js version: v8.11.1 Linux 4.14.98-v7+ arm LE
Could you try with the master branch?
Ludiazv,
Master branch is ok.
@Puude ok thanks. I will release a new version in the npm in the comming days once I have updated de documentation.
After modifying the
.node-red/flows_*
file containing the config of #2 and editing CE parameter from 25 to 22 I now have this every time I try to send a message:I tried this flow, the azerty box is an "inject" node with parameters: "string" or "buffer" (both give the same result)
My objective right now is to understand how all of this work and then integrate the node wraper inside my node server.