Service Node

Updated July 19, 2022 by luwol03, GogoVega and Shaquu

This node represents the Service displayed in Home.app.

A Service or Service group (Parent and Linked) is considered like Accessory. You can choose to either link your Accessory to a Bridge or use your Standalone Accessory. The difference is when adding in Home.app: In the case of the Bridge, adding the Bridge adds all Accessory linked to that Bridge and in the case of the Standalone Accessory, you only add itself.

Configuration

You will find below a table showing all the parameters and when they are used, as well as the list of parameters and their usefulness.

Service Hierarchy Host Type
Field Parent Linked Bridge Accessory
Service X X X X
Bridge X X
Accessory X X
Parent Service X
Manufacturer X X
Serial Number X X
Model X X
Firmware Revision X X
Hardware Revision X X
Software Revision X X
Topic X X X X
Filter on Topic X X X X
Name X X X X
Characteristic Properties X X X X
Wait for Setup X X X X

Service Hierarchy

Choose if this node will represent Parent (or Primary) Service or Linked one.

Option Description
Parent Node will be used as Primary Service. The Primary Service must match the primary function of the accessory and must also match with the accessory category. An accessory must expose only one primary service from its list of available services.
Linked Node will be used as a Linked Service. Linked Services allows accessories to specify logical relationship between services. A service can link to one or more services. A service must not link to itself. Service links have context and meaning only to the first level of services that it links to.

Example

We want to configure Air Quality Sensor which is battery powered. We need to define Air Quality Sensor (Parent) and Battery (Linked).

Service Hierarchy Node-Red

In Home.app room view it will be displayed as one accessory.

Service Hierarchy Home.app Overview

In Home.app in accessory detail view you will also notice battery percentage.

Service Hierarchy Home.app Details

Service

Select Service from the list which will be used to represent this node.

Parent Service

Select Parent Service from the list to which this node’s Linked Service will be attached to.

Host Type

Option Description
Bridge Service will be hosted behind Bridge.
Accessory Service will be hosted as Standalone Accessory.

Bridge

You can select already created Bridge Node or create a new one.

  • By clicking button with a pencil icon next to it, you can edit currently selected Bridge
  • You can also create a new one by clicking the same button when Add new homekit-bridge… is selected. Adding new HomeKit Bridge

Accessory

You can select already created Standalone Accessory Node or create a new one.

  • By clicking button with a pencil icon next to it, you can edit currently selected Accessory
  • You can also create a new one by clicking the same button when Add new homekit-standalone… is selected. Adding new HomeKit Standalone Accessory

Fields

Below is a list of fields that you can fill, it is not mandatory but it can be used to identify the characteristics of your services.

  • Manufacturer
  • Serial Number
  • Model
  • Firmware Revision
  • Hardware Revision
  • Software Revision

Topic

The Topic serves two purposes:

  • at the entrance to the HomeKit node, it allows messages to be filtered.
  • at the exit of the HomeKit node, it identifies the message.

Filter on Topic

This option is used to filter messages entering the HomeKit node. It will only pass messages with the matching msg.topic.

Name

This name will be displayed on your node and also in Home.app. It is also possible to change the name in Home.app of your service but this will not change the name of your node.

Characteristic Properties

Characteristic Properties tell HomeKit that the service will use that characteristic and set desired limits.

Wait for Setup

Wait for Setup is ….?

Input Messages

Input messages have the following structure:

msg = {
  payload: {
    Characteristics: Value,
  },
};

Output Messages

Output Messages use the structure of the Input Messages with the particularity of having in addition msg.hap when the request comes from HomeKit and of having the possibility of being able to allow or disallow Passthrough Messages.

Edit this page on GitHub