npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

homebridge-bosch-alert-system

v1.0.2

Published

Exposes a device for the Bosch Smart home alerting system

Downloads

17

Readme

Homebridge Bosch Alerting system

This plugin exposes the Bosch smarthome alerting (intrusion) system to Homekit. It is based on the bosch-smart-home-bridge library and the Bosch Smarthome local API.

Alarm profiles

Homekit supports 3 alarm profiles, which are mapped to the following Bosch alarm profiles:

  • away is mapped to "Full protection"
  • present is mapped to "Partial protection"
  • night is mapped to "Full protection"

Currently you cannot map other profiles or reconfigure the existing mapping.

Triggering alarms

Triggering alarms is currently not supported, but an active alarm will be displayed.

Certificates

The Smarthome API uses mutual TLS to protect itself from unwanted access.
This requires you to authenticate the plugin before it can be used.
To do so, several steps need to be executed.

It is recommended to generate and register a certificate yourself, as these credentials will stay intact even when the homebridge state is lost and you have more control over them (e.g. you can define the lifetime). It is also much clearer on when to use the "pair" button on your controller.

Let homebridge generate certificates

This option generates a certificate through the homebridge plugin.
The certificate will stay valid for 10 years. To enable this you must provide your Bosch smarthome controller system password.

After configuring the plugin, and ideally before you restart homebridge you have to press the pairing button (2) on your Bosch smarthome controller.

Smarthome controller

If the pairing process succeeded, the plugin should show in your bosch smarthome app. If you have to re-pair, you need to remove the plugin from the bosch smarthome app first.

Generate certificates yourself

These steps have been derived from the Bosch API docs.

  1. You need to create an RSA key pair, that will identifiy your client. The following will create a certificate that is valid for 10 years (-days 3650).

    openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout client-key.pem -out client-cert.pem
  2. Find out your Smarthome controller IP. Test it with the following command. The CONTROLLER_IP variable will be used in later steps.

    CONTROLLER_IP=192.168.0.10
    curl -sk "https://${CONTROLLER_IP}:8446/smarthome/public/information"
  3. Generate a client request file named request.json using your editor of choice. Make sure the certificate string has the form -----BEGIN CERTIFICATE-----\r....\r-----END CERTIFICATE-----. Especially the two \r are important.

    {
        "@type": "client",
        "id": "oss_homebridge",
        "name": "OSS Homebridge plugin",
        "primaryRole": "ROLE_RESTRICTED_CLIENT",
        "certificate": "insert the content of client-cert.pem here"
    }
  4. Press the paring button on your Smarthome controller (see previous section)

  5. Pair with the controller. Please note that the port used in step 2 is different for this call.

    curl -sk -X POST \
      -H "Content-Type: application/json" \
      -H "Expect:" \
      -H "Systempassword: $(echo -n 'insert controller password here' | base64)" \
      -d @request.json \
      "https://${CONTROLLER_IP}:8443/smarthome/clients"

    This call will register the client certificate with the server. It should now show up in your Bosch smarthome app. If you receive an HTTP 401 error, the password is likely wrong.

Store the client key and signed certificate in a safe location. You will need to pass the certificate and client key to the plugin.

Setup certificates

To use the plugin, you must pass the client certificate and key registered in the step above.
As Homebridge does not support multi-line text fields, but linefeeds are required here, you need to pass in the two files as base64 encoded.

base64 -i client-cert.pem # your encoded certificate
base64 -i client-key.pem  # your encoded client key