Packet parser
TapHome script Packet parser functions — SENDHTTPREQUEST, SENDDATA, MQTTPUBLISH, FTPDOWNLOAD, FTPUPLOAD, COMPLETESERVICEATTRIBUTE, COMPLETESERVICEACTION — plus Modbus configuration.
For more information, see the page about Packet parser
SENDHTTPREQUEST
Sends an HTTP request with the specified parameters, waits for the response, and returns it as a JSON string containing Content, Headers and the HTTP result code. Supported only in Packet parser scripts using the HTTP protocol.
SENDDATA
Sends the specified data (a string or a Collection<UInt8>) over TCP or UDP. String data is implicitly converted to bytes using iso-8859-1 encoding. Supported only in Packet parser scripts using the TCP or UDP protocol; received bytes are processed in the Listener script.
MQTTPUBLISH
Publishes a message to the MQTT broker. Used on Packet parser devices that communicate via the MQTT protocol.
FTPDOWNLOAD
Returns the contents of a file (as a Collection<UInt8>) downloaded from the FTP server. Supported only in Packet parser scripts using the FTP protocol.
FTPUPLOAD
Uploads data (a Collection<UInt8> or string) to a file on the FTP server, with a mode parameter such as write or append. Supported only in Packet parser scripts using the FTP protocol.
COMPLETESERVICEATTRIBUTE
Used in Listener scripts (TCP/UDP) to notify completion of a Service attribute value request — for example, after a request was sent with SENDDATA and the response has arrived in the Listener script.
COMPLETESERVICEACTION
Used in Listener scripts (TCP/UDP) to notify completion of a Service action request — for example, after a request was sent with SENDDATA and the response has arrived in the Listener script.
Modbus
Modbus