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

rflink.0 (597) Module serialport is not available #36

Open
tnowak opened this issue Sep 17, 2020 · 6 comments
Open

rflink.0 (597) Module serialport is not available #36

tnowak opened this issue Sep 17, 2020 · 6 comments

Comments

@tnowak
Copy link

tnowak commented Sep 17, 2020

Hello,

I've moved my dockered ioBroker install from RPI3 to RPI4 and I can't debug one issue I have.
This is with RFLink adapter not seeing my Arduino.
Basically this what RFLink logs:

2020-09-17 02:05:14.046  - warn: rflink.0 (597) Module serialport is not available
2020-09-17 02:05:19.035  - warn: rflink.0 (597) Module serialport is not available

And this is what logs ioBroker itself:

Cannot load serialport module
Serial port is not available

Everything (docker container) seems to be configured exactly the same on RPI4 as it was on RPI3.
/dev/serial/by-id/usb-Arduino__www.arduino.cc__0042_557313234363513031A0-if00 is mapped to /dev/ttyACM0.
and ACM0 seems to show up in docker:

root@a54f0d9ed4df:/opt/iobroker/log# ls -l /dev/ | grep ttyA
crw-rw---- 1 root dialout 166, 0 Sep 17 02:03 ttyACM0

On this very same RPI4 I have Conbee II stick that is mapped to deCONZ docker and it works fine with deCONZ. So it doesn't seem like a RPI4 fault.

I'd really make use of some ideas how to diagnose and fix the problem, as I can't control my blinds right now.
Thanks in advance.

PS.

  • js-controller 3.1.6
  • Node.js: v12.18.3
  • NPM: 6.14.6
  • RFLink Adapter 2.0.0

PS2.
I also made iobroker fix but that did't help.

@tnowak
Copy link
Author

tnowak commented Sep 17, 2020

I somehow managed to fix this myself!
Don't know what this command actually does, but I've fixed it with issuing:

npm rebuild
in directory /opt/iobroker/node_modules/@serialport

So it works now, but I still don't see anything in "Com port" - its empty.
Is this Ok? Should't it say /dev/ttyACM0 or something?

@Apollon77
Copy link
Contributor

If you moved stuff between is or node versions then sometimes native nodejs modules needs to be recompiled. This command does that. So this is fine

For empty port: the USB port is forwarded in Docker so that it is available and shows also in Docker /dev/tty...?!

@tnowak
Copy link
Author

tnowak commented Sep 17, 2020

It shows in Docker as /dev/ttyACM0.
But doesn't show in adapter configuration in ioBroker - select filed next to Com port is empty

@fraeggle
Copy link

fraeggle commented Aug 21, 2023

how did you solved it now.. have the same issue in Proxmox V8. Zigbe works like charm. but did not get RFlink on the run.
tried editing in Objects too. after starting rflink i always get:

2023-08-21 20:24:09.927 error instance system.adapter.rflink.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: Node.js v18.17.1
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: at node:internal/main/run_main_module:23:47
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: at Module._load (node:internal/modules/cjs/loader:960:12)
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: at Module.load (node:internal/modules/cjs/loader:1119:32)
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: at Module._compile (node:internal/modules/cjs/loader:1256:14)
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: at Object. (/opt/iobroker/node_modules/iobroker.rflink/main.js:17:17)
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: TypeError: Cannot read properties of undefined (reading 'supportsFeature')
host.999
2023-08-21 20:24:09.926 error Caught by controller[1]: ^
host.999
2023-08-21 20:24:09.925 error Caught by controller[1]: if (adapter.supportsFeature && !adapter.supportsFeature('CONTROLLER_NPM_AUTO_REBUILD')) {
host.999
2023-08-21 20:24:09.925 error Caught by controller[1]: /opt/iobroker/node_modules/iobroker.rflink/main.js:17
host.999
2023-08-21 20:24:09.925 error Caught by controller[0]: Cannot load serialport module : Error: /opt/iobroker/node_modules/iobroker.rflink/node_modules/@serialport/bindings/build/Release/bindings.node: wrong ELF class: ELFCLASS32

btw hab auch nicht das "bin" verzeichnis das Apollon in einem anderen threat mal erwähnt hat.
"/opt/iobroker/node_modules/iobroker.rflink/node_modules/serialport/bin" hab ich nicht, aber auf keinem meiner Systeme....

@Apollon77
Copy link
Contributor

@fraeggle I more think your issue is different! seels like a very old js-controller is used, could that be?

@fraeggle
Copy link

@Apollon77 fixed it with
npm rebuild
in directory /opt/iobroker/node_modules/https://github.com/serialport

Eigentlich bin ich aktuell
Node.js: v18.17.1
NPM: 9.6.7
js: 4.0.24

after i read, if you change to another "system", you should run npm rebuild, i did that. And after a short coffee break the serialports in lxc are available at rflink and it works.

Thanks.
Regard Peter

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

No branches or pull requests

3 participants