add client id

print group
This commit is contained in:
robert 2021-12-20 20:08:47 +01:00
parent a82ad1a9b5
commit a9a879dc7c
1 changed files with 4 additions and 3 deletions

View File

@ -3,17 +3,16 @@ import homematicip
from homematicip.home import Home from homematicip.home import Home
from homematicip.device import ShutterContact, WallMountedThermostatPro from homematicip.device import ShutterContact, WallMountedThermostatPro
# Import MQTT client. # Import MQTT client.
# import paho.mqtt.publish as publish
import paho.mqtt.client as paho import paho.mqtt.client as paho
# MQTT credentials # MQTT credentials
# mqtt_username = 'homeassistant' # MQTT client username # mqtt_username = 'homeassistant' # MQTT client username
# mqtt_password = '3355' # MQTT client password # mqtt_password = '3355' # MQTT client password
# client_id = 'temperature' # unique client_id client_id = 'homematicip-pi' # unique client_id
mqtt_broker = "raspberrypi" # broker address, usually your HASS IP address mqtt_broker = "raspberrypi" # broker address, usually your HASS IP address
# create the MQTT client # create the MQTT client
client = paho.Client(protocol=paho.MQTTv31) # * set a random string (max 23 chars) client = paho.Client(client_id, protocol=paho.MQTTv31) # * set a random string (max 23 chars)
# client connection # client connection
# client.username_pw_set(mqtt_username, mqtt_password) # MQTT server credentials # client.username_pw_set(mqtt_username, mqtt_password) # MQTT server credentials
@ -47,6 +46,8 @@ def write_wallmountedthermostatpro(room, device):
def heating_profile(group): def heating_profile(group):
print(group)
topic = 'heatingProfiles/'
# heatingGroup=homematicip.group.HeatingGroup(group) # heatingGroup=homematicip.group.HeatingGroup(group)
# heatingGroup.__init__(home) # heatingGroup.__init__(home)
print("Heating Profiles") print("Heating Profiles")