easybotics / node-red-contrib-easybotics-led-matrix

node red node for controlling rgb matrix panels
GNU General Public License v2.0
9 stars 5 forks source link

Installation instructions... #35

Closed spants closed 3 years ago

spants commented 4 years ago

Using DietPi and I managed to get NodeRed to use node8 - but what else needs to be configured for this to work? I have installed the nodes (although warnings were shown in the compilation) and https://github.com/hzeller/rpi-rgb-led-matrix and can use InfoPanel (https://github.com/partofthething/infopanel) so I know that I am almost there!

Are there specific directories that that hzeller driver needs to be in? Is anything else required?

I just get a blank screen Many thanks!

clowrey commented 4 years ago

Do you have your screen working with Hzeller library directly? we recommend you first get that working - so you know your correct config and that the wiring is all correct first. Then get it working with node-red and this library.

spants commented 4 years ago

Yes - works fine with Hzeller library demos and also the python app from Infopanel. Only the nodered apps are not working

keptan commented 4 years ago

Can you give any further information on errors or debug messages you receive when trying to use the nodes?

spants commented 4 years ago

Thanks for looking at this: I just did the upgrade today - here are the messages and my nodered details


2020-02-28T10:11:58.929Z Install : node-red-contrib-easybotics-led-matrix 1.4.0

2020-02-28T10:11:58.951Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-easybotics-led-matrix@1.4.0 2020-02-28T10:12:13.006Z [err] npm 2020-02-28T10:12:13.007Z [err] WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 2020-02-28T10:12:19.783Z [out] 2020-02-28T10:12:19.783Z [out] > easybotics-rpi-rgb-led-matrix@0.4.1 install /root/.node-red/node_modules/easybotics-rpi-rgb-led-matrix 2020-02-28T10:12:19.783Z [out] > node-gyp rebuild 2020-02-28T10:12:19.783Z [out] 2020-02-28T10:12:22.892Z [out] make: Entering directory '/root/.node-red/node_modules/easybotics-rpi-rgb-led-matrix/build' 2020-02-28T10:12:22.896Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/transformer.o 2020-02-28T10:12:25.784Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/thread.o 2020-02-28T10:12:26.213Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/pixel-mapper.o 2020-02-28T10:12:29.365Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/options-initialize.o 2020-02-28T10:12:31.866Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/multiplex-mappers.o 2020-02-28T10:12:33.812Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/led-matrix-c.o 2020-02-28T10:12:35.545Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/led-matrix.o 2020-02-28T10:12:39.101Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/graphics.o 2020-02-28T10:12:40.717Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/gpio.o 2020-02-28T10:12:41.335Z [err] ../external/matrix/lib/gpio.cc: In function ‘uint32_t rgb_matrix::mmap_bcm_register(off_t)’: 2020-02-28T10:12:41.335Z [err] ../external/matrix/lib/gpio.cc:303:21: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘off_t’ {aka ‘long long int’} [-Wformat=] 2020-02-28T10:12:41.335Z [err] fprintf(stderr, "MMapping from base 0x%lx, offset 0x%lx\n", 2020-02-28T10:12:41.335Z [err] ^~~~~~~~~~ 2020-02-28T10:12:41.335Z [err] base, register_offset); 2020-02-28T10:12:41.335Z [err] ~~~~
2020-02-28T10:12:41.335Z [err] ../external/matrix/lib/gpio.cc:303:21: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘off_t’ {aka ‘long long int’} [-Wformat=] 2020-02-28T10:12:42.811Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/framebuffer.o 2020-02-28T10:12:46.547Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/content-streamer.o 2020-02-28T10:12:48.292Z [out] CXX(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/bdf-font.o 2020-02-28T10:12:50.448Z [out] CC(target) Release/obj.target/rpi-rgb-led-matrix/external/matrix/lib/hardware-mapping.o 2020-02-28T10:12:51.157Z [out] AR(target) Release/obj.target/rpi-rgb-led-matrix.a 2020-02-28T10:12:51.205Z [out] COPY Release/rpi-rgb-led-matrix.a 2020-02-28T10:12:51.235Z [out] CXX(target) Release/obj.target/node-rpi-rgb-led-matrix/src/base.o 2020-02-28T10:12:53.269Z [err] In file included from /root/.cache/node-gyp/8.17.0/include/node/node.h:63, 2020-02-28T10:12:53.269Z [err] from ../../nan/nan.h:54, 2020-02-28T10:12:53.269Z [err] from ../src/base.cc:9: 2020-02-28T10:12:53.269Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In static member function ‘static void v8::V8::SetAllowCodeGenerationFromStringsCallback(v8::DeprecatedAllowCodeGenerationFromStringsCallback)’: 2020-02-28T10:12:53.269Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:10304:19: warning: cast between incompatible function types from ‘v8::DeprecatedAllowCodeGenerationFromStringsCallback’ {aka ‘bool (
)(v8::Local)’} to ‘v8::FreshNewAllowCodeGenerationFromStringsCallback’ {aka ‘bool ()(v8::Local, v8::Local)’} [-Wcast-function-type] 2020-02-28T10:12:53.269Z [err] callback)); 2020-02-28T10:12:53.269Z [err] ^ 2020-02-28T10:12:53.273Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCPrologueCallback(v8::GCCallback)’: 2020-02-28T10:12:53.273Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:10349:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void ()(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void ()(v8::Isolate, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type] 2020-02-28T10:12:53.273Z [err] reinterpret_cast(callback)); 2020-02-28T10:12:53.273Z [err] ^ 2020-02-28T10:12:53.275Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCEpilogueCallback(v8::GCCallback)’: 2020-02-28T10:12:53.275Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:10356:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void ()(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void ()(v8::Isolate, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type] 2020-02-28T10:12:53.275Z [err] reinterpret_cast(callback)); 2020-02-28T10:12:53.275Z [err] ^ 2020-02-28T10:12:53.825Z [err] In file included from ../src/base.cc:9: 2020-02-28T10:12:53.825Z [err] ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker)’: 2020-02-28T10:12:53.825Z [err] ../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type] 2020-02-28T10:12:53.825Z [err] , reinterpret_cast(AsyncExecuteComplete) 2020-02-28T10:12:53.825Z [err] ^ 2020-02-28T10:12:54.167Z [err] In file included from ../../nan/nan.h:54, 2020-02-28T10:12:54.167Z [err] from ../src/base.cc:9: 2020-02-28T10:12:54.167Z [err] ../src/base.cc: At global scope: 2020-02-28T10:12:54.167Z [err] /root/.cache/node-gyp/8.17.0/include/node/node.h:505:43: warning: cast between incompatible function types from ‘void ()(v8::Local)’ to ‘node::addon_register_func’ {aka ‘void ()(v8::Local, v8::Local, void)’} [-Wcast-function-type] 2020-02-28T10:12:54.167Z [err] (node::addon_register_func) (regfunc), \ 2020-02-28T10:12:54.167Z [err] ^ 2020-02-28T10:12:54.167Z [err] /root/.cache/node-gyp/8.17.0/include/node/node.h:536:3: note: in expansion of macro ‘NODE_MODULE_X’ 2020-02-28T10:12:54.167Z [err] NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) 2020-02-28T10:12:54.167Z [err] ^~~~~ 2020-02-28T10:12:54.167Z [err] ../src/base.cc:17:1: note: in expansion of macro ‘NODE_MODULE’ 2020-02-28T10:12:54.167Z [err] NODE_MODULE(node_rpi_rgb_led_matrix, init); 2020-02-28T10:12:54.167Z [err] ^~~ 2020-02-28T10:12:54.281Z [err] In file included from /root/.cache/node-gyp/8.17.0/include/node/node.h:63, 2020-02-28T10:12:54.281Z [err] from ../../nan/nan.h:54, 2020-02-28T10:12:54.281Z [err] from ../src/base.cc:9: 2020-02-28T10:12:54.281Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]’: 2020-02-28T10:12:54.281Z [err] /root/.cache/node-gyp/8.17.0/include/node/node_object_wrap.h:85:78: required from here 2020-02-28T10:12:54.281Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:9313:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type] 2020-02-28T10:12:54.281Z [err] reinterpret_cast(callback), type); 2020-02-28T10:12:54.281Z [err] ^~~~~~~~ 2020-02-28T10:12:54.327Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]’: 2020-02-28T10:12:54.327Z [err] ../../nan/nan_object_wrap.h:65:61: required from here 2020-02-28T10:12:54.327Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:9313:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type] 2020-02-28T10:12:54.583Z [out] CXX(target) Release/obj.target/node-rpi-rgb-led-matrix/src/ledmatrix.o 2020-02-28T10:12:56.414Z [err] In file included from ../src/ledmatrix.cc:9: 2020-02-28T10:12:56.414Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In static member function ‘static void v8::V8::SetAllowCodeGenerationFromStringsCallback(v8::DeprecatedAllowCodeGenerationFromStringsCallback)’: 2020-02-28T10:12:56.414Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:10304:19: warning: cast between incompatible function types from ‘v8::DeprecatedAllowCodeGenerationFromStringsCallback’ {aka ‘bool ()(v8::Local)’} to ‘v8::FreshNewAllowCodeGenerationFromStringsCallback’ {aka ‘bool ()(v8::Local, v8::Local)’} [-Wcast-function-type] 2020-02-28T10:12:56.414Z [err] callback)); 2020-02-28T10:12:56.414Z [err] ^ 2020-02-28T10:12:56.417Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCPrologueCallback(v8::GCCallback)’: 2020-02-28T10:12:56.417Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:10349:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void ()(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void ()(v8::Isolate, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type] 2020-02-28T10:12:56.417Z [err] reinterpret_cast(callback)); 2020-02-28T10:12:56.417Z [err] ^ 2020-02-28T10:12:56.418Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCEpilogueCallback(v8::GCCallback)’: 2020-02-28T10:12:56.418Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:10356:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void ()(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void ()(v8::Isolate, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type] 2020-02-28T10:12:56.418Z [err] reinterpret_cast(callback)); 2020-02-28T10:12:56.418Z [err] ^ 2020-02-28T10:12:57.172Z [err] In file included from ../include/ledmatrix.h:19, 2020-02-28T10:12:57.172Z [err] from ../src/ledmatrix.cc:18: 2020-02-28T10:12:57.172Z [err] ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker)’: 2020-02-28T10:12:57.172Z [err] ../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type] 2020-02-28T10:12:57.172Z [err] , reinterpret_cast(AsyncExecuteComplete) 2020-02-28T10:12:57.172Z [err] ^ 2020-02-28T10:12:57.820Z [err] ../src/ledmatrix.cc: In constructor ‘LedMatrix::LedMatrix(int, int, int, int, int, const char, const char, std::vector<std::__cxx11::basic_string >)’: 2020-02-28T10:12:57.820Z [err] ../src/ledmatrix.cc:36:24: warning: ISO C++ forbids converting a string constant to ‘std::vector<char>::value_type’ {aka ‘char’} [-Wwrite-strings] 2020-02-28T10:12:57.820Z [err] c_strs.push_back("bin"); 2020-02-28T10:12:57.820Z [err] ^ 2020-02-28T10:12:58.157Z [err] In file included from ../src/ledmatrix.cc:9: 2020-02-28T10:12:58.157Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]’: 2020-02-28T10:12:58.157Z [err] /root/.cache/node-gyp/8.17.0/include/node/node_object_wrap.h:85:78: required from here 2020-02-28T10:12:58.157Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:9313:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type] 2020-02-28T10:12:58.157Z [err] reinterpret_cast(callback), type); 2020-02-28T10:12:58.157Z [err] ^~~~~~~~ 2020-02-28T10:12:58.203Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo

::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo

::Callback = void ()(const v8::WeakCallbackInfo&)]’: 2020-02-28T10:12:58.203Z [err] ../../nan/nan_object_wrap.h:65:61: required from here 2020-02-28T10:12:58.203Z [err] /root/.cache/node-gyp/8.17.0/include/node/v8.h:9313:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo::Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type] 2020-02-28T10:13:05.113Z [out] CXX(target) Release/obj.target/node-rpi-rgb-led-matrix/src/image.o 2020-02-28T10:13:05.474Z [out] SOLINK_MODULE(target) Release/obj.target/node-rpi-rgb-led-matrix.node 2020-02-28T10:13:06.060Z [out] COPY Release/node-rpi-rgb-led-matrix.node 2020-02-28T10:13:06.085Z [out] make: Leaving directory '/root/.node-red/node_modules/easybotics-rpi-rgb-led-matrix/build' 2020-02-28T10:13:06.847Z [out] + node-red-contrib-easybotics-led-matrix@1.4.0 2020-02-28T10:13:06.847Z [out] updated 2 packages in 64.413s 2020-02-28T10:13:07.167Z [out] 2020-02-28T10:13:07.167Z [out] 1 package is looking for funding 2020-02-28T10:13:07.167Z [out] run npm fund for details 2020-02-28T10:13:07.167Z [out]

Node Red details: root@DietPi:~# node-red 28 Feb 10:09:54 - [info]

Welcome to Node-RED

28 Feb 10:09:54 - [info] Node-RED version: v1.0.3 28 Feb 10:09:54 - [info] Node.js version: v8.17.0 28 Feb 10:09:54 - [info] Linux 4.19.97-v7+ arm LE 28 Feb 10:09:55 - [info] Loading palette nodes 28 Feb 10:09:58 - [info] Settings file : /root/.node-red/settings.js 28 Feb 10:09:58 - [info] Context store : 'default' [module=memory] 28 Feb 10:09:58 - [info] User directory : /root/.node-red 28 Feb 10:09:58 - [warn] Projects disabled : editorTheme.projects.enabled=false 28 Feb 10:09:58 - [info] Flows file : /root/.node-red/flows_DietPi.json

Note: I used this command to downgrade Node to version 8 npm i -g --unsafe-perm n && n 8

jippsgk commented 4 years ago

Should we be installing Hzeller first then node-red?

ryanmich251 commented 3 years ago

If this is still an issue, could you paste your flows file? (from your logs it looks like that's in /root/.node-red-/flows_DietPi.json)

spants commented 3 years ago

I gave up and use something else = but I would love to get it running when I have time.

moffi9426 commented 2 years ago

I'm planning a larger project and before taking the investment I'd like to confirm the following installation steps:

  1. Setup NodeRed on RPi
  2. Let Nodered run as Root
  3. Downgrade Node to V8.x by npm i -g --unsafe-perm n && n 8
  4. Deactivate Soundcard with d=/boot/config.txt && sudo sed "/.*dtparam=audio=on*./c\dtparam=audio=off" $d > tmp && sudo cp -f tmp $d
  5. Install Backend from HZeller Latest?
  6. Install node-rpi-rgb-led-matrix Latest?
  7. Finally Install this Node to NodeRed as usual
  8. Start to have fun :-)

Did I miss any step here guys or is this correct and should run?

lekraft commented 1 year ago

@moffi9426 did you get it running with these installation steps?

I got stuck at letting it run as root, since sudo npm config set unsafe-perm true is not supported anymore in the npm 8 and earlier versions won't work with the internal package manager of node red, which always leads to some errors...