IFREEQ Docs
  • Introduction
  • Update Log
  • General Knowledge
    • About IoT
    • Electricity
      • Plug & socket types around the world
        • Power plug & outlet Types A & B
        • Power plug & outlet Type C
        • Power plug & outlet Type D
        • Power plug & outlet Type E
        • Power plug & outlet Type F (Schuko)
        • Power plug & outlet Type G
        • Power plug & outlet Type H
        • Power plug & outlet Type I
        • Power plug & outlet Type J
        • Power plug & outlet Type K
        • Power plug & outlet Type L
        • Power plug & outlet Type M
        • Power plug & outlet Type N
        • Power plug & outlet Type O
      • Full list: Plug, socket & voltage by country
      • Map showing the spread of the different plug types worldwide
      • Useful information for travellers
      • History of domestic electricity
        • Why isn’t there a universal standard electric plug?
        • Why isn’t there a standard voltage around the world?
      • Three-phase electric power (industrial applications only)
    • Certifications
    • Home Automation Brand
    • Home Automation Catalog
    • Industry Term
    • Network Term
    • The Third-party Control
      • AliGenie
      • Amazon Alexa
        • FAQs About Amazon Alexa
      • DuerOS
        • FAQs About DuerOS
      • Google Assistant
        • FAQs About Google Assistant
      • Home Assistant
        • FAQs About Home Assistant
      • HomeKit
        • FAQs About Homekit
      • IFTTT
      • Xiao AI
      • Yandex Alice
        • FAQs About Yandex Alice
  • Developer
    • Introduction
      • What is Tuya Smart?
      • What does Tuya do?
      • Tuya Smart Cloud Platform Overview
      • Advantages
      • Terms
      • Limits
    • Quick Start
    • Configure in Platform
      • Create Products
      • Function Definition
        • Overview
        • Standard Functions
        • Custom Functions
        • Cloud Functions
      • Design App UI
      • Configure Hardware
      • Cloud Configuration
        • Introduction
        • Upgrade Firmwares
        • Set up Multilingual UI
        • Manage Alarms
        • Configure Network for Devices
        • Enable Toggles on App
        • Automate the Smart Devices
      • Mass Production
    • Device Development
      • Access Mode MCU
        • MCU Access Guide
        • Wi-Fi General Solution
          • Wi-Fi Module MCU Development Overview
          • Hardware Design Reference Wi-Fi
          • Software Reference Wi-Fi
            • Tuya Cloud Universal Serial Port Access Protocol
            • Overview of migrating Tuya's MCU SDK
        • Wi-Fi Power Off Fast Connect Device Solution
          • Overview
        • Zigbee General Solution
          • Overview
          • Software development
            • Tuya Zigbee module UART communication protocol
          • Hardware Design
        • BLE General Solution
          • BLE Module MCU Development Overview
          • BLE Hardware Design
        • NB-IoT General Solution
          • NB-IoT Development Guide
          • Introduction to NB Module - NM1
      • Access Mode SoC
        • SoC Development Overview
        • Lighting
          • Guidance
          • Design
          • Test
        • Electrician
          • Guidance
          • Design
          • Test
      • Access Mode Link
        • Wi-Fi Chip SDK
          • Tuya Wi-Fi SDK Reference
          • Development Environment Setup When Using Tuya Wi-Fi SDK
        • BLE Chip SDK
          • TUYA BLE SDK User Guide
        • Zigbee Chip SDK
          • TUYA Zigbee SDK Document
      • Cloud Mode
        • Wi-Fi&BT Dual Mode Module
        • Wi-Fi Module
        • Bluetooth Module
        • Zigbee Module
        • Sub-G Module
      • Tuya Development Boards
      • Access Mode Simmulator
        • Module Debugging Assistant Instruction
      • Embedded License
        • Embedded open source license
    • Smart Product Solution
      • Gateway
        • MCU Access
        • Link SDK Access
        • PCB Details
      • HouseHold
        • Cleaner Robot
        • Air Conditioner
      • IPC
      • Lock
        • BLE Lock
        • Wi-Fi Lock
        • Zigbee Lock
      • Remote Control
      • Voice Product
        • Domestic Voice Speaker Solution
        • Domestic Voice Infrared SoC Solution
        • Overseas Voice Solution
        • Design Reference Materials - Alexa Module
        • Design Reference Materials - Domestic Voice Module
    • Firmware
      • S8E
  • FAQs
    • Device Development
      • Cloud Module
        • Wi-Fi Module
        • Zigbee Module
        • BLE Module
        • GPRS Module
        • NB-IoT Module
        • Dual-mode Module
        • Other Module Issues
      • Access Mode SoC
      • MCU Access Mode
        • Wi-Fi General Solution
        • Zigbee General Solution
        • BLE General Solution
          • BLE Single-point Solution
          • BLE Mesh General Solution
          • Other Issues of BLE Solution
        • NB-IoT General Solution
        • Other Issues of MCU Access Mode
      • Module SDK Development
        • BLE Chip SDK(single point)
        • Linux General SDK
        • NB-IoT Chip SDK
        • Wi-Fi Chip SDK
        • Others about Module SDK
      • Other Issues of Device Development
    • Smart Product Solution
      • Electrical
        • Outlet
        • Scenario Switch
        • Switch
      • Lighting
        • Wi-Fi Lighting
        • Zigbee Lighting
        • Bluetooth Lighting
        • Other Issues of Lighting
      • Lock
        • BLE Lock
        • NB-IoT Lock
        • Wi-Fi Lock
        • Zigbee Lock
        • Other Issues of Lock
      • Sensor
      • Gateway
        • BLE Gateway
        • Wireless Gateway
        • Zigbee Gateway
        • Other Issues of Gateway
      • IPC
      • Infrared Products
        • Infrared remote control
        • Infrared Capability Introduction
        • Infrared Code Library
      • Sweeper
      • Household Appliances
      • Pet Supplier
      • BLE Mesh Typical Solution
        • BLE Mesh Lighting Solution
        • BLE Mesh Electrical Solution
        • BLE Mesh Sensor Solution
        • BLE Mesh General Solution
    • Products
      • Electric
        • Smart Switch
        • Smart Plug
        • Curtain Controller
      • Lighting
      • Security
        • E202/203 Smart Lock
    • More
  • Links
    • ifreeq.cn
    • ifreeq.com
    • AIoT Expo
    • Official Store
Powered by GitBook
On this page
  • Overview
  • Detailed Functional Types
  • Bool Type
  • Value Type
  • Enumeration Type
  • Fault Type
  • Char Type
  • RAW Type

Was this helpful?

  1. Developer
  2. Configure in Platform
  3. Function Definition

Custom Functions

PreviousStandard FunctionsNextCloud Functions

Last updated 4 years ago

Was this helpful?

Overview

If your product functions are not in the standard function selections, you can customize the function. Function points are abstract representations of product functions, each of which can be defined by different functional types. The current platform provides: Boolean, numeric, enum type, fault type, string type, through the transmission of these six types of functions.

Among them, the Boolean type, numerical type, enumeration type is the basic type, most of the functions can be defined by the three types of functions. Fault type specifically for fault definition, easy to failure statistics in the background. The string type and the transparent type are advanced types. They are used for more complicated functions. They are recommended only when other types can not be satisfied.

How to define function points, as described in detail below.

Function Point:That is, the abstraction of the specific smart device functions, used to describe the product function and its parameters.

Function Point ID:Function point coding, follow-up equipment and the function of cloud data transmission through the function point ID.

Function Point Name:Custom Function Name

Identifier Name:Function point code value used for the multi-language management of App display function name. Support for letters, numbers, underscores, beginning with a letter.

Data Category:

  • Boolean (bool): non-true or false binary variable. Such as: switch function, on / off

  • Value (value): suitable for linear adjustment of the type of data. Such as: temperature regulation, temperature range 20-40 ℃

  • Enum (enum): custom finite set value. Such as: working levels, low / mid / high

  • Fault (fault): dedicated to reporting and statistical failure of the function points. Support multi-fault, the data reported only

  • String(string): A function point that is transmitted as a string

  • Transparent (raw): in binary form transparent function points. Generally do not recommend the use of the function points.Can be used when you meet some complex functions that can't be satisfied with the function points above.

Data transfer type:

  • Can be issued and reported: the command data can be sent to the equipment, equipment data can be reported to the cloud;

  • Report only: Data only supports reporting from the device;

  • Only issue: data can only issue from the cloud;

Detailed Functional Types

Bool Type

Applicable functions: non-true or false binary variable function. Function example: the device switch, heater child lock, electric fan swing, air purifier filter reset and other functions, can be used Boolean expression.

Value Type

Applicable functions: Suitable for linearly adjustable data types.

Function Case:

  • Temperature change, the temperature range of 20-40, spacing 1, the unit is ℃, it means that the product can adjust the temperature of 20-40 ℃, each change in operation 1 ℃.

  • For schedule function, you can reserve 1, 2, 3, ... 12 hours to switch on/off, you can set the value range: 1-12, space: 1, unit: hour.

Enumeration Type

Applicable functions: This feature has a limited set of custom values.

Function Case:

  • Levels,low / mid-range / high-grade;

  • Mode: Comfort mode, sleep mode, intelligent mode, energy-saving mode;

  • Color: red, blue, green, black;

Note: When editing a function point, the enumeration value supports letters, numbers, and underscores. When the Enter key is pressed, the enumeration value is automatically generated. Enumerated values are encoded starting at 0, and are transferred with hardware encoding in an enumerated value encoding. Each enumeration value is no more than 15 characters in length and supports up to 10 enumerated values.

Enumeration value Enter one for each, need to enter once, the enumeration value will confirm the generation.

Fault Type

Applicable functions: Dedicated for reporting and statistical failure of the function points. This type of function will be used for statistics.

Function Case:

  • Temperature sensor failure, motor failure, high temperature fault ...

Note: Faulty data format is the bitmap type, can support multiple fault definitions. The fault type function only supports data report, so the data transmission type can only choose Report Only.

Char Type

Applicable functions: Function points transmitted in the form of character strings. If the above four types of functions can not meet the definition of product functions, can be agreed through the string of data transmission.

Note: Char-type maximum length of not more than 255 bytes.

RAW Type

Applicable functions: Binary mode transparent function points. Generally do not recommend the use of the function points.Can be used when you meet some complex functions that can't be satisfied with the function points above.

Note: RAW type maximum length does not exceed 255 bytes.

It is recommended that the total number of standard function and custom function points should not exceed 40. If so, please pay attention to the stability test of the product.