Here you go:
This part goes in your initialization code, to open the telnet connection.
//open telnet connection
telnetConnect(ip, 23, "lutron", "integration")
//give it a chance to start
pauseExecution(1000)
That opens a telnet connection on port 23 of "ip", with login "lutron" and password "integration".
Use a method like this to send a message:
def sendMsg(String msg) {
return new hubitat.device.HubAction(msg, hubitat.device.Protocol.TELNET)
}