ironsheep / RPi-Reporter-MQTT2HA-Daemon

Linux service to collect and transfer Raspberry Pi data via MQTT to Home Assistant (for RPi Monitoring)
GNU General Public License v3.0
460 stars 64 forks source link

does this only work with English language system? #9

Closed prankousky closed 4 years ago

prankousky commented 4 years ago

Checklist:

Hardware, Operating System, Python version:

Description of problem:

When I run python3 /opt/RPi-Reporter-MQTT2HA-Daemon/ISP-RPi-mqtt-daemon.py, I get the output below. I assume the ValueError is caused because the script expects something in English, but receives '1M-Blöcke', which is German.

Run our report script 'genBugInfo' on your failing device and include the output here:

# SCRIPT genBugInfo v1.0 run 20/08/05-16:56:52
# ----------------------------------------------------------------------

# /bin/cat /etc/apt/sources.list | /bin/egrep -v '#'

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

 ----

# /bin/cat /etc/apt/sources.list | /bin/egrep -v '#' | /usr/bin/awk '{ print  }' | /bin/grep . | /usr/bin/sort -u

buster

 ----

# /bin/uname -r

4.19.97-v7l+

 ----

# /bin/hostname -f

pi4

 ----

# /usr/bin/uptime

 16:56:52 up 1 day, 17 min,  2 users,  load average: 0,01, 0,23, 0,16

 ----

# /sbin/ifconfig

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 9b  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Lokale Schleife)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.197  netmask 255.255.255.0  broadcast 192.168.100.255
        inet6 fc15  prefixlen 64  scopeid 0x20<link>
        ether 9d  txqueuelen 1000  (Ethernet)
        RX packets 715740  bytes 879183621 (838.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 228173  bytes 24967680 (23.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 ----

# /sbin/ifconfig | /bin/egrep 'Link|flags|inet|ether' | /bin/egrep -v -i 'lo:|loopback|inet6|\:\:1|127\.0\.0\.1'

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 9b  txqueuelen 1000  (Ethernet)
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.100.197  netmask 255.255.255.0  broadcast 192.168.100.255
        ether 9d  txqueuelen 1000  (Ethernet)

 ----

# /sbin/route

Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags Metric Ref    Use Iface
default         192.168.100.1   0.0.0.0         UG    303    0        0 wlan0
192.168.100.0   0.0.0.0         255.255.255.0   U     303    0        0 wlan0

 ----

Python errors shown in the logs (if applicable):

none

Additional information:

As stated above, I assume this is due to my output being in a different language. Is this fixable, i.e. by changing some value in the .py file by hand? Or am I out of luck unless I set my system to English?

Thank you for your help.

ironsheep commented 4 years ago

Fixes are committed, and appear in v1.4.1 and later. Please update to the latest and let me know if it's working now.