NIKO

From HSYCO
Revision as of 14:44, 11 November 2020 by Gianluca (talk | contribs) (→‎3.8.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This driver acts as an MQTT client (publisher/subscriber) for HSYCO and establishes a connection with Niko Connected Controller in order to control Niko actions associated with lights and dimmers; it fully supports MQTT version 3.1.1. This driver uses Java methods from the library Eclipse Paho, version 1.2.2.

Note  This driver requires a JWT token to communicate with Niko Connected Controller. The JWT token and username are provided by Niko. The JWT token is unique per integrator/partner and can be used to connect to all Niko Connected Controllers via the local network. It is partner’s responsibility to keep the confidentiality of the token. The connected controller needs to be online when the token is used for the first time on that connected controller.

HSYCO Configuration

Add the NIKO I/O Server in the I/O Servers section of the Settings and set its parameters:

Communication

  • IP Address: host name or IP address of the Niko Connected Controller
  • IP Port: TCP/IP port of the Niko Connected Controller

Authentication

  • User: username for authentication with Niko Connected Controller, as provided by Niko
  • Password: token for authentication with Niko Connected Controller, as provided by Niko

Options

ID Default Values Description
startupevents false true generate IO events also during the driver’s start-up phase
false start generating events only after HSYCO is aligned with the current status of the system
cleansession false true cleans eventually existing previous session held by Niko Connected Controller. This will remove any previous subscription and unacknowledged messages
false restores eventually existing previous session held by Niko Connected Controller. This will restore all existing subscriptions and resend any unacknowledged message
keepalive 60 n >= 0 this value, measured in seconds, defines the maximum time interval between messages sent or received. It enables this driver to detect if Niko Connected Controller is no longer available. In the absence of a data-related message during this time period, the client sends a very small "ping" message, which the server will acknowledge. A value of 0 disables keepalive processing in the client.
connecttimeout 30 n >= 0 this value, measured in seconds, defines the maximum time interval this driver will wait for network connection to Niko Connected Controller to be established. A value of 0 disables timeout processing meaning the driver will wait until the network connection is made successfully or fails.
messageqos 0 0 every publish message is sent at most one time, so it doesn't receive acknowledge message from Niko Connected Controller
1 every publish message is sent at least one time, so it waits acknowledge message from Niko Connected Controller
2 every publish message is sent exactly one time, so there will be a series of acknowledge messages between this driver and Niko Connected Controller

Datapoints

ID Value R/W Description
connection online R the client is connected to the MQTT broker
offline R initialization of the driver failed or loop cycle failed
action.<actionName> 0 R light/dimmer controlled by <actionName> is off
W turn off light/dimmer controlled by <actionName>
off W turn off dimmer controlled by <actionName>
1 R light controlled by <actionName> is on
W turn on light controlled by <actionName>
on W turn on dimmer controlled by <actionName>
1 ... 100 R light level of dimmer associated with <actionName>
W set light level of dimmer associated with <actionName> to the specified value
action.<actionName>.uuid <action_id> R the unique identifier corresponding to <actionName>
devices.list <message> R list of all actions and devices, in JSON format, associated with Niko Connected Controller
publish <message> R/W the driver published a message, in JSON format, to Niko Connected Controller
error.message <message> R descriptive message of the error generated in Niko Connected Controller
error.code <message> R error tag, identifying the error code generated in Niko Connected Controller

Note 

All whitespaces contained in action names taken from Niko Home Control Software are converted into char '_'. E.g. "Control Light 1" becomes "Control_light_1"

All duplicate action names taken from Niko Home Control Software are converted automatically into unique names by appending at the end of the action name the following chars: '_' + <n>, where <n> is the number of occurrences of action name. E.g. If there are 3 actions with name "Control_light" they are transformed respectively into "Control_light", "Control_light_2", "Control_light_3"

All publish messages with QoS > 0 are temporarily stored in the directory "qos2store" waiting for the acknowledge by the MQTT broker. Once they are acknowledged they are deleted.

Release Notes

3.8.0

  • initial release


NIKO is a registered trademark of NIKO GROUP NV