Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Often crashes, json cut off #1

Open
andrewmacheret opened this issue Jun 23, 2017 · 1 comment
Open

Often crashes, json cut off #1

andrewmacheret opened this issue Jun 23, 2017 · 1 comment

Comments

@andrewmacheret
Copy link

Docker image crashes often when calling http://localhost:3000/plugs with the following output:

{"emeter":{"err_code":-2001,"err_msg":"Module not support"},"schedule":{"err_code":-2001,"err_msg":"Module not support"},"system":{"get_sysinfo":{"sw_ver":"1.4.3 Build 170504 Rel.144921","hw_ver":"1.0","model":"LB100(US)","description":"Smart Wi-Fi LED Bulb with Dimmable Light","alias":"<ALIAS>","mic_type":"IOT.SMARTBULB","dev_state":"normal","mic_mac":"<MIC_MAC>","deviceId":"<DEVICE_ID>","oemId":"<OEM_ID>","hwId":"<HW_ID>","is_factory":false,"disco_ver":"1.0","ctrl_protocols":{"name":"Linkie","version":"1.0"},"light_state":{"on_off":0,"dft_on_state":{"mode":"normal","hue":0,"saturation":0,"color_temp":2700,"brightness":100}},"is_dimmable":1,"is_color":0,"is_variable_color_temp":0,"preferred_state":[{"index":0,"hue":0,"saturation":0,"color_temp":2700,"brightness":100},{"index":1,"hue":0,"saturation":0,"color_temp":2700,"brightness":75},{"index":2,"hue":0,"saturation":0,"color_temp":2700,"brightness":25},{"index":3

SyntaxError: Unexpected end of JSON input
    at Object.parse (native)
    at Socket.socket.on (/usr/src/app/node_modules/hs100-api/lib/plug.js:44:21)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:548:20)

npm ERR! Linux 4.9.28+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the tplink-hs100 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs tplink-hs100
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls tplink-hs100
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /usr/src/app/npm-debug.log
@andrewmacheret andrewmacheret changed the title Often crashes Often crashes, json arriving in chunks? Jun 23, 2017
@andrewmacheret andrewmacheret changed the title Often crashes, json arriving in chunks? Often crashes, json cut off Jun 23, 2017
@andrewmacheret
Copy link
Author

Looks like there's a new version of hs100-api 0.4.0, but when I switch to that version in package.json, I run into a new issue: plasticrake/tplink-smarthome-api#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant