ayatec logo
Home Store Blog Contact
unicontrol user guide by ayatec
Home Store Blog Contact

Topics

  1. Welcome
  2. Getting started
    1. What is unicontrol
    2. How it works
    3. Connectivity
    4. Integration options
    5. Default hardware
    6. Hardware extensions
    7. Special sensors
    8. RGB driver
    9. Audio driver
    10. Network API - HTTP
    11. Network API - MQTT
    12. Network security
    13. Downloads
  3. Web Interface
    1. Processes
      1. Process
      2. Name
      3. Main state
      4. Initial state
      5. Display
      6. Constraints
        1. Process timer
        2. Variable contraints
        3. Force output
      7. Input
        1. Input source
        2. Channel
        3. Control period
        4. Value
        5. Publish
        6. Frequency
        7. Subtopic
      8. Events
        1. On/Off event
        2. Condition
        3. Idle/running time
        4. Delay on/off
        5. Fade in/out
        6. High/low input
        7. Mid point/Tolerance
        8. Out on when
      9. Output
        1. Primary output
        2. Action
        3. Type
        4. Invert
        5. Duty cycle
        6. Mem value
        7. High/low output
        8. Folder/Track
        9. RGB mode
        10. RGB color
        11. RGB brightness
        12. RGB speed
        13. Publish
        14. Subtopic
        15. Secondary outputs
      10. Cycle
        1. Cycles
        2. High/Low phase
      11. On/Off button
    2. Peripheral
      1. Hardware
      2. Type
      3. Calibration
      4. Mapping (edit)
      5. IR remote (edit)
      6. Impulse_counter (edit)
      7. RGB driver (edit)
      8. DS18B20 (edit)
    3. Device
    4. Network
    5. System
    6. License
  4. Tutorials
    1. First boot
    2. First process
    3. Connect to MQTT
    4. Process sequencing

    5. DIY Project: Bath Fan

In this article

  • Introduction
advert
unicontrol > Web interface > Processes > Constraints > Variable constraints

Variable constraints

Allows employing up to 3 additinal conditions based on the current state or value of any of the available peripherals. These conditions are working as additional contraints to Process timer, jointly determining whether the process is sleeping or active. The process is then active if and only if all conditions are met. Each condition is constructed as follows:

  • Peripheral - variable input for the condition selected from the list below.
  • [VALUE] Peripheral
    0-8Digital pins D0-D8
    11Analog pin A0
    21-28Analog Multiplexer pins I1-I8
    31-42Shift Register pins RE1-RE12
    51-58Memory slots MEM1-MEM8
    99none
  • Operator - defines the expected relation between the selected Peripheral reading and the test value. If the reading is analogue then the operator is inequality and can be changed by clicking on it in the interface. The default operator is < (less) and corresponds to the [VALUE] = 0 while [VALUE] = 1 represents < (greater). If the reading is logical then the operator automatically changes to = (operator choice has then no effect).
  • Test value - threshold for the inequality or the expected value of the equality. Any [VALUE] between -9999 and +9999 can be provided.
  • Unit - represents the measurement unit defined by user or implied from the input choice and serves only for information purposes (it does not affect the process).
If applicable, the inequality of the underlying condition may be changed by clicking on it.
Only up to 3 active contraints can be defined on a single process, but combining multiple processes via memory slots MEM1 - MEM8 can significantly increase complexity.

HTTP

The device will accept HTTP requests at the following URLs related to:

  • Peripherals:

(POST) http://[IPv4]/var_set?param=cstt[1-3]_[PROCESS ID]&val=[VALUE]
(GET) http://[IPv4]/var_request?param=cstt[1-3]_[PROCESS ID]

  • Operators:

(POST) http://[IPv4]/var_set?param=csts[1-3]_[PROCESS ID]&val=[VALUE]
(GET) http://[IPv4]/var_request?param=csts[1-3]_[PROCESS ID]

  • Thresholds:

(POST) http://[IPv4]/var_set?param=cstv[1-3]_[PROCESS ID]&val=[VALUE]
(GET) http://[IPv4]/var_request?param=cstv[1-3]_[PROCESS ID]

A combination of:

POST: http://192.168.1.255/var_set?param=cstt1_8&val=11
POST: http://192.168.1.255/var_set?param=csts1_8&val=0
POST: http://192.168.1.255/var_set?param=cstv1_8&val=15

will enable the Process #8 to only run when the temperature measured on A0 falls below 15°C.

Learn more in HTTP API.

MQTT

This parameter cannot be accessed via MQTT. Learn more in MQTT API.

Examples

Following process will only control the relevant output only if, additionally to satisfying the Process timer, also following conditions are met:

  • Reading on analog pin A0 is below 15°C, and
  • Reading on digital pin D8 is HIGH.

This process is clearly inactive at the moment as the current D8 reading is LOW, effectively disabling the relevant process.

© 2024 ayatec.eu • Found a mistake?  Let us know!