add client id
print group
This commit is contained in:
		
							parent
							
								
									a82ad1a9b5
								
							
						
					
					
						commit
						a9a879dc7c
					
				@ -3,17 +3,16 @@ import homematicip
 | 
			
		||||
from homematicip.home import Home
 | 
			
		||||
from homematicip.device import ShutterContact, WallMountedThermostatPro
 | 
			
		||||
# Import MQTT client.
 | 
			
		||||
# import paho.mqtt.publish as publish
 | 
			
		||||
import paho.mqtt.client as paho
 | 
			
		||||
 | 
			
		||||
# MQTT credentials
 | 
			
		||||
# mqtt_username  = 'homeassistant' # MQTT client username
 | 
			
		||||
# 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
 | 
			
		||||
 | 
			
		||||
# 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.username_pw_set(mqtt_username, mqtt_password)  # MQTT server credentials
 | 
			
		||||
@ -47,6 +46,8 @@ def write_wallmountedthermostatpro(room, device):
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def heating_profile(group):
 | 
			
		||||
    print(group)
 | 
			
		||||
    topic = 'heatingProfiles/'
 | 
			
		||||
    # heatingGroup=homematicip.group.HeatingGroup(group)
 | 
			
		||||
    # heatingGroup.__init__(home)
 | 
			
		||||
    print("Heating Profiles")
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user