dehsgr / node-red-contrib-meross

This provides nodes for controlling Meross devices.
ISC License
10 stars 6 forks source link

Node-RED Server Crashes with JSON Syntax Error When Controlling Meross MSS310 Plugs #28

Open zoppolig opened 5 months ago

zoppolig commented 5 months ago

I installed the meross node to control some MSS310 plugs. I followed all instructions and got the token and IP of the plug (which is connected, pings fine, and is controlled well by the app). Issue is, when try to send msg.payload TRUE to the node, the node-red server crashes and restarts with this error log:

'''' 13 Jan 01:08:55 - [red] Uncaught Exception: 13 Jan 01:08:55 - [error] SyntaxError: Unexpected token P in JSON at position 0 at JSON.parse () at Request._callback (/home/pi/.node-red/node_modules/node-red-contrib-meross/meross/smartplug-control.js:68:19) at self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22) at Request.emit (node:events:517:28) at Request.emit (node:domain:489:12) at Request. (/home/pi/.node-red/node_modules/request/request.js:1154:10) at Request.emit (node:events:517:28) at Request.emit (node:domain:489:12) at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1076:12) at Object.onceWrapper (node:events:631:28) at IncomingMessage.emit (node:events:529:35) at IncomingMessage.emit (node:domain:489:12) at endReadableNT (node:internal/streams/readable:1400:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) nodered.service: Main process exited, code=exited, status=1/FAILURE nodered.service: Failed with result 'exit-code'. ''''

node-red version 3.1.3 node-red-contrib-meross 2.2.1 Node.js v18.19.0 Running on a Raspberry Pi 4B with OS Debian GNU/Linux 12 (bookworm)

Any help appreciated

dehsgr commented 1 week ago

@zoppolig is TRUE sent as string or as boolean? Did you try sending 1 (number) instead of true?