node-red-contrib-bosch-shc

    0.3.26 • Public • Published

    NPM

    Bosch Smart Home Controller (SHC) nodes for Node-Red

    NPM version Downloads Dependencies Status Build Status XO code style License

    This module provides several nodes for interacting with Bosch Smart Home services and edge devices via the local controller API.

    A full documentation of the API can be found here.

    Example flows can be found here.

    Compatible with Node-RED version 1.0.0 or higher.

    Release Notes

    Version 0.3.22 allows you to request the device meta data, e.g. the availability status of a device. In addition, it is now possible to request all device services or a specific state across all related devices at once. The result is an array that you can use, for example, to calculate the total power consumption of all smart plugs or the average temperature across all rooms.

    Some legacy code has been removed. If you encounter any problem with your shc-config after the update to version 0.3.22, you will probably need to recreate it to solve this problem.

    With version 0.2.14 the smart thermostat (TRV) was introduced and optimizations were implemented that improves the interaction with the Node-RED dashboard:

    • msg.topic now contains the name of a device, so that several devices can be separated in a dashboard chart. You are also free to configure msg.topic via the device property name.
    • The output of boolean services has been aligned with the input if the corresponding state is set. The Node-RED dashboard switch can now be wired directly to boolean services to toggle a switch state, such as for the camera or the smart plug.
    • The output for all services of a device is no longer an array. Instead each service is send as a separate msg.

    With the update to version 0.1.7 or higher, the configuration of the SHC must be created again if you have created SHC configurations with version 0.0.6 or earlier. Therefore, please delete old SHC configurations first and recreate them after the update.

    The reason for this is a change of the certificate handling. As of version 0.1.7, the certificates are stored in Node-RED. This makes the whole thing more secure if Node-RED itself is properly secured. After the update you can delete the directory "/certs" in "~/.node-red".

    If you encounter any problem, do not hesitate to create an issue.

    Features

    • Local network discovery of the SHC
    • Pairing with SHC
    • Event polling (long polling)
    • Get all services from devices
    • Get and set states of devices
    • Trigger scenarios

    Device Node

    There are two ways to receive data from the SHC, either by long polling or by a request. Please note that you should always prefer the long polling mechanism to receive data from the SHC rather than requesting it. However, sometimes it is useful to request a state at a specific time, but you should not do this too often in a short time period, as described here.

    Long Polling

    By default events are received via long polling from the SHC as soon as any state of a service changes. Each device has several services. A device node sends either the meta data of a device, all related services of a device, a specific service or a single state.

    Device node

    Requesting

    To request a device any msg can be used, if the msg.payload does not match the values to set a state. The device node overwrites msg.topic and msg.payload with the selected information as configured in the device node configuration page.

    Request a device

    Get all services of a device

    To send all related services of a device, select a Device and select all as a Service. The State input field can be left empty. This node sends a message when one of the device services has been updated.

    All services

    Get a specific service of a device

    Select a Service to send only JSON objects of the specified service. Requesting the service sends an ENTITY_NOT_FOUND error message if the service does not exist or is not related to the device. Via long polling, no msg will be sent from the node.

    Specific service

    Get a state

    If you only need a value instead of the entire service object, enter the name of the State in the corresponding field. No msg is sent from the node if the state does not exist or is not related to the service.

    State of a service

    Set a state

    If the msg.payload matches the predefined type and range of the service, the associated state will be updated with the specified payload value. The following services can be updated:

    Service Payload Type Payload Range Information
    IntrusionDetectionControl boolean true, false Activate/deactivate alarm system
    PresenceSimulationConfiguration boolean true, false Activate/deactivate presence simulation
    SmokeDetectorCheck boolean true, false Triggers a test alarm on this device
    PowerSwitch boolean true, false Turn device on/off
    PrivacyMode boolean true, false Activate/deactivate camera privacy mode
    HeatingCircuit, RoomClimateControl number 5.0, 5.5, ..., 29.5, 30.0 Set a temperature
    ShutterControl number 0.000, 0.005, ..., 0.995, 1.000 Set the level of a shutter (0 = close)
    string stop, close, open Set the operation state of a shutter (case insensitive)

    Scenario Node

    Use this node to trigger the defined scenario. Each msg can be used as a trigger. This node sends an event message when the defined scenario has been triggered.

    Scenario node

    Faults Node

    This node sends all events containing the faults property. These messages usually refer to low-battery events of battery-powered edge devices.

    Faults node

    By activating the Debug check box, this node sends all messages that are received from the SHC via long polling.

    Install

    npm i node-red-contrib-bosch-shc

    DownloadsWeekly Downloads

    6

    Version

    0.3.26

    License

    MIT

    Unpacked Size

    168 kB

    Total Files

    22

    Last publish

    Collaborators

    • avatar