doc_tap_packetparser_implementation;
doc_tap_http1;
doc_tap_packetparser_hierarchy;
doc_tap_packetparser_hierarchy_example;
doc_tap_packetparser_scripts;
doc_tap_packetparser_scripts_link;
Definition of error states from scripts
Service attributes and actions
Scripts and auxiliary variables on the module
Scripts and helper variables on the device
See more info on [Modbus documentation page](https://taphome.com/support/15597569).
doc_tap_packetparser_moreinfo;
doc_tap_packetparser_protocols;
HTTP
TCP
UDP
FTP
MQTT
HTTP
SENDHTTPREQUEST
doc_tap_sendhttprequest;
SENDHTTPREQUEST( path, method, body, header1, header2… ) SENDHTTPREQUEST( HttpRequest )
Examples:
SENDHTTPREQUEST("/getValue") Result is: { "Headers": [ { "Key": "Content-Type", “Value": [“application/json"] }, { "Key": "Content-Length", “Value": ["1007"] }, ], "Content": "{\"value\":31}”, "ReasonPhrase": "OK", "StatusCode": 200, "IsSuccess": true }
SENDHTTPREQUEST("/doSomething", “POST”, “someData”, “header1:value1”, “header2:value2”, “header3:value3”)
VAR request := HTTPREQUEST(“/path”, “PUT”, “someData”); request.Headers := { “name1: value1”, “name2: value2” … }; request.Method := “POST”; VAR response := SENDHTTPREQUEST(request); IF response.IsSuccess VAR content := response.Content; … END
TCP, UDP
SENDDATA
doc_tap_senddata;
SENDDATA( string/Collection<UInt8> )
Examples:
SENDATA(BYTECOLLECTION(“0a dd ef a2”) SENDATA(“{\”value\”:212}”)
COMPLETESERVICEATTRIBUTE
doc_tap_completeserviceattribute;
COMPLETESERVICEATTRIBUTE( attributeName, value, error )
Examples:
COMPLETESERVICEATTRIBUTE(“Uptime”, “2d:21h:43m”) COMPLETESERVICEATTRIBUTE(“Status”, “”, “Device is offline”)
COMPLETESERVICEACTION
doc_tap_completeserviceaction;
COMPLETESERVICEACTION( actionName, result )
Examples:
COMPLETESERVICEACTION(“Reboot”, “Rebooted successfully”) COMPLETESERVICEACTION(“Enable cloud”, “Device is offline”)
FTP
FTPDOWNLOAD
doc_tap_ftpdownload;
FTPDOWNLOAD( pathToFile )
Examples:
FTPDOWNLOAD(“/path/to/file”) (Result is Collection<UInt8>)
FTPUPLOAD
doc_tap_ftpupload;
FTPUPLOAD( pathToFile, data, mode )
Examples:
FTPUPLOAD(“/path/to/file”, “some data”, “write”) FTPUPLOAD(“/path/to/file”, BYTECOLLECTION(“a7 ff e2”), “append”)
MQTT
doc_tap_packetparser_mqtt;
MQTTPUBLISH
doc_tap_mqttpublish;
MQTTPUBLISH( topic, message )
Examples:
MQTTPUBLISH(“shellies/deviceid/relay/0/command”, “off”)