Skip to content

Typicals

Alessandro Del Pex edited this page Nov 5, 2019 · 16 revisions

Introduction

In Souliss the logics driving your lights, curtains, LED, and other appliances are pre-configured into so called Typicals. A Typical is an abstracted device with a predefined set of input and output commands and a well-known behavior. They are used to standardize the user interface and have a configuration-less behavior. Typicals are a logical interface between run-time souliss framework and clients/app.

Once an user interface is started, it usually asks the full list of Typicals; each node replies with a list of available ones in the current setup, so that the user interface will discover the supported set of functionalities/commands. SoulissApp collects the Typicals at time of building the database, after a list of all functionality are available for remote control.

The node has a data structure build in SLOT and each TYPICAL is associated to one or more SLOT. Once assigned the logic of the TYPICAL reads periodically from the input SLOT and write back in the relevant output in order to drive the physical attached device. There can be up to 24 slots on each node, but the numer will likely be limited by hardware PINs available.

Each TYPICAL has a predefined set of acceptable input commands and relevant outputs, this allows an easy interaction since it works like an agreement between low-level layer and various clients (android, iOS, whatever)

NEVER FORGET

Souliss SLOTs are related to the node itself, as example, you can have two Typicals with SLOT 0 in the same souliss network, but you can't have two Typicals with SLOT 0 in the same node.

Be careful that each Typical (as you can see below) use one or more slots, ensure that you never overlap slots. As example: T11 use only one slot, T16 use four slot and T19 two slot.

#define MyT19Node 0 //this typical use 2 slot so the next slot available is 2
#define MyT16Node 2 //this tipical use 4 slot so the next slot available is 6
#define MyT11Node 6 //this typical use 1 slot so the next slot available is 7

Group of Typicals

The Typicals are grouped in 5 collections

Group name Description
T1n Contains all Typicals from T11 to T1F. Is used for Lights, Door and Gates
T2n Contains all Typicals from T21 to T2F. Is used for motorized garage door and curtains
T3n Contains all Typicals from T31 to T3F. Is used for temperature control
T4n Contains all Typicals from T41 to T4F. Is used for anti-theft and anti-intrusion integration
T5n Contains all Typicals from T51 to T5F. Is used for analog measurements
T6n Contains all Typicals from T61 to T6F. Is used for analog setpoint

Lights, Doors and Gates (T1n)

Name Description Number of SLOT
T11 Typical 11 : ON/OFF Digital Output with Timer Option 1
T12 Typical 12 : ON/OFF Digital Output with AUTO mode 1
T13 Typical 13 : Digital Input Value 1
T14 Typical 14 : Pulse Digital Output 1
T15 Typical 15 : RGB Light 2
T16 Typical 16 : RGB LED Strip 4
T18 Typical 18 : ON/OFF Digital Output (Step Relay) 1
T19 Typical 19 : Single Color LED Strip 2
T1A Typical 1A : Digital Input Pass Through 1
T1B Typical 1B : Position Constrained ON/OFF Digital Output 1

List of Input command and Output values for T1n Group

INPUT COMMANDS

Name Value Description
Souliss_T1n_ToggleCmd 0x01 Toggle Command
Souliss_T1n_OnCmd 0x02 ON Command
Souliss_T1n_OffCmd 0x04 OFF Command
Souliss_T1n_AutoCmd 0x08 AUTO Mode Command
Souliss_T1n_BrightUp 0x10 Increase Light
Souliss_T1n_BrightDown 0x20 Decrease Light
Souliss_T1n_Flash 0x21 Flash Light
Souliss_T1n_Set 0x22 Set a state
Souliss_T1n_OnFeedback 0x23 Report the actual state as ON
Souliss_T1n_OffFeedback 0x24 Report the actual state as OFF
Souliss_T1n_Timed 0x30 Timed ON
Souliss_T1n_Timed_StdVal 0x40 Timed ON Standard Value
Souliss_T1n_PositionOnCmd 0x31 Position constrained ON Command
Souliss_T1n_RstCmd 0x00 Reset

OUTPUT VALUES

Name Value Description
Souliss_T1n_AutoState 0xF0 AUTO Mode Feedback
Souliss_T1n_Coil 0x01 Output Feedback ON
Souliss_T1n_OnCoil 0x01 Output Feedback ON
Souliss_T1n_OffCoil 0x00 Output Feedback OFF
Souliss_T1n_ResetCoil 0xA1 Pulse Output Coil (Reset)
Souliss_T1n_PulseCoil 0xA5 Pulse Output Coil (Set)
Souliss_T1n_TimedOnCoil 0xE1 Output Feedback ON in Timed Mode
Souliss_T1n_TimedOffCoil 0xE0 Output Feedback OFF in Timed Mode
Souliss_T1n_AutoOnCoil 0xF1 Output Feedback ON in AUTO Mode
Souliss_T1n_AutoOffCoil 0xF0 Output Feedback OFF in AUTO Mode
Souliss_T1n_GoodNight 0xF1 Output Feedback ON in GoodNight Mode

Motorized Garage Door and Curtains (T2n)

Name Description Number of SLOT
T21 Typical 21 : Motorized devices with limit switches 1
T22 Typical 22 : Motorized devices with limit switches and middle position 1

List of Input commands and Output values for T2n Group

INPUT COMMANDS

Name Value Description
Souliss_T2n_CloseCmd_SW 0x01 Close Command
Souliss_T2n_OpenCmd_SW 0x02 Open Command
Souliss_T2n_StopCmd 0x04 Stop Command
Souliss_T2n_CloseCmd_Local 0x12 Close Command (only from local pushbutton)
Souliss_T2n_OpenCmd_Local 0x10 Open Command (only from local pushbutton)
Souliss_T2n_ToggleCmd 0x08 Toggle Command
Souliss_T2n_LimSwitch_Close 0x14 Close Feedback from Limit Switch
Souliss_T2n_LimSwitch_Open 0x16 Open Feedback from Limit Switch
Souliss_T2n_RstCmd 0x00 Reset Command

OUTPUT VALUES

Name Value Description
Souliss_T2n_LimSwitch_Close 0x08 Close Feedback from Limit Switch
Souliss_T2n_LimSwitch_Open 0x10 Open Feedback from Limit Switch
Souliss_T2n_NoLimSwitch 0x20 No Limit Switch
Souliss_T2n_Coil_Close 0x01 Closing
Souliss_T2n_Coil_Open 0x02 Opening
Souliss_T2n_Coil_Stop 0x03 Stopped
Souliss_T2n_Coil_Off 0x00 Start state that will become Souliss_T2n_Coil_Stop

Temperature Control (T3n)

Name Description Number of SLOT
T31 Typical 31 : Temperature control with cooling and heating mode 5
T32 Typical 32 : Air Conditioner 2

List of Input command and Output values for T3n Group

INPUT VALUES

Name Value Description
Souliss_T3n_InSetPoint 0x01 Increase Setpoint Command
Souliss_T3n_OutSetPoint 0x02 Decrease Setpoint Command
Souliss_T3n_AsMeasured 0x03 Setpoint equal to actual measure
Souliss_T3n_Cooling 0x04 Set cooling mode
Souliss_T3n_Heating 0x05 Set heating mode
Souliss_T3n_FanOff 0x06 Heating / Cooling Fan Off
Souliss_T3n_FanLow 0x07 Heating / Cooling Fan Low
Souliss_T3n_FanMed 0x08 Heating / Cooling Fan Medium
Souliss_T3n_FanHigh 0x09 Heating / Cooling Fan High
Souliss_T3n_FanAuto 0x0A Heating / Cooling Fan Automatic
Souliss_T3n_FanManual 0x0B Heating / Cooling Fan Manual
Souliss_T3n_SetTemp 0x0C Set the setpoint
Souliss_T3n_ShutDown 0x0D Shut down heating and cooling

OUTPUT VALUES

Name Value Description
Souliss_T3n_SystemOn 0x01 System On
Souliss_T3n_HeatingOn 0x02 Heating Active
Souliss_T3n_CoolingOn 0x04 Cooling Active
Souliss_T3n_FanOn1 0x08 Fan 1 Running
Souliss_T3n_FanOn2 0x10 Fan 2 Running
Souliss_T3n_FanOn3 0x20 Fan 3 Running
Souliss_T3n_FanAutoState 0x40 Fan set in Automatic
Souliss_T3n_HeatingMode 0x80 State set as heating if not active
Souliss_T3n_CoolingMode 0x80 State set as cooling if active

Anti-Theft and Anti-Intrusion Integration (T4n)

Name Description Number of SLOT
T41 Typical 41 : Anti-theft integration (Main) 1
T42 Typical 42 : Anti-theft integration (Peer) 1

List of Input command and Output values for T4n Group

INPUT VALUES

Name Value Description
Souliss_T4n_Alarm 0x01 Alarm Condition Detected (Input)
Souliss_T4n_ReArm 0x03 Silence and Arm Command
Souliss_T4n_NotArmed 0x04 Anti-theft not Armed Command
Souliss_T4n_Armed 0x05 Anti-theft Armed Command

OUTPUT VALUES

Name Value Description
Souliss_T4n_Antitheft 0x01 Anti-theft Armed Feedback
Souliss_T4n_NoAntitheft 0x00 Anti-theft not Armed Feedback
Souliss_T4n_InAlarm 0x03 Anti-theft in Alarm

Analog Measurements/Sensors (T5n)

Name Description Number of SLOT
T51 Typical 51 : Analog input, half-precision floating point 2
T52 Typical 52 : Temperature measure (-20, +50) °C 2
T53 Typical 53 : Humidity measure (0, 100) % 2
T54 Typical 54 : Light Sensor (0, 40) kLux 2
T55 Typical 55 : Voltage (0, 400) V 2
T56 Typical 56 : Current (0, 25) A 2
T57 Typical 57 : Power (0, 6500) W 2
T58 Typical 58 : Pressure measure (0, 1500) hPa 2

All the T5n accept as input an half precision floating point and return it as output, this is used to store a value from an sensor and get it available in the user interfaces.

Analog Setpoints (T6n)

Name Description Number of SLOT
T61 Typical 61 : Analog setpoint, half-precision floating point 2
T62 Typical 62 : Temperature measure (-20, +50) °C 2
T63 Typical 63 : Humidity measure (0, 100) % 2
T64 Typical 64 : Light Sensor (0, 40) kLux 2
T65 Typical 65 : Voltage (0, 400) V 2
T66 Typical 66 : Current (0, 25) A 2
T67 Typical 67 : Power (0, 6500) W 2
T68 Typical 68 : Pressure measure (0, 1500) hPa 2

All the T6n accept as input an half precision floating point and return it as output, use T6n to input a setpoint from an user interfaces and use it into custom logic in the node.

Use of Typicals Logic

As per Data Structure each logics (TYPICAL) is associated to a slot (one or more than one) from where it gets the inputs value and set the output ones.

As general syntax is only required to specify the slot,

Set_T16(slot)	
Logic_T16(slot)

The Logic_T16 when executed will read input data from the relevant input slot number and will place the result on the relevant output slot number. Send a command to a logic on SLOT means write on the relevant input slot using the SoulissAPI like DigIn, DigInHold and others.

The user interface need to know the typical number and the relevant SLOT in order to have the list of available commands that can be send and the input SLOT where those have to be written.

Clone this wiki locally