FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: TobiasR am 26 Mai 2019, 17:39:07

Titel: Telent wird plötzlich blockiert, oder nicht?
Beitrag von: TobiasR am 26 Mai 2019, 17:39:07
Hallo,

ich habe in Python telnet zu FHEM auf dem selben Raspberry realisiert.
Hat bisher auch super funtioniert. Hier ein Auszug:

#!/usr/bin/python

import telnetlib

send_cmd = "set GPIO23 on"
fhemhost = '127.0.0.1'
fhemport = 7072

try:
        print "1"
        tn = telnetlib.Telnet(fhemhost, int(fhemport))
        print "2"
        tn.write(send_cmd + "\n")
        print "3"
        tn.write("quit\n")
        print "4"
        ret = tn.read_all()
        print "5"
        tn.close()
        print "Test erfolgreich"
except:
        print "telnet exception."


Bis gestern gin galles ohne beanstantungen. Beim Start heute morgen hing es sich ab Schritt 4 (print "4") auf.
Woran kann es liegen?
Titel: Antw:Telent wird plötzlich blockiert, oder nicht?
Beitrag von: LuckyDay am 26 Mai 2019, 18:15:04
print "3"
        tn.write("quit\n")


normalerweise, wenn du quit machst wird die telnet sitzung von fhem geschlossen
Titel: Antw:Telent wird plötzlich blockiert, oder nicht?
Beitrag von: TobiasR am 26 Mai 2019, 21:11:33
oh, soory. Ich habe erst jetzt gestehen dass FHEM nicht richtig gestartet ist.
Ich muss eine neue Frage auf machen