node-enocean-utils
node-enocean-utils copied to clipboard
EnOcean USB 300 DC never recognized
Hi there,
I tried getting your Quickstart example to work without success and after making several changes. Setup:
- EnOcean USB 300 DC attached at
/dev/ttyUSB0
, BAUD rate of57600
The stick is set up and working as expected with FHEM. - Raspberry Pi running Raspian Buster
- Running the quickstart code with
enocean.startMonitor({'path':'/dev/ttyUSB0'}).then(...
results in
Error: No USB gateway was found.
at tryConnect (/home/foo/node_modules/node-enocean-utils/lib/node-enocean-utils-gateway.js:134:20)
at SerialPort.<anonymous> (/home/foo/node_modules/node-enocean-utils/lib/node-enocean-utils-gateway.js:196:7)
at binding.close.then.closing (/home/foo/node_modules/@serialport/stream/lib/index.js:440:18)
-
Adding the explicit configuration to
node-enocean-utils-gateway.js
undercom_info
: Same error. -
Running the EnOceanPi Example, adjusting the path to
/dev/ttyUSB0
or adding the full configuration dictionary: Same error. -
Running either
learn.js
oranalyze.js
with explicit arguments: Same error.
The gateway is never found.
Am I making an obvious mistake? Any advice would be greatly appreciated.
Thanks and kind regards
Edit: Node version: 12.14.1 Serialport version: 8.0.6
Thank you for your feedback.
Could you try enocean.startMonitor().then(...
(auto detection mode, no parameters)?
My stick is "300 DB". Your stick ("300 DC") seems to be the new model. Could you try this code?
'use strict';
const mSerialPort = require('serialport');
mSerialPort.list().then((com_list) => {
console.log(JSON.stringify(com_list, null, ' '));
});
If your RPi recognizes your stick, the code above will output the result as follows:
[
{
"manufacturer": "EnOcean GmbH",
"serialNumber": "FTZ7FDID",
"pnpId": "usb-EnOcean_GmbH_EnOcean_USB_300_DB_FTZ7FDID-if00-port0",
"vendorId": "0403",
"productId": "6001",
"path": "/dev/ttyUSB0"
},
{
"path": "/dev/ttyAMA0"
}
]
If you don't mind, share the result.
@futomi thanks for the handy tool. Unfortunately I appear to have a similar problem, at least I get the same error. However, I'm using an EnOcean Pi with TCM 310 chip (EU) instead of the USB stick on a Raspberry Pi 4B.
When using analyzer.js
with serial port path argument (first screenshot) I can see some serial data (second screenshot) received by the EnOcean Pi.
Using it without argument won't show any serial data on the EnOcean Pi.
I also ran your snippet which, with serial port path specified, will make the EnOcean Pi receive the same data as shown in the above screenshot but ultimately fail. With autodetect it just fails without receiving anything on the EnOcean Pi:
pi@raspberrypi:~ $ node enocean-test.js
Error: No USB gateway was found.
at tryConnect (/home/pi/node_modules/node-enocean-utils/lib/node-enocean-utils-gateway.js:167:20)
at Promise (/home/pi/node_modules/node-enocean-utils/lib/node-enocean-utils-gateway.js:234:3)
at new Promise (<anonymous>)
at EnoceanUtilsGateway._scanPorts (/home/pi/node_modules/node-enocean-utils/lib/node-enocean-utils-gateway.js:162:16)
at _getRealPath.then.then (/home/pi/node_modules/node-enocean-utils/lib/node-enocean-utils-gateway.js:33:16)
at process._tickCallback (internal/process/next_tick.js:68:7)
Happy to provide more data if needed.