diff --git a/examples/solar-monitoring.py b/examples/solar-monitoring.py index c406ccf..e370e1e 100644 --- a/examples/solar-monitoring.py +++ b/examples/solar-monitoring.py @@ -24,6 +24,7 @@ logging.basicConfig(level=logging.DEBUG) #mqtt_password = '3355' # MQTT client password client_id = 'solarmonitor' # unique client_id mqtt_broker = "openwb-2" # broker address, usually your HASS IP address +port = 1883 #set topics topic_house_battery_soc = "openWB/bat/get/soc" @@ -48,7 +49,7 @@ def connect_mqtt(): client = mqtt_client.Client(client_id) # client.username_pw_set(username, password) client.on_connect = on_connect - client.connect(broker, port) + client.connect(mqtt_broker, port) return client