node-red-contrib-bosch-shc 0.6.35

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

npm install node-red-contrib-bosch-shc

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

NPM version Downloads Build Status XO code style License

ko-fi

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.6.35 adds a new node for triggering automations.

Version 0.4.33 adds two new nodes: for Open doors/windows and for User Defined States.

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)

Set the temperature of a thermostat with setpointTemperature via RoomClimateControl.

Set state flow

Set state device

Example payload to trigger the device state change

Trigger state device

OpenDoorsWindows Node

Use this node to get open doors and windows.

OpenDoorsWindows node

Automation Node

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

Automation node

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

User Defined State Node

Use this node to get/set user defined states. Use true/false to enable/disable a state, everything else to get the state. This node sends an event message when the defined state has been changed.

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

Node Info

Version: 0.6.35
Updated 4 months ago
License: MIT
Rating: 4.9 12

Actions

Rate:

Downloads

37 in the last week

Nodes

  • shc-automation
  • shc-config
  • shc-device
  • shc-opendoors
  • shc-scenario
  • shc-state
  • shc-fault

Keywords

  • node-red
  • bosch
  • smart
  • home
  • controller

Maintainers

Contributors

  • Sebastian Raff