techgardeners / signalk-hwt901b-imu-plus

SignalK node server plugin reading roll, pitch and course from WITMOTION's HWT910B IMU sensor
Apache License 2.0
0 stars 1 forks source link

Problem with SignalK server #1

Open mpolazzo opened 1 year ago

mpolazzo commented 1 year ago

Hi, I try to use the plugin with SignalK in Lysmarine OS (bareboat necessities). I have downloaded the error for the parent plugin, but the result is the same also for yours.

Plugin configured with /dev/ttyUSB0 port. In logfile I get this error: Oct 14 09:21:34 2022-10-14T09:21:34.855Z signalk-hwt901b-imu plugin.stop Oct 14 09:21:34 2022-10-14T09:21:34.861Z signalk-hwt901b-imu plugin.connect Oct 14 09:21:34 connecting to /dev/ttyUSB0:0 Oct 14 09:21:34 2022-10-14T09:21:34.869Z signalk-hwt901b-imu Plugin options saved Oct 14 09:21:34 POST /skServer/plugins/signalk-hwt901b-imu/config 200 9.690 ms - 50 Oct 14 09:21:34 2022-10-14T09:21:34.877Z signalk-hwt901b-imu plugin.connect.close Oct 14 09:21:34 TypeError: DelimiterParser is not a constructor at SerialPort. (/home/signalk/.signalk/node_modules/.pnpm/signalk-hwt901b-imu@0.1.0/node_modules/signalk-hwt901b-imu/index.js:98:44) at SerialPort.emit (node:events:513:28) at binding.open.then.opening (/home/signalk/.signalk/node_modules/.pnpm/https://github.com/serialport+stream@9.2.4/node_modules/@serialport/stream/lib/index.js:234:12)

I already found a fix for this, but it would be great to have this already done in the origin. It seems I have fixed my local copy by changing this row in index.js => const DelimiterParser = require('@serialport/parser-delimiter') with the following => const { DelimiterParser } = require('@serialport/parser-delimiter')

I already opened an issue on W-Geronius plugin's page, but it seems he disagrees.

Could you please have a look too?

Thanks a lot. Marco

atchik6056 commented 1 month ago

Hello Marco Thank you for the input. It works for me as you described with RPI4, bookworm, Signalk 2.8.2 (BBN/lysmarine 2024-06-20-r0235) and WT901C-232 and CP2102 USB \ TTL \ RS232 \ RS485 adapter. I do not know why it is not fixed yet. Alex