Difference between revisions of "Telnet Interface"

From Hubitat Documentation
Jump to: navigation, search
 
Line 1: Line 1:
==Overview==
 
Hubitat allows for opening and maintaining a connection to a telnet endpoint from the hub.  All code needs to be contained in a driver, there is no option to open a telnet connection from an app.  Hubitat provides methods to connect and disconnect to the endpoint, in addition it is required 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==
+
<big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big>
  
===Hubitat Provided Methods===
+
<big>
 
+
This document is available at: http://docs2.hubitat.com/en/developer/interfaces/telnet-interface
====<code>telnetConnect</code>====
+
</big>
 
 
===== Signature =====
 
void telnetConnect(Map options, String ip, int port, String username, String password)
 
void telnetConnect(String ip, int port, String username, String password)
 
 
 
===== Parameters =====
 
ip - The IP Address of the endpoint you want to connect to
 
port - The port number of the endpoint, typically 23 for telnet interfaces
 
username - The username to use to log in, pass null if no username is required
 
password - The password to use to log in, pass null if no password is required
 
options - The options to use when connecting to the telnet interface.
 
 
 
====<code>telnetClose</code>====
 
 
 
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)
 

Latest revision as of 20:21, 25 September 2022

We're moving! Please visit http://docs2.hubitat.com for the latest documentation.

This document is available at: http://docs2.hubitat.com/en/developer/interfaces/telnet-interface