Code Monkey home page Code Monkey logo

bg-hive-api's People

Contributors

aklambeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bg-hive-api's Issues

Device Query error - reason: 'INVALID_PARAMETER', parameter: 'nodeId'

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

Can't turn HotWater to OFF

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.

Failure running connection example

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?

heating module dies after an hour or two

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)

TypeError: Cannot read property 'body' of undefined

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

MagicMirror module

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...

Parsing of returned data error

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.