---
title: "Script functions A–Z"
description: "Alphabetical list of all TapHome script functions — math, text, collections, date and time, parsing, Modbus and Packet parser — each with a one-line summary and a link."
url: "https://taphome.com/en/docs/script/functions-a-z/"
language: en
lastmod: 2026-10-26
generator: hugo
ai:
  topics: ["scripting-language","function-reference","functions-a-z"]
  questions: ["Which functions does the TapHome script language have?","Which TapHome script function does a given task?","Is there an alphabetical list of all TapHome script functions?","Where is the full description of a TapHome script function?"]
---

# Script functions A–Z

Every TapHome script function in alphabetical order with a one-line summary and a link to its full reference entry.

Last updated: 2026-10-26

Every function of the TapHome script language in alphabetical order, with a one-line summary and a link to its full entry. Function names are case insensitive. Keywords such as `VAR`, `WHILE` and `BREAK` are in [Syntax and control flow](https://taphome.com/en/docs/script/basics/).

## All functions

| Function | What it does |
|---|---|
| [`ABS`](https://taphome.com/en/docs/script/mathematical-functions/#abs) | Returns a number's absolute value. |
| [`ADDERROR`](https://taphome.com/en/docs/script/logic-and-diagnostics/#adderror) | Shows a device error message. |
| [`ADDINFO`](https://taphome.com/en/docs/script/logic-and-diagnostics/#adderror) | Shows a device info message. |
| [`ADDWARNING`](https://taphome.com/en/docs/script/logic-and-diagnostics/#adderror) | Shows a device warning message. |
| [`AESDECRYPT`](https://taphome.com/en/docs/script/encryption-and-hashes/#aesencrypt) | Decrypts AES-encrypted bytes. |
| [`AESENCRYPT`](https://taphome.com/en/docs/script/encryption-and-hashes/#aesencrypt) | Encrypts bytes with AES. |
| [`APPEND`](https://taphome.com/en/docs/script/text-string-and-byte-array/#append) | Appends to text or a collection. |
| [`AVG`](https://taphome.com/en/docs/script/mathematical-functions/#avg) | Averages values, skipping unknown ones. |
| [`AVGSTRICT`](https://taphome.com/en/docs/script/mathematical-functions/#avgstrict) | Averages values; a NaN input gives NaN. |
| [`BOOLCOLLECTION`](https://taphome.com/en/docs/script/text-string-and-byte-array/#boolcollection) | Creates a FALSE-filled bool collection. |
| [`BYTECOLLECTION`](https://taphome.com/en/docs/script/text-string-and-byte-array/#bytecollection) | Creates bytes from hex text or a count. |
| [`CEIL`](https://taphome.com/en/docs/script/rounding-and-random/#ceil) | Rounds up, optionally to a multiple. |
| [`COMPARE`](https://taphome.com/en/docs/script/text-string-and-byte-array/#compare) | Compares strings: negative, 0 or positive. |
| [`COMPLETESERVICEACTION`](https://taphome.com/en/docs/script/packet-parser/#completeserviceaction) | Completes a service action asynchronously. |
| [`COMPLETESERVICEATTRIBUTE`](https://taphome.com/en/docs/script/packet-parser/#completeserviceattribute) | Completes a service attribute asynchronously. |
| [`COPY`](https://taphome.com/en/docs/script/text-string-and-byte-array/#copy) | Copies a substring or sub-collection. |
| [`CRC16`](https://taphome.com/en/docs/script/byte-encodings/#crc16) | Calculates a 16-bit CRC checksum. |
| [`CRC32`](https://taphome.com/en/docs/script/byte-encodings/#crc16) | Calculates a CRC-32 checksum. |
| [`DATETIME`](https://taphome.com/en/docs/script/date-and-time/#datetime) | Creates a date and time. |
| [`DATETIMEADD`](https://taphome.com/en/docs/script/date-and-time/#datetimeadd) | Adds time to a date. |
| [`DEBOUNCE`](https://taphome.com/en/docs/script/logic-and-diagnostics/#debounce) | Ignores device reads for a while. |
| [`DECODE`](https://taphome.com/en/docs/script/data-type-conversions/#decode) | Decodes XML entities or Base64. |
| [`DEWPOINT`](https://taphome.com/en/docs/script/mathematical-functions/#dewpoint) | Calculates the dew point; humidity is 0–1. |
| [`ENCODE`](https://taphome.com/en/docs/script/data-type-conversions/#encode) | Encodes text as XML or Base64. |
| [`EQUALS`](https://taphome.com/en/docs/script/logic-and-diagnostics/#equals) | Compares numbers with a tolerance. |
| [`FLOOR`](https://taphome.com/en/docs/script/rounding-and-random/#floor) | Rounds down, optionally to a multiple. |
| [`FROMBASE64`](https://taphome.com/en/docs/script/byte-encodings/#tobase64) | Decodes Base64 text into bytes. |
| [`FROMBCD`](https://taphome.com/en/docs/script/bit-operations/#frombcd) | Converts packed BCD to a number. |
| [`FROMHEX`](https://taphome.com/en/docs/script/byte-encodings/#tohex) | Converts hexadecimal text into bytes. |
| [`FTPDOWNLOAD`](https://taphome.com/en/docs/script/packet-parser/#ftpdownload) | Downloads an FTP file as bytes. |
| [`FTPUPLOAD`](https://taphome.com/en/docs/script/packet-parser/#ftpupload) | Uploads data to an FTP file. |
| [`GETAT`](https://taphome.com/en/docs/script/text-string-and-byte-array/#getat) | Reads one element or character. |
| [`GETBIT`](https://taphome.com/en/docs/script/bit-operations/#getbit) | Reads one bit of a number. |
| [`GETBITS`](https://taphome.com/en/docs/script/bit-operations/#getbits) | Reads a bit field of a number. |
| [`GETBYTE`](https://taphome.com/en/docs/script/bit-operations/#getbyte) | Reads one byte of a number. |
| [`HASH`](https://taphome.com/en/docs/script/encryption-and-hashes/#hash) | Calculates an MD5 or SHA hash. |
| [`HMAC`](https://taphome.com/en/docs/script/encryption-and-hashes/#hash) | Calculates a keyed hash, a signature. |
| [`HSVTORGB`](https://taphome.com/en/docs/script/colours/#hsvtorgb) | Converts an HSV colour to RGB. |
| [`HTTPREQUEST`](https://taphome.com/en/docs/script/packet-parser/#httprequest) | Builds an HTTP request object. |
| [`HYSTERESIS`](https://taphome.com/en/docs/script/interpolation-and-thresholds/#hysteresis) | Switches between two states with hysteresis. |
| [`IF`](https://taphome.com/en/docs/script/basics/#if) | Chooses a value by a condition. |
| [`INDEXOF`](https://taphome.com/en/docs/script/text-string-and-byte-array/#indexof) | Returns the first index, or -1. |
| [`INSERT`](https://taphome.com/en/docs/script/text-string-and-byte-array/#insert) | Inserts into text or a collection. |
| [`ISNAN`](https://taphome.com/en/docs/script/logic-and-diagnostics/#isnan) | Tests whether a value is NaN. |
| [`ISNULL`](https://taphome.com/en/docs/script/logic-and-diagnostics/#isnull) | Tests whether a value is Null. |
| [`LENGTH`](https://taphome.com/en/docs/script/text-string-and-byte-array/#length) | Returns the length or element count. |
| [`LINEAR`](https://taphome.com/en/docs/script/interpolation-and-thresholds/#linear) | Maps a value between two ranges. |
| [`LN`](https://taphome.com/en/docs/script/mathematical-functions/#ln) | Returns the natural logarithm. |
| [`LOCALTIMEZONE`](https://taphome.com/en/docs/script/date-and-time/#localtimezone) | Returns the Core's UTC offset. |
| [`LOG`](https://taphome.com/en/docs/script/mathematical-functions/#log) | Returns a base-10 or custom logarithm. |
| [`MAX`](https://taphome.com/en/docs/script/mathematical-functions/#max) | Returns the largest known value. |
| [`MAXSTRICT`](https://taphome.com/en/docs/script/mathematical-functions/#maxstrict) | Returns the largest value or first unknown. |
| [`MIN`](https://taphome.com/en/docs/script/mathematical-functions/#min) | Returns the smallest known value. |
| [`MINSTRICT`](https://taphome.com/en/docs/script/mathematical-functions/#minstrict) | Returns the smallest value or first unknown. |
| [`MOD`](https://taphome.com/en/docs/script/mathematical-functions/#mod) | Returns a division remainder. |
| [`MODBUSR`](https://taphome.com/en/docs/script/modbus/#modbusr) | Reads one value from Modbus registers. |
| [`MODBUSRBLOCK`](https://taphome.com/en/docs/script/modbus/#modbusrblock) | Reads a register block in one transaction. |
| [`MODBUSW`](https://taphome.com/en/docs/script/modbus/#modbusw) | Writes values to Modbus registers. |
| [`MODBUSWBLOCK`](https://taphome.com/en/docs/script/modbus/#modbuswblock) | Writes a register block in one transaction. |
| [`MODBUSWBLOCKNE`](https://taphome.com/en/docs/script/modbus/#modbuswblockne) | Writes a block only when changed. |
| [`MODBUSWNE`](https://taphome.com/en/docs/script/modbus/#modbuswne) | Writes a value only when changed. |
| [`MQTTPUBLISH`](https://taphome.com/en/docs/script/packet-parser/#mqttpublish) | Publishes an MQTT message. |
| [`NOW`](https://taphome.com/en/docs/script/date-and-time/#now) | Returns the current date and time. |
| [`ORDER`](https://taphome.com/en/docs/script/sorting/#order) | Sorts ascending, dropping unknown values. |
| [`ORDERDESC`](https://taphome.com/en/docs/script/sorting/#orderdesc) | Sorts descending, dropping unknown values. |
| [`ORDERDESCSTRICT`](https://taphome.com/en/docs/script/sorting/#orderdescstrict) | Sorts descending, keeping unknown values. |
| [`ORDERINDEX`](https://taphome.com/en/docs/script/sorting/#orderindex) | Returns indices sorted by ascending value. |
| [`ORDERINDEXDESC`](https://taphome.com/en/docs/script/sorting/#orderindexdesc) | Returns indices sorted by descending value. |
| [`ORDERINDEXDESCSTRICT`](https://taphome.com/en/docs/script/sorting/#orderindexdescstrict) | Returns descending indices, keeping unknown values. |
| [`ORDERINDEXSTRICT`](https://taphome.com/en/docs/script/sorting/#orderindexstrict) | Returns ascending indices, keeping unknown values. |
| [`ORDERSTRICT`](https://taphome.com/en/docs/script/sorting/#orderstrict) | Sorts ascending, keeping unknown values. |
| [`PACKVALUE`](https://taphome.com/en/docs/script/binary-data/#packvalue) | Writes a typed value into a collection. |
| [`PARSEJSON`](https://taphome.com/en/docs/script/parsing-functions/#parsejson) | Reads JSON by JSONPath. |
| [`PARSETEXT`](https://taphome.com/en/docs/script/parsing-functions/#parsetext) | Extracts text between two patterns. |
| [`PARSEXML`](https://taphome.com/en/docs/script/parsing-functions/#parsexml) | Reads XML by XPath. |
| [`POWER`](https://taphome.com/en/docs/script/mathematical-functions/#power) | Raises a number to a power. |
| [`RAND`](https://taphome.com/en/docs/script/rounding-and-random/#rand) | Returns a random number below 1. |
| [`RANDBYTES`](https://taphome.com/en/docs/script/encryption-and-hashes/#randbytes) | Returns secure random bytes. |
| [`RANDINT`](https://taphome.com/en/docs/script/rounding-and-random/#randint) | Returns a random whole number in a range. |
| [`REMOVEAT`](https://taphome.com/en/docs/script/text-string-and-byte-array/#removeat) | Removes items at an index. |
| [`REPLACE`](https://taphome.com/en/docs/script/text-string-and-byte-array/#replace) | Replaces every match in text or a collection. |
| [`RETURN`](https://taphome.com/en/docs/script/basics/#return) | Ends the script with a value. |
| [`RGBTOHSV`](https://taphome.com/en/docs/script/colours/#rgbtohsv) | Converts an RGB colour to HSV. |
| [`ROUND`](https://taphome.com/en/docs/script/rounding-and-random/#round) | Rounds to the nearest integer. |
| [`SENDDATA`](https://taphome.com/en/docs/script/packet-parser/#senddata) | Sends raw TCP or UDP data. |
| [`SENDHTTPREQUEST`](https://taphome.com/en/docs/script/packet-parser/#sendhttprequest) | Sends an HTTP request, returns the response. |
| [`SETAT`](https://taphome.com/en/docs/script/text-string-and-byte-array/#setat) | Replaces the element at an index. |
| [`SETBIT`](https://taphome.com/en/docs/script/bit-operations/#setbit) | Sets one bit of a number. |
| [`SETBITS`](https://taphome.com/en/docs/script/bit-operations/#setbits) | Replaces a bit field of a number. |
| [`SETBYTE`](https://taphome.com/en/docs/script/bit-operations/#setbyte) | Replaces one byte of a number. |
| [`SIGN`](https://taphome.com/en/docs/script/mathematical-functions/#sign) | Returns the sign: -1, 0 or 1. |
| [`SLEEP`](https://taphome.com/en/docs/script/logic-and-diagnostics/#sleep) | Pauses the script for milliseconds. |
| [`SPLIT`](https://taphome.com/en/docs/script/text-string-and-byte-array/#split) | Splits text into a string collection. |
| [`SQRT`](https://taphome.com/en/docs/script/mathematical-functions/#sqrt) | Returns the square root. |
| [`SWITCH`](https://taphome.com/en/docs/script/basics/#switch) | Returns the first matching case's result. |
| [`TIMESPAN`](https://taphome.com/en/docs/script/date-and-time/#timespan) | Creates a time interval. |
| [`TOBASE64`](https://taphome.com/en/docs/script/byte-encodings/#tobase64) | Encodes bytes as Base64 text. |
| [`TOBCD`](https://taphome.com/en/docs/script/bit-operations/#tobcd) | Converts a number to packed BCD. |
| [`TOBYTES`](https://taphome.com/en/docs/script/data-type-conversions/#tobytes) | Encodes text as bytes. |
| [`TODOUBLE`](https://taphome.com/en/docs/script/data-type-conversions/#todouble) | Parses a number from text. |
| [`TOHEX`](https://taphome.com/en/docs/script/byte-encodings/#tohex) | Converts bytes to hexadecimal text. |
| [`TOSTRING`](https://taphome.com/en/docs/script/data-type-conversions/#tostring) | Converts a value to text. |
| [`UINT16COLLECTION`](https://taphome.com/en/docs/script/text-string-and-byte-array/#uint16collection) | Creates a zero-filled register collection. |
| [`UNPACKVALUE`](https://taphome.com/en/docs/script/binary-data/#unpackvalue) | Reads a typed value from a collection. |
