Git Product home page Git Product logo

node-eq3ble's Issues

EQ3BLE.discover is not a function

i have node 7.4.0
After running

var EQ3BLE = require('eq3ble');
EQ3BLE.discover((device) => {
  device.connectAndSetup().then(() => {
    // ...
  })
})

i got:

TypeError: EQ3BLE.discover is not a function
    at Object.<anonymous> (/home/pi/Projects/tempble/index.js:10:8)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:420:7)
    at startup (bootstrap_node.js:139:9)
    at bootstrap_node.js:535:3

Is there something wrong with inheritance?

`Unhandled promise rejection (rejection id: 2)` when discoverByAddress

Hi!

I was trying to make the https://github.com/maxnowack/homebridge-eq3ble work with my new thermostat. however, I've discovered strange problem.

when I do the discoverByAddress, then I'm getting Unhandled promise rejection (rejection id: 2):

code:

var EQ3BLE = require('eq3ble');
require('log-timestamp');

console.log('started discovery');
EQ3BLE.default.discoverByAddress('00:1a:22:06:69:85', function (device) {
  console.log('discoverByAddress: discovered thermostat ' + device);
  console.log('discoverByAddress: ' + device.id);
  console.log('discoverByAddress: ' + device.uuid);
  console.log('discoverByAddress: ' + device.address);
  console.log('discoverByAddress: ' + device.addressType);
  device.getInfo().then(function (info) {
    console.log('discoverByAddress: ' + info);
  });
});

output:

[2016-11-19T16:32:03.548Z] started discovery
[2016-11-19T16:32:25.828Z] discoverByAddress: discovered thermostat {"uuid":"f732af417b074113973a5402ea84a8b3"}
[2016-11-19T16:32:25.828Z] discoverByAddress: f732af417b074113973a5402ea84a8b3
[2016-11-19T16:32:25.828Z] discoverByAddress: f732af417b074113973a5402ea84a8b3
[2016-11-19T16:32:25.828Z] discoverByAddress: 00:1a:22:06:69:85
[2016-11-19T16:32:25.829Z] discoverByAddress: unknown
[2016-11-19T16:32:25.832Z] (node:52017) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: service uuid 3e135142654f9090134aa6ff5bb77046 not found!
[2016-11-19T16:32:25.832Z] (node:52017) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

setDatetime or getInfo vs Automatic Mode

Hi,

After using getInfo or setDatetime(new Date()) for getting eq-3 status - automatic mode stops working or works unpredictable.

Looking on Android Application getting status is performed by full setdate time command not just '03'.
And on the other hand I see some differences especially year is not in full format but last 2 digits (modulo 100):

Set Time:
public SetTimeCommand() {
this.commandData = new byte[7];
this.commandData[0] = (byte) 3;
GregorianCalendar calendar = new GregorianCalendar(TimeZone.getDefault());
calendar.setTimeInMillis(System.currentTimeMillis());
this.commandData[1] = (byte) (calendar.get(1) % 100);
this.commandData[2] = (byte) (calendar.get(2) + 1);
this.commandData[3] = (byte) calendar.get(5);
this.commandData[4] = (byte) calendar.get(11);
this.commandData[5] = (byte) calendar.get(12);
this.commandData[6] = (byte) calendar.get(13);
}

Get Status:
protected void onResume() {
...
((BLEApplication) getApp()).getBluetoothAPI().connectToGroup(this.groupID);
((BLEApplication) getApp()).getBluetoothAPI().sendCommandToGroup(this.groupID, new SetTimeCommand());
...
updateGroupStateUI(group);
}

Currently I have no fix for that.
As a workaround to get status from eq-3 and not disturbed automatic mode for getInfo I am using setAutomaticMode payload.

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.