01-23-2024, 08:43 PM
Thanks for sharing! Had to make the following adjustments to make it work:
Line 51
host = subprocess.check_output("hostname", shell=True).strip()
to
host = subprocess.check_output("hostname", shell=True).strip().decode("utf-8")
and
Line 69
action = msg.payload.decode("utf-8")
to
action = msg.payload
Line 51
host = subprocess.check_output("hostname", shell=True).strip()
to
host = subprocess.check_output("hostname", shell=True).strip().decode("utf-8")
and
Line 69
action = msg.payload.decode("utf-8")
to
action = msg.payload