diff --git a/examples/mqtt.py b/examples/mqtt.py index 1e44ebf..433a44a 100644 --- a/examples/mqtt.py +++ b/examples/mqtt.py @@ -95,19 +95,19 @@ def on_connect(client, userdata, flags, rc): def on_message(client, userdata, msg): if msg.topic == "openWB/pv/W": - value_pvProduction = msg.payload.decode() + value_pvProduction = ""+msg.payload.decode() line = 0 elif msg.topic == "openWB/global/WHouseConsumption": - value_wHouseConsumption = msg.payload.decode() + value_wHouseConsumption = ""+msg.payload.decode() line = 15 elif msg.topic == "openWB/evu/W": - value_energyImportExport = msg.payload.decode() + value_energyImportExport = ""+msg.payload.decode() line = 30 elif msg.topic == "openWB/housebattery/%Soc": - topic_houseBatterySoC = msg.payload.decode() + topic_houseBatterySoC = ""+msg.payload.decode() line = 45 elif msg.topic == "openWB/housebattery/W": - topic_houseBatteryLoadUnload = msg.payload.decode() + topic_houseBatteryLoadUnload = ""+msg.payload.decode() line = 60 print(line)