Giter Club home page Giter Club logo

bosch-smart-home-bridge's People

Contributors

dependabot[bot] avatar holomekc avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bosch-smart-home-bridge's Issues

@types/selfsigned not exported?

I'm running into a compiler issue when using this dependency.

I'm generating my own certificate to change the lifetime.
This requires me to use the selfsigned dependency. However, when I import your module and the selfsigned module, it creates a compiler error, as the selfsigned module does not include the CertificateDefinition interface.

I fixed this by adding this to my tsconfig:

    "typeRoots": [
      "./node_modules/@types",
      "./node_modules/bosch-smart-home-bridge/@types"
    ]

This feels wrong though.
The code in question can be found here:

Certificate generator

Hi, first of all thank you for this library. I could get a few things running.

But to generate a certificate you write in your documentation:

absolute path to a directory where client certificates are located or will be generated to

For any reason no certificate or a key gets generated at this point.


const path = require('path');
const {BoschSmartHomeBridge} = require('bosch-smart-home-bridge');

const caDev = path.resolve('/home/pi/certs');
const bshb = new BoschSmartHomeBridge('192.168.0.10', 'client-id', caDev, new Logger());

When I add this line:
bshb.pairIfNeeded('client-name', 'password');

I get:
info Check if client with identifier: client-id is already paired.
But the client did not pair nor are certificates present in the 'caDev' directory.

But when I add a GET on rooms instead of the pairing command
bshb.getBshcClient().getRooms().subscribe(result => {});

the certificate and key gets created:

info certificate for identifier node-red-contrib-bosch not found. Creating new client certificate.
info Generating RSA private key, 2048 bit long modulus
............................................+++++
..+++++
e is 65537 (0x010001)

I would expect this behavior when creating a new instance of BoschSmartHomeBridge but not when I try to get the room array. Did I get something wrong here?

Update from 1.2.1 to 1.2.2

Hi holomekc, thank you for keeping this project updated!

Unfortunately, I get an error after updating from 1.2.1 to 1.2.2. When the node starts and tries to initiate the lib, the following error occurs:

24 Apr 22:16:53 - [error] [shc-config:2d20f22b4fb126da] TypeError: BoschSmartHomeBridgeBuilder.builder is not a constructor

With version 1.21 the following constructor is working fine:

const {BoschSmartHomeBridgeBuilder, BshbUtils} = require('bosch-smart-home-bridge');

            this.shc = new BoschSmartHomeBridgeBuilder.builder()
                .withHost(this.shcip)
                .withClientCert(this.cert)
                .withClientPrivateKey(this.key)
                .withLogger(new ShcLogger())
                .withIgnoreCertificateCheck(false)
                .build();

Did the constructor changed by updating the ECMA Script in 1.2.2?

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.