Protocol APIs
You only need the page for the protocol your device actually speaks. Each of these injects one global object into your script, on top of the core API that is always there.
This is the reference, not the guide
These pages document which functions you can call. For how an integration over that protocol works — who opens the conversation, what the device must be, how to schedule the work — read Supported protocols, and then the page for your transport: HTTP, MQTT, WebSocket, CoAP, Meter and industrial protocols or Remote access.
Transports OpenGate already speaks
The device arrived over one of these, and the API lets you read the incoming message and shape the reply.
| Protocol | Object | Gives you |
|---|---|---|
| HTTP | http |
The received request, the response you return, and an HTTP client for outgoing calls |
| MQTT | mqtt |
Publish messages to a topic |
| WebSocket | — | Send a message down an already open connection |
| CoAP | coap.server.response |
Set the status code, content format and body of the CoAP response. Integration: CoAP |
Meter and industrial protocols
Here the connector function is the one that opens the conversation, usually to poll a meter.
| Protocol | Object | Gives you |
|---|---|---|
| DLMS | dlms |
Open a DLMS connection and run get, set and action requests |
| DLMS Gas | dlms_gas |
Smart Gas meters across manufacturers, on top of DLMS |
| IEC102 | — | Connect over IEC102 and execute ASDUs: login, time, load curves, profiles |
| SNMP | snmp |
SNMP get and set against a device |
Shell and network access
| Protocol | Object | Gives you |
|---|---|---|
| SSH | ssh |
Open a session, send commands, read the answer |
| Telnet | — | The same over Telnet |
| ICMP | — | Send a ping and process the result |
| ICMP Response | payload |
The payload a RESPONSE function receives with the ping result |
Subscriptions
| Protocol | Object | Gives you |
|---|---|---|
| Kite | kite |
Query and change a subscription’s status through the Kite connector |