aklambeth / bg-hive-api Goto Github PK
View Code? Open in Web Editor NEWHive Active Heating. Node.js API.
License: MIT License
Hive Active Heating. Node.js API.
License: MIT License
When running the connection example code, I get:
/home/pi/hive/node_modules/bg-hive-api/hubs.js:53
connection.context.hubs[0].devices = GetDevices(deviceId[0].id);
^
TypeError: Cannot read property 'id' of undefined
at Object.callback (/home/pi/hive/node_modules/bg-hive-api/hubs.js:53:76)
at next (/home/pi/hive/node_modules/bg-hive-api/node_modules/async/lib/async.js:801:43)
at /home/pi/hive/node_modules/bg-hive-api/node_modules/async/lib/async.js:32:16
at Request._callback (/home/pi/hive/node_modules/bg-hive-api/Connection.js:63:9)
at Request.self.callback (/home/pi/hive/node_modules/bg-hive-api/node_modules/request/request.js:373:22)
at Request.emit (events.js:110:17)
at Request. (/home/pi/hive/node_modules/bg-hive-api/node_modules/request/request.js:1318:14)
at Request.emit (events.js:129:20)
at IncomingMessage. (/home/pi/hive/node_modules/bg-hive-api/node_modules/request/request.js:1266:12)
at IncomingMessage.emit (events.js:129:20)
Am I doing something wrong, or has the API changed?
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)
On querying the connection.command.push(getDeviceTask, for hotwater or climate I get the error code : 'INVALID_PARAMETER', parameter: 'nodeId'
Where is nodeId coming from as I cannot see it in the definition. Is anyone else seeing this. This is a new device installed by British gas yesterday. States version 2 on the hub
I can set it to manual or schedule but if I try and turn it off the call just seems to be ignored.
I have tried -
hotwater.SetState(hotwater.State.Off);
hotwater.SetState(hotwater.Mode.Off);
hotwater.SetState(''OFF");
All of these seem to be ignored, no events are fired.
Thanks.
When running the getstate on a 10 second timer I am getting the following. It would appear that there is no reply and Widget.js tries to parse the response rather than handling the error
SyntaxError: Unexpected end of input
at Object.parse (native)
at Object.callback (/projects/node_modules/bg-hive-api/Widget.js:49:44)
at next (/projects/node_modules/bg-hive-api/node_modules/async/lib/async.js:801:43)
at /projects/node_modules/bg-hive-api/node_modules/async/lib/async.js:32:16
at Request._callback (/projects/node_modules/bg-hive-api/Connection.js:63:9)
at Request.self.callback (/projects/node_modules/bg-hive-api/node_modules/request/request.js:373:22)
at Request.emit (events.js:110:17)
at Request. (/projects/node_modules/bg-hive-api/node_modules/request/request.js:1318:14)
at Request.emit (events.js:129:20)
at IncomingMessage. (/projects/node_modules/bg-hive-api/node_modules/request/request.js:1266:12)
Hi,
I've just started setting up a MagicMirror, and would love to be able to show my Hive temperature (plus outside temperature) on the mirror. I'm not really a programmer, and while I have got your api working and sending me back correct data, any ideas how I would have the api working as a MagicMirror module?
Kind regards...
Hi,
I've been using the API for months without issue, however, around the 9th of September it has failed with the following error:
root@pi20:/home/username# /home/username/node/bin/node /home/username/node/bin/node_modules/bg-hive-api/test.js
/home/username/node/bin/node_modules/bg-hive-api/index.js:108
var errorReason = JSON.parse(response.body);
^
TypeError: Cannot read property 'body' of undefined
at Object.callback (/home/username/node/bin/node_modules/bg-hive-api/index.js:108:54)
at next (/home/username/node/bin/node_modules/bg-hive-api/node_modules/async/lib/async.js:801:43)
at /home/username/node/bin/node_modules/bg-hive-api/node_modules/async/lib/async.js:32:16
at Request._callback (/home/username/node/bin/node_modules/bg-hive-api/Connection.js:63:9)
at self.callback (/home/username/node/bin/node_modules/bg-hive-api/node_modules/request/request.js:373:22)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at Request.onRequestError (/home/username/node/bin/node_modules/bg-hive-api/node_modules/request/request.js:971:8)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
Thanks, Ash
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.