@lahoco/node-red-contrib-lahoco-core
Version:
Node-RED LAHOCO nodes bundle
376 lines (285 loc) • 24 kB
Markdown
# node-red-contrib-lahoco-core
LAHOCO Core is made to control the devices of a LAHOCO installation. It allows you to create customized
automation systems, interconnect with other systems and manage devices as desired.
> **_Warning_:** This version only works with LAHOCO 5.3 or higher.
<!-- TOC -->
* [Prerequisites](#prerequisites)
* [Setup](#setup)
* [Usage](#usage)
* [Properties](#properties)
* [Nodes](#nodes)
* [Access](#access)
* [Sectional door](#sectional-door)
* [Alarm](#alarm)
* [Control](#control)
* [SWITCH](#switch)
* [Heating](#heating)
* [Lighting](#lighting)
* [On/Off](#onoff)
* [Dimmer](#dimmer)
* [RGB](#rgb)
* [RGBW](#rgbw)
* [White temperature](#white-temperature)
* [RGBW white temperature](#rgbw-white-temperature)
* [Other](#other)
* [Outlet](#outlet)
* [Scene](#scene)
* [Sensor](#sensor)
* [Window](#window)
* [Contact](#contact)
* [Temperature](#temperature)
* [Presence](#presence)
* [Humidity](#humidity)
* [Brightness](#brightness)
* [Wind speed](#wind-speed)
* [Wind direction](#wind-direction)
* [Rain](#rain)
* [Night](#night)
* [Shading](#shading)
* [RS / AW1 / Pergola / Pool Cover](#rs--aw1--pergola--pool-cover)
* [VB](#vb)
* [AW2](#aw2)
* [Watering](#watering)
<!-- TOC -->
## Prerequisites
To use a node, the LAHOCO server must be **up and running**.
You must know the serial number or the ip of your LAHOCO server
## Setup
1. Open the configuration page of the node and select a server or add/modify it by clicking on the **plus icon** or **pencil icon**.
2. You can now select a device from the list.
You should see them in the drop-down list with their type in brackets.
When you select a device, the name automatically changes with its name, but you can also change it manually.
## Usage
Several possibilities are available to you.\
You can give commands to the node (**input**) via a JSON object, view the status (**status** under the node) and get the status (**output
**).
For the input, you need to give a **JSON object** with all the commands included. This JSON object must be set in the `msg.payload`.\
The commands are read and executed one after the other from top to bottom.
Here is an example:\
First we set the brightness to 25%, and after we toggle the state to off (we set the brightness just before)
```json
{
"brightness": 25,
"toggle": true
}
```
### Properties
This is all the properties that this node supports. Not all the devices support all the options!
Not all the properties can be readable (output) and writeable (input), therefore, in the description of each property you can see `in`
and/or `out`.
All the properties that are supported for the selected device in the node and that have the **out** property are returned to the output of
the node as a JSON object.
All the devices have the `state` property that allows to get manually the actual state of the device.
## Nodes
These are all the nodes provided by this module :
---
### Access
#### Sectional door
| Property | Type | Direction | Description |
|------------|--------------------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `up` | boolean | in/**out** | Move up to stop or until device stop |
| `stop` | boolean | in/**out** | Stop the movement |
| `down` | boolean | in/**out** | Move down to stop or until device stop |
| `dimming` | {behavior: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `position` | number | out | Percentage value of the position (0–100) (0 = open \| 100 = close) |
### Alarm
| Property | Type | Direction | Description |
|----------|---------|-----------|-----------------|
| `active` | boolean | **out** | Alarm is active |
### Control
#### SWITCH
| Property | Type | Direction | Description |
|------------|---------|-----------|------------------------|
| `pressed` | boolean | **out** | Currently pressed |
| `behavior` | string | **out** | Pressed state behavior |
| `keyMask` | string | **out** | Pressed key mask |
### Heating
| Property | Type | Direction | Description |
|---------------|--------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `status` | string | **out** | Current heating status |
| `setPoint` | number | in/**out** | Desired temperature (8-25) |
| `temperature` | number | **out** | Temperature observed |
### Lighting
#### On/Off
Simple light (on | off)
| Property | Type | Direction | Description |
|----------|---------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `toggle` | boolean | in | Toggles between switch on and off |
#### Dimmer
Light with variable intensity (0–100%)
| Property | Type | Direction | Description |
|--------------|------------------------------------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `toggle` | boolean | in | Toggles between switch on and off |
| `brightness` | number | in/**out** | Percentage value of brightness (0–100) |
| `dimming` | {behavior: string, target: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `increase` | number | in | Percentage value of the brightness (0–100) to increase |
| `decrease` | number | in | Percentage value of the brightness (0–100) to decrease |
#### RGB
Light with variable color [r, g, b]
| Property | Type | Direction | Description |
|--------------|--------------------------------------------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `toggle` | boolean | in | Toggles between switch on and off |
| `brightness` | number | in/**out** | Percentage value of brightness (0–100) |
| `rgb` | {red: number, green: number, blue: number} | in/**out** | Change RGB value (0–255) |
| `dimming` | {behavior: string, target: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `increase` | number | in | Percentage value of the brightness (0–100) to increase |
| `decrease` | number | in | Percentage value of the brightness (0–100) to decrease |
#### RGBW
Light with variable color [r, g, b] and white
| Property | Type | Direction | Description |
|--------------|--------------------------------------------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `toggle` | boolean | in | Toggles between switch on and off |
| `brightness` | number | in/**out** | Percentage value of brightness (0–100) |
| `rgb` | {red: number, green: number, blue: number} | in/**out** | Change RGB value (0–255) |
| `white` | number | in/**out** | Change RGB value (0–100) |
| `dimming` | {behavior: string, target: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `increase` | number | in | Percentage value of the brightness (0–100) to increase |
| `decrease` | number | in | Percentage value of the brightness (0–100) to decrease |
| `toWhite` | boolean | in | Switch to white mode |
| `toRGB` | boolean | in | Switch to rgb mode |
#### White temperature
Dimmer light with white temperature
| Property | Type | Direction | Description |
|--------------|------------------------------------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `toggle` | boolean | in | Toggles between switch on and off |
| `brightness` | number | in/**out** | Percentage value of brightness (0–100) |
| `whiteTemp` | number | in/**out** | Change white temperature value (2000–6000) |
| `dimming` | {behavior: string, target: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `increase` | number | in | Percentage value of the brightness (0–100) to increase |
| `decrease` | number | in | Percentage value of the brightness (0–100) to decrease |
#### RGBW white temperature
Dimmer light with variable color [r, g, b] and white temperature
| Property | Type | Direction | Description |
|--------------|--------------------------------------------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `toggle` | boolean | in | Toggles between switch on and off |
| `brightness` | number | in/**out** | Percentage value of brightness (0–100) |
| `rgb` | {red: number, green: number, blue: number} | in/**out** | Change RGB value (0–255) |
| `whiteTemp` | number | in/**out** | Change white temperature value (2000–6000) |
| `dimming` | {behavior: string, target: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `increase` | number | in | Percentage value of the brightness (0–100) to increase |
| `decrease` | number | in | Percentage value of the brightness (0–100) to decrease |
| `toWhite` | boolean | in | Switch to white mode |
| `toRGB` | boolean | in | Switch to rgb mode |
### Other
#### Outlet
| Property | Type | Direction | Description |
|----------|---------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `toggle` | boolean | in | Toggles between switch on and off |
### Scene
| Property | Type | Direction | Description |
|-------------|---------|-------|--------------------------------|
| `launch` | boolean | in | Launch the scene |
| `activated` | boolean | **out** | True if the scene is activated |
| `updated` | boolean | **out** | True if the scene is updated |
### Sensor
A sensor can have more than one of these properties.
#### Window
| Property | Type | Direction | Description |
|----------|---------|-----------|------------------------------------------------------------------|
| `isOpen` | boolean | **out** | True if is open, false if closed |
| `tilted` | boolean | **out** | True if is open in tilted mode, false if open normally or closed |
#### Contact
| Property | Type | Direction | Description |
|----------|---------|-----------|----------------------------------|
| `isOpen` | boolean | **out** | True if is open, false if closed |
#### Temperature
| Property | Type | Direction | Description |
|-------------------|--------|-----------|---------------------|
| `temperature` | number | **out** | Temperature |
| `temperatureUnit` | string | **out** | Unit of temperature |
#### Presence
| Property | Type | Direction | Description |
|------------|---------|-----------|-----------------------------------------------|
| `presence` | boolean | **out** | True if is detecting a presence, false if not |
#### Humidity
| Property | Type | Direction | Description |
|----------------|--------|-----------|------------------|
| `humidity` | number | **out** | Humidity |
| `humidityUnit` | string | **out** | Unit of humidity |
#### Brightness
| Property | Type | Direction | Description |
|------------------|--------|-----------|--------------------|
| `brightness` | number | **out** | Brightness |
| `brightnessUnit` | string | **out** | Unit of brightness |
#### Wind speed
| Property | Type | Direction | Description |
|-----------------|--------|-----------|--------------------|
| `windSpeed` | number | **out** | Speed of wind |
| `windSpeedUnit` | string | **out** | Unit of wind speed |
#### Wind direction
| Property | Type | Direction | Description |
|-----------------|--------|-----------|-------------------------------------------------------|
| `windDirection` | number | **out** | The angle of the wind direction relative to the north |
#### Rain
| Property | Type | Direction | Description |
|-------------|---------|-----------|-------------------------------------|
| `isRaining` | boolean | **out** | True if it is raining, false if not |
#### Night
| Property | Type | Direction | Description |
|-----------|---------|-----------|-----------------------------------|
| `isNight` | boolean | **out** | True if it is night, false if day |
### Shading
#### RS / AW1 / Pergola / Pool Cover
Roller Shutter / Awning / Pergola / Pool Cover
| Property | Type | Direction | Description |
|------------|--------------------|------------|------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `up` | boolean | in/**out** | Move up to stop or until device stop |
| `stop` | boolean | in/**out** | Stop the movement |
| `down` | boolean | in/**out** | Move down to stop or until device stop |
| `dimming` | {behavior: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `position` | number | in/**out** | Percentage value of the position (0–100) (0 = open \| 100 = close) |
#### VB
Venetian Blind
| Property | Type | Direction | Description |
|---------------|--------------------|------------|----------------------------------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `up` | boolean | in/**out** | Move up to stop or until device stop |
| `stop` | boolean | in/**out** | Stop the movement |
| `down` | boolean | in/**out** | Move down to stop or until device stop |
| `dimming` | {behavior: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `position` | number | in/**out** | Percentage value of the position (0–100) (0 = open \| 100 = close) |
| `orientation` | number | in/**out** | Percentage value of the orientation (0–100) (0 = the slats are open \| 100 = the slats are closed) |
#### AW2
2-sided awning
| Property | Type | Direction | Description |
|---------------|--------------------|------------|----------------------------------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `up` | boolean | in/**out** | Move up to stop or until device stop |
| `stop` | boolean | in/**out** | Stop the movement |
| `down` | boolean | in/**out** | Move down to stop or until device stop |
| `dimming` | {behavior: string} | in | Dimming until the `release` function is triggered |
| `release` | any | in | Release the dimming command |
| `position` | number | in/**out** | Percentage value of the position (0–100) (0 = open \| 100 = close) |
| `position2` | number | in/**out** | Percentage value of the position 2 (0–100) (0 = open \| 100 = close) |
| `orientation` | number | in/**out** | Percentage value of the orientation (0–100) (0 = the slats are open \| 100 = the slats are closed) |
### Watering
| Property | Type | Direction | Description |
|------------|---------|------------|---------------------------------------------------------------------------------------------------|
| `sync` | any | in | Force request of current device state (also updates all other devices) |
| `on` | boolean | in/**out** | Change the on state |
| `duration` | number | in/**out** | Set the watering to ON for the given number of minutes (switch off after the end of the duration) |