comelit-client
TypeScript icon, indicating that this package has built-in type declarations

2.5.3 • Public • Published

CircleCI npm version

Comelit CLI

A simple command line tool to interact with the Comelit HUB, Comelit Serial Bridge and Vedo Alarm.

The package contains three different tools:

  1. comelit - a CLI to interact with the Comelit HUB (https://pro.comelitgroup.com/product/20003150)
  2. vedo - a CLI to interact with Comelit Vedo Alarm
  3. comelit-sb - a CLI to interact with comelit Serial Bridge (https://pro.comelitgroup.com/product/20003101)

Installation

To install this tool use the command:

npm install -g comelit-client@latest

Comelit CLI

Vedo Alarm CLI

This is the CLI to interact with VEDO alarm. Vedo has is own WEB UI that could be different from the serial bridge one. This is why is a separate tool.

Basic usage

When using the tool, you always have to pass the host and the port of the VEDO UI. Port is not mandatory, the default is 80.

To get the description of configured areas, use the area along with --desc option:

vedo -h VEDO_IP -p PORT area --desc --code <ARM/DISARM CODE>

To get the status of all areas, use the area along with --status option:

vedo -h VEDO_IP -p PORT area --status --code <ARM/DISARM CODE>

To get the active areas, use --active parameter:

vedo -h VEDO_IP -p PORT area --active --code <ARM/DISARM CODE>

To arm the system, use --arm parameter followed by the area number (32 means all the system):

vedo -h VEDO_IP -p PORT area --arm 32 --code <ARM/DISARM CODE>

To arm a specific shortcut, use --arm parameter followed by the area number (32 means all the system):

vedo -h VEDO_IP -p PORT area --arm 32 --shortcut p1 --code <ARM/DISARM CODE>

To disarm the system, use --disarm parameter followed by the area number (32 means all the system):

vedo -h VEDO_IP -p PORT area --disarm 32 --code <ARM/DISARM CODE>

To get the description of configured zones, use the zone along with --desc option:

vedo -h VEDO_IP -p PORT zone --desc --code <ARM/DISARM CODE>

To get the status of area use the area along with --status option:

vedo -h VEDO_IP -p PORT zone --status --code <ARM/DISARM CODE>

Comelit Serial Bridge

This is a CLI to interact with the old serial bridge. This model uses polling to update status on external systems.

Basic usage

When using the tool, you always have to pass the host and the port of the serial bridge. Port is not mandatory, the default is 80.

comelit-sb -h SERIAL_BRIDGE_IP -p PORT

You can query the system and ask to show the current configuration of the house by using one of the following commands in conjunction to the parameter --list:

  • rooms - prints the list of rooms in the house
  • lights - prints the list of lights in the house
  • shutters - prints out the list of shutters/blinds
  • clima - prints out the list of thermostats/dehumidifiers in the house

Rooms

Rooms only support list action:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT rooms --list
GEN#PL#0 - root
GEN#PL#1 - Living room
GEN#PL#2 - Kitchen
GEN#PL#3 - Hallway
GEN#PL#4 - Room 1
GEN#PL#5 - Room 2
GEN#PL#6 - Bedroom
GEN#PL#7 - Bathroom 1
GEN#PL#8 - Bathroom 2
GEN#PL#9 - Terrace

Lights

As with rooms you can get the list of the house lights by using the lights command:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT lights --list
0 - Entrance spotlights (status ON)
1 - Main entrance (status OFF)
2 - Kitchen (status OFF)
3 - Main living room (status OFF)
4 - Spotlights living room (status OFF)
5 - Bedroom left (status OFF)
6 - Bedroom right (status OFF)
7 - Bathroom 1 (status OFF)
8 - Bathroom 2 (status OFF)
9 - Terrace (status OFF)

Then, with the number printed in the list, you can interact with the specific light and turn it on and off:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT lights --toggle 3

The above command should toggle light number 3 of the list.

Shutters

Shutters work in the same way of lights. Use:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT shutters --list

to get a list of shutters in the house. Then use:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT shutters --toggle 0

to open/close the shutter number 0 in the list

Outlets / Other devices

Outlets work in the same way of lights. Use:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT outlets --list

to get a list of outlets in the house. Then use:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT outlets --toggle 0

to turn on/off the outlet number 0 in the list

Thermostats and dehumidifiers

To get a list of thermostats in the house use the command

comelit-sb -h SERIAL_BRIDGE_IP -p PORT clima --list

Then, to turn on and off a specific thermostat, use

comelit-sb -h SERIAL_BRIDGE_IP -p PORT clima --toggle 0

To change the temperature for a specific thermostat, use the --temp parameter:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT clima --toggle 0 --temp 21.5

The above command will set the temperature of thermostat 0 to 21.5 Celsius degrees.

To change the season for a specific thermostat, use the --season parameter:

comelit-sb -h SERIAL_BRIDGE_IP -p PORT clima --toggle 0 --season [summer|winter]

Comelit HUB

This is a CLI to interact with the new HUB. This model uses MQTT to update status on external systems.

Basic usage

When using the tool, you can pass the host of the HUB. If you don't specify them, the CLI will try to find it on your network automatically.

comelit -h HUB_IP

You can query the system and ask to show the current configuration of the house by using one of the following commands in conjunction to the parameter --list:

  • rooms - prints the list of rooms in the house
  • lights - prints the list of lights in the house
  • shutters - prints out the list of shutters/blinds
  • clima - prints out the list of thermostats/dehumidifiers in the house
  • others - prints out the list of uncategorized (others) devices in the house

Rooms

Rooms only support list action:

comelit rooms --list
GEN#PL#0 - root
GEN#PL#1 - Living room
GEN#PL#2 - Kitchen
GEN#PL#3 - Hallway
GEN#PL#4 - Room 1
GEN#PL#5 - Room 2
GEN#PL#6 - Bedroom
GEN#PL#7 - Bathroom 1
GEN#PL#8 - Bathroom 2
GEN#PL#9 - Terrace

Lights

As with rooms you can get the list of the house lights by using the lights command:

comelit lights --list
DOM#LT#0 - Entrance spotlights (status ON)
DOM#LT#1 - Main entrance (status OFF)
DOM#LT#2 - Kitchen (status OFF)
DOM#LT#3 - Main living room (status OFF)
DOM#LT#4 - Spotlights living room (status OFF)
DOM#LT#5 - Bedroom left (status OFF)
DOM#LT#6 - Bedroom right (status OFF)
DOM#LT#7 - Bathroom 1 (status OFF)
DOM#LT#8 - Bathroom 2 (status OFF)
DOM#LT#9 - Terrace (status OFF)

Then, with the ID printed in the list, you can interact with the specific light and turn it on and off:

comelit lights --toggle DOM#LT#3

The above command should toggle light with ID DOM#LT#3 of the list.

Shutters

Shutters work in the same way of lights. Use:

comelit shutters --list

to get a list of shutters in the house. Then use:

comelit shutters --toggle DOM#BL#0

to open/close the shutter with ID DOM#BL#0 in the list

Outlets devices

Outlets work in the same way of lights. Use:

comelit outlets --list

to get a list of outlets in the house. Then use:

comelit outlets --toggle DOM#LC#0

to turn on/off the outlet with ID DOM#LC#0 in the list

Thermostats and dehumidifiers

To get a list of thermostats in the house use the command

 comelit clima --list

Then, to turn on and off a specific thermostat, use

comelit clima --toggle DOM#CL#0

To change the temperature for a specific thermostat, use the --temp parameter:

comelit clima --toggle DOM#CL#0 --temp 21.5

The above command will set the temperature of thermostat DOM#CL#0 to 21.5 Celsius degrees.

To change the season for a specific thermostat, use the --season parameter:

comelit clima --toggle DOM#CL#0 --season [summer|winter]

ICONA Manager CLI - alpha support

Please note that ICONA integration is in very alpha stage.

To use ICONA integration you need to get the secret token by following this guide. Once you have the token, you can request the configuration of the system using this call:

icona -t SECRET_TOKEN -h BRIDGE_HOST -p BRIDGE_PORT get-config all 

if you have the Comelit HUB, BRIDGE_HOST is the hub ip while BRIDGE_PORT is 64100. To get the list of doors/gates you can manage use this command

icona -t SECRET_TOKEN -h BRIDGE_HOST -p BRIDGE_PORT list-doors 

You should get an output like this:

    name: CANCELLO
    apt-address: '00000100'
    output-index: 2
    secure-mode: false

Now you can use the following command to open the door:

icona -t SECRET_TOKEN -h BRIDGE_HOST -p BRIDGE_PORT open-door CANCELLO

If it doesn't work, please repeat the command adding option -d and open an issue with the output you get.

Package Sidebar

Install

npm i comelit-client

Weekly Downloads

114

Version

2.5.3

License

Apache-2.0

Unpacked Size

336 kB

Total Files

67

Last publish

Collaborators

  • madchicken