WLANThermo / WLANThermo_v2

Software für das WLAN Grillthermometer
http://wlanthermo.com
GNU General Public License v3.0
26 stars 15 forks source link

LCD 204 doesnt show IP adress anymore in 2.8.2 #113

Closed arminth closed 5 years ago

arminth commented 6 years ago

Due to new formatting of ifconfig output, LCD 204 doesn't show IP adresses anymore. @BjoernSch Please change wlt_2_lcd_204.py like this: old: `# IP-Adressen ermitteln ETH1 = "0.0.0.0" ETH0 = "0.0.0.0" WLAN0 = "0.0.0.0" retvalue = os.popen("LANG=C ifconfig eth0 | grep 'inet ' | cut -d':' -f2| cut -d' ' -f1").readlines()

if (len(retvalue)==0):
    ETH0="0.0.0.0"
else:
    ETH=retvalue[0]
    ETH0=ETH[:-1]
retvalue = os.popen("LANG=C ifconfig eth1 | grep 'inet ' | cut -d':' -f2| cut -d' ' -f1").readlines()

if (len(retvalue)==0):
    ETH1="0.0.0.0"
else:
    ETH=retvalue[0]
    ETH1=ETH[:-1]

retvalue = os.popen("LANG=C ifconfig wlan0 | grep 'inet ' | cut -d':' -f2| cut -d' ' -f1").readlines()`

new:

`# IP-Adressen ermitteln ETH1 = "0.0.0.0" ETH0 = "0.0.0.0" WLAN0 = "0.0.0.0" retvalue = os.popen("LANG=C ifconfig eth0 | grep 'inet ' | cut -d':' -f2| cut -d' ' -f10").readlines()

if (len(retvalue)==0):
    ETH0="0.0.0.0"
else:
    ETH=retvalue[0]
    ETH0=ETH[:-1]
retvalue = os.popen("LANG=C ifconfig eth1 | grep 'inet ' | cut -d':' -f2| cut -d' ' -f10").readlines()

if (len(retvalue)==0):
    ETH1="0.0.0.0"
else:
    ETH=retvalue[0]
    ETH1=ETH[:-1]

retvalue = os.popen("LANG=C ifconfig wlan0 | grep 'inet ' | cut -d':' -f2| cut -d' ' -f10").readlines()`

Ich kann einfach git nicht! Sorry

BjoernSch commented 5 years ago

Solved by d7da00295f9ec2f92234b03a52ed306cda0aa358