Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino firmata don't work under windows 10 #977

Closed
5 tasks
OZ1CT-Ben opened this issue Feb 15, 2023 · 15 comments
Closed
5 tasks

Arduino firmata don't work under windows 10 #977

OZ1CT-Ben opened this issue Feb 15, 2023 · 15 comments
Labels

Comments

@OZ1CT-Ben
Copy link

OZ1CT-Ben commented Feb 15, 2023

I have try to install the Arduino node (firmata) but I get error when I try to install it on my windows-10 pc...on a RPI or Linux (Ubuntu) there is no problem.

Is there a way to fixing this ????

Ben

Which node are you reporting an issue on? Arduino Firmata

What are the steps to reproduce?

What happens? get a erro vhen try to install on my win-10... but it will do it on RPI an Linux(ubuntue)

I get this error from the system when I try to install:


2023-02-15T15:19:34.621Z Install : node-red-node-arduino 0.3.1

2023-02-15T15:19:34.976Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-arduino@0.3.1
2023-02-15T15:19:44.453Z [err] npm
2023-02-15T15:19:44.453Z [err] ERR! code 1
2023-02-15T15:19:44.453Z [err] npm ERR!
2023-02-15T15:19:44.453Z [err] path C:\Users\Bent.node-red\node_modules@serialport\bindings
2023-02-15T15:19:44.454Z [err] npm ERR!
2023-02-15T15:19:44.454Z [err] command failed
2023-02-15T15:19:44.454Z [err] npm ERR! command
2023-02-15T15:19:44.454Z [err] C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2023-02-15T15:19:44.454Z [err] npm
2023-02-15T15:19:44.454Z [err] ERR! gyp info it worked if it ends with ok
2023-02-15T15:19:44.454Z [err] npm ERR! gyp info using node-gyp@3.8.0
2023-02-15T15:19:44.454Z [err] npm ERR! gyp info using node@16.13.2 | win32 | x64
2023-02-15T15:19:44.454Z [err] npm ERR! gyp ERR! configure error
2023-02-15T15:19:44.454Z [err] npm
2023-02-15T15:19:44.454Z [err] ERR! gyp ERR! stack Error: Command failed: C:\Python310\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
2023-02-15T15:19:44.454Z [err] npm
2023-02-15T15:19:44.455Z [err] ERR! gyp ERR! stack File "", line 1
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
2023-02-15T15:19:44.455Z [err] npm ERR!
2023-02-15T15:19:44.455Z [err] gyp ERR! System Windows_NT 10.0.19044
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Bent\.node-red\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! cwd C:\Users\Bent.node-red\node_modules@serialport\bindings
2023-02-15T15:19:44.455Z [err] npm
2023-02-15T15:19:44.455Z [err] ERR! gyp ERR! node -v v16.13.2
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! node-gyp -v v3.8.0
2023-02-15T15:19:44.455Z [err] npm
2023-02-15T15:19:44.455Z [err] ERR! gyp ERR! not ok
2023-02-15T15:19:44.455Z [err]
2023-02-15T15:19:44.455Z [err] npm ERR!
2023-02-15T15:19:44.455Z [err] A complete log of this run can be found in:
2023-02-15T15:19:44.455Z [err] npm ERR! C:\Users\Bent\AppData\Local\npm-cache_logs\2023-02-15T15_19_35_674Z-debug-0.log
2023-02-15T15:19:44.474Z rc=1

What do you expect to happen?

Please tell us about your environment:

  • Node-RED version: 2.15
  • node.js version: 18.14.0
  • npm version: last one
  • Platform/OS: Win-10 64bit Pro
  • Browser: Chrome / Brave
@hardillb
Copy link
Member

Please complete the full template (you can edit the opening comment) you were shown when opening the issue.

It gathers all the information we need to be able to help. e.g. without showing us the error you mention we have no way of guessing what the problem might be.

@dceejay
Copy link
Member

dceejay commented Feb 15, 2023

I'm going to guess that it is down to the fact that the underlying firmata library pins itself to a very old version of the serialport npm (v8 vs v10 today) and that is failing to build on latest build tools. (also assuming they have been installed). IF this is the case then we would need firmata project to update themselves which they haven't done for 2 years...

Workaround is to create yourself a sketch for the Arduino that reads/writes whatever ports you require and sends the data direct over standard serial connection.

@OZ1CT-Ben
Copy link
Author

Hi dceejay

I am a new beginner in node-red so can you mabe tell whit it wil install unde my raspberry PI and also on my Linux (ubuntue) PC whit any problem/error ????

is it windows-10 there is the error ???? :-)

Ben

@dceejay
Copy link
Member

dceejay commented Feb 15, 2023

I don't know - I'm only guessing based on the (lack of) information you have provided - we would need to see th error log when you install to confirm.

@OZ1CT-Ben
Copy link
Author

I have upload the error log...but here it is agn:

2023-02-15T15:19:34.621Z Install : node-red-node-arduino 0.3.1

2023-02-15T15:19:34.976Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-node-arduino@0.3.1
2023-02-15T15:19:44.453Z [err] npm
2023-02-15T15:19:44.453Z [err] ERR! code 1
2023-02-15T15:19:44.453Z [err] npm ERR!
2023-02-15T15:19:44.453Z [err] path C:\Users\Bent.node-red\node_modules@serialport\bindings
2023-02-15T15:19:44.454Z [err] npm ERR!
2023-02-15T15:19:44.454Z [err] command failed
2023-02-15T15:19:44.454Z [err] npm ERR! command
2023-02-15T15:19:44.454Z [err] C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
2023-02-15T15:19:44.454Z [err] npm
2023-02-15T15:19:44.454Z [err] ERR! gyp info it worked if it ends with ok
2023-02-15T15:19:44.454Z [err] npm ERR! gyp info using node-gyp@3.8.0
2023-02-15T15:19:44.454Z [err] npm ERR! gyp info using node@16.13.2 | win32 | x64
2023-02-15T15:19:44.454Z [err] npm ERR! gyp ERR! configure error
2023-02-15T15:19:44.454Z [err] npm
2023-02-15T15:19:44.454Z [err] ERR! gyp ERR! stack Error: Command failed: C:\Python310\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
2023-02-15T15:19:44.454Z [err] npm
2023-02-15T15:19:44.455Z [err] ERR! gyp ERR! stack File "", line 1
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
2023-02-15T15:19:44.455Z [err] npm ERR!
2023-02-15T15:19:44.455Z [err] gyp ERR! System Windows_NT 10.0.19044
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Bent.node-red\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! cwd C:\Users\Bent.node-red\node_modules@serialport\bindings
2023-02-15T15:19:44.455Z [err] npm
2023-02-15T15:19:44.455Z [err] ERR! gyp ERR! node -v v16.13.2
2023-02-15T15:19:44.455Z [err] npm ERR! gyp ERR! node-gyp -v v3.8.0
2023-02-15T15:19:44.455Z [err] npm
2023-02-15T15:19:44.455Z [err] ERR! gyp ERR! not ok
2023-02-15T15:19:44.455Z [err]
2023-02-15T15:19:44.455Z [err] npm ERR!
2023-02-15T15:19:44.455Z [err] A complete log of this run can be found in:
2023-02-15T15:19:44.455Z [err] npm ERR! C:\Users\Bent\AppData\Local\npm-cache_logs\2023-02-15T15_19_35_674Z-debug-0.log
2023-02-15T15:19:44.474Z rc=1

@hardillb
Copy link
Member

Yep, as DCJ suggested it looks to be failing building the serialport bindings.

Looking at the error I would guess it's failing because it's not been updated to use Python3.

We can only guess at why it's working on the Linux machine, but most likely it still has python2 installed (even though it is completely out of date/support).

@hardillb
Copy link
Member

Yep, just tested, that python one liner doesn't work on python3 but does with python2

@OZ1CT-Ben
Copy link
Author

OZ1CT-Ben commented Feb 15, 2023 via email

@hardillb
Copy link
Member

Until the upstream Firmata library updates it's serialport dependency I would say it's unlikely.

If you know what you are doing, you could try patching the build to get it to use the newer serialport and then open a PR against Firmata, but as DCJ mentioned it doesn't look like that project has been touched in a while (August 2021, but most even older)

@dceejay
Copy link
Member

dceejay commented Feb 15, 2023

In fact I notice I already opened an issue back in 2020 - firmata/firmata.js#229
with no response...

@OZ1CT-Ben
Copy link
Author

OZ1CT-Ben commented Feb 15, 2023 via email

@dceejay
Copy link
Member

dceejay commented Feb 17, 2023

As I said this is just this node - the best way round it is to write your own arduino application that just sends data via the serial port. The normal serialport node is updated and does work on windows.

@OZ1CT-Ben
Copy link
Author

OZ1CT-Ben commented Feb 17, 2023 via email

@dceejay
Copy link
Member

dceejay commented Feb 19, 2023

you managed to install the firmata firmware into the arduino so you are a good part of the way there! There is plenty of help out there on arduino fora to help you, as long as you know what exactly you are trying to read, how often, etc.

@OZ1CT-Ben
Copy link
Author

OZ1CT-Ben commented Feb 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants