tim-brand / zigbee2mqtt-adapter-proxy

A proxy service to communicator with the coordinator over socket
2 stars 1 forks source link

proxy crashing at start #1

Open KorbinianP opened 3 years ago

KorbinianP commented 3 years ago

Hello,

I stumbled over your project here: https://github.com/Koenkk/zigbee2mqtt/issues/4473 Sadly it doesn't work in my setup: RasPi Zero W with latest Raspian, my Stick is a zig-a-zig-ah (zzh)

I get a crash in Line 140 of serialport-proxy.js

pi@zigbeepi:/opt/zigbee2mqtt-adapter-proxy $ cat config.yaml
ports:
  - path: /dev/ttyUSB0
    baudrate: 115200
    socketPort: 20108
    socketAddress: "::"
    rtscts: false
    skipBootloader: true

pi@zigbeepi:/opt/zigbee2mqtt-adapter-proxy $ node --version
v10.17.0

pi@zigbeepi:/opt/zigbee2mqtt-adapter-proxy $ node index.js config.yaml
/opt/zigbee2mqtt-adapter-proxy/lib/serialport-proxy.js:140
  onSocketData = (data) => {
               ^

SyntaxError: Unexpected token =
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/opt/zigbee2mqtt-adapter-proxy/index.js:3:25)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)

https://github.com/tim-brand/zigbee2mqtt-adapter-proxy/blob/8ca0961cd4d2e3ca885b7fc7d9cda171627f6d46/lib/serialport-proxy.js#L140-L150

Could you tell me if I do something wrong or if there is a bug?

Cheers

KorbinianP commented 3 years ago

@tim-brand can you please check this? Maybe I just wrongly start zigbee2mqtt-adapter-proxy?

kifeo commented 3 years ago

I also face this issue