aklambeth / bg-hive-api

Hive Active Heating. Node.js API.
MIT License
17 stars 6 forks source link

heating module dies after an hour or two #4

Open spants opened 8 years ago

spants commented 8 years ago

Using latest nodered and the latest nodes 0.1.1 and controller 1.0.4, I get this error:

I am polling every 30 secs by sending a SCHEDULE message:

17 Mar 09:24:15 - started nodered

17 Mar 12:31:19 - [red] Uncaught Exception: 17 Mar 12:31:19 - TypeError: undefined is not a function at /usr/lib/node_modules/node-red/node_modules/bg-hive-api/node_modules/async/lib/async.js:909:23 at /usr/lib/node_modules/node-red/node_modules/bg-hive-api/node_modules/async/lib/async.js:44:16 at Request._callback (/usr/lib/node_modules/node-red/node_modules/bg-hive-api/Connection.js:63:9) at Request.self.callback (/usr/lib/node_modules/node-red/node_modules/bg-hive-api/node_modules/request/request.js:199:22) at Request.emit (events.js:110:17) at Request. (/usr/lib/node_modules/node-red/node_modules/bg-hive-api/node_modules/request/request.js:1036:10) at Request.emit (events.js:129:20) at IncomingMessage. (/usr/lib/node_modules/node-red/node_modules/bg-hive-api/node_modules/request/request.js:963:12) at IncomingMessage.emit (events.js:129:20) at _stream_readable.js:908:16 at process._tickCallback (node.js:355:11)

aklambeth commented 8 years ago

I've left this running for several hours without replicating the issue. You don't need to send a Schedule command to return the current state you should just send a blank string. Maybe attempting so set the state every 30 seconds is tripping some kind of rate limiting which isn't being caught correctly.

spants commented 8 years ago

Just tried with blank msg and get the same..... Is there a good way that you know of getting the current status without hitting the api too often?.