Difference between revisions of "Telnet Interface"
(Created page with "Overview You are able to open and maintain a connection to a telnet endpoint from the hub. All code needs to be contained in a driver, there is not option to open a telnet c...") |
(Tag: Visual edit) |
||
Line 1: | Line 1: | ||
− | Overview | + | == Overview == |
+ | You are able to open and maintain a connection to a telnet endpoint from the hub. All code needs to be contained in a driver, there is not option to open a telnet connection from an app. Hubitat provides methods to connect and disconnect to the endpoint, in addition you will need to create a method in the driver that accepts incoming messages (parse) and another method that will be called with any status updates for the endpoint (telnetStatus). | ||
+ | |||
+ | == Methods == | ||
+ | |||
+ | === Hubitat Provided Methods === | ||
+ | void telnetConnect(Map options, String ip, int port, String username, String password) | ||
− | + | void telnetConnect(String ip, int port, String username, String password) | |
+ | |||
+ | void telnetClose() | ||
+ | |||
+ | === User defined methods === | ||
+ | parse(String message) - This method is called with any incoming messages from the telnet endpoint. This is a standard method for drivers. | ||
+ | |||
+ | telnetStatus(String message) - This method is called with any status messages from the telnet connection (disconnections, errors during connect, etc) |
Revision as of 16:39, 27 December 2018
Overview
You are able to open and maintain a connection to a telnet endpoint from the hub. All code needs to be contained in a driver, there is not option to open a telnet connection from an app. Hubitat provides methods to connect and disconnect to the endpoint, in addition you will need to create a method in the driver that accepts incoming messages (parse) and another method that will be called with any status updates for the endpoint (telnetStatus).
Methods
Hubitat Provided Methods
void telnetConnect(Map options, String ip, int port, String username, String password)
void telnetConnect(String ip, int port, String username, String password)
void telnetClose()
User defined methods
parse(String message) - This method is called with any incoming messages from the telnet endpoint. This is a standard method for drivers.
telnetStatus(String message) - This method is called with any status messages from the telnet connection (disconnections, errors during connect, etc)