plasticrake / tplink-smarthome-api

TP-Link Smarthome WiFi API
MIT License
1.02k stars 141 forks source link

hs110 send wrong data effects syntaxerror #146

Open arteck opened 1 year ago

arteck commented 1 year ago

i hvae here a little problem when the plug hs110 send wrong json

SyntaxError: Unexpected token u in JSON at position 0 at JSON.parse (<anonymous>) at Plug.sendCommand (/opt/iobroker/node_modules/tplink-smarthome-api/lib/device/index.js:267:71) at async Emeter.getRealtime (/opt/iobroker/node_modules/tplink-smarthome-api/lib/shared/emeter.js:70:55)
unhandled promise rejection: Unexpected token u in JSON at position 0
Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().