Telnet - Hub Update 1.1.5

Continuing the discussion from Hub Update 1.1.5:

@bravenel

So my telnet driver broke - it is a work in progress. But I checked right before the update and it was working. Now I get this in the logs. Any thoughts?

referring to these lines.

def initialize() {
    log.debug "Connecting to telnet - IP = ${ip}, Port = ${port.toInteger()}, Username = ${username}, Password = ${password}"
    telnetConnect([termChars:[13,10]],ip, port.toInteger(), username, password)
   }

line 56 being the telnetConnect line.

Edit: Rollback to previous firmware restored operation.

What line termination characters are expected from your telnet server? (In integer)...
13,10 are the the default so the term char option is not required for them.

I use realTerm to connect to these types of hosts to see exactly what they are sending and receiving.

Tbh I do not know. It is a ras pi 3b+ I have tried with and without the term characters with same result.

I will look into realTerm tonight unless someone knows what the telnet server is looking for.

try just 13 first, then just 10

@mike.maxwell

I tried both with the same results

telnetConnect([termChars:[10]], ip, port.toInteger(), username, password)

telnetConnect([termChars:[13]], ip, port.toInteger(), username, password)

I'm doing some digging, will let you know what I find.

@chuck.schwer

Thanks I just downloaded this realTerm program @mike.maxwell suggested. I must admit though I am not sure what to do with it. LOL everything is a learning opportunity right?

yes, very functional app, very dysfunctional an un-intuitive UI
ignoring all the serial and IC2 interface options...
click the port tab then the port drop down, select the 127.0.0.1: telnet option, then change 127.0.0.1 to the ip of your raspi
then click change and toggle open.
you should now have a telnet session going, the key here is to see what the pi is sending back in response to the login requests ect
to send data to the rpi, click the send tab, enter the text into one of the two boxes then hit the corresponding sendAscii button

1 Like

Very concise instructions @mike.maxwell. thank you. This is what I get on login

OK, so it's looking for 13,10, (the CRLF at the end of each line), and this wan't the issue.
There was some telnet terminal negation that this telnet server was looking for, that we weren't providing.
We shall provide further details shortly.

1 Like

Thank you guys. Gotta say once again customer experience here is really top notch!!

2 Likes

Why is your pi set to BST instead of PDT?

lol that is a good question my friend.... Never really even noticed or paid attention till you mentioned it.

When I ask it it reports properly for me...

image

1 Like

Must be prior to the time server update, as RPi has no internal time clock unless you add one.

The next 1.1.5 hotfix to be released will have a fix. however it requires you to make a change to your code.

If you are connecting to an actual telnet server (like an rPi) you will have to specify the terminal type to use. Currently we only support VT100, and that should be good to telnet into most servers, if there is a need for another term type, please let us know.

Example existing connection code:
telnetConnect('192.168.1.100', 23, 'username, 'password')

New connection code:
telnetConnect([terminalType: 'VT100'], '192.168.1.100', 23, 'username, 'password')

3 Likes

Thank you sir.

Latest update fixed this issue for me thanks @mike.maxwell and @chuck.schwer my driver works again!

This also fixed another issue I was having where I just figured I was doing something wrong. I could not pass json into hubitat from my pi. I was getting a bunch of random symbols and characters. So I was just using the pi to parse the stuff and just send back what I wanted.

Now I get the response i thought I should be getting. It means I am likely going to scrap a bunch of what I did. But in the end I think it will be cleaner and easier. :slight_smile:

1 Like