Skip to content

Cannot Create Thermostat Accessory #126

@jtsiros

Description

@jtsiros

Hello,

I'm attempting to create a thermostat accessory, and for some reason, The Home app returns "Couldn't connect to this accessory." error.

here is my initialization code:

info := accessory.Info{
		Name:         "Nest",
		Manufacturer: "Nest Labs Inc",
	}
	acc := accessory.NewThermostat(
		info,
		75.0,
		75.0,
		75.0,
		1.0,
	)
	config := hc.Config{Pin: *pin, Port: *port}
	tp, err := hc.NewIPTransport(config, acc.Accessory)
	if err != nil {
		log.Info.Panicln(err.Error())
	}
	hc.OnTermination(func() {
		<-tp.Stop()
	})
	tp.Start()

Here is an excerpt from the logs:

DEBUG 2018/08/23 20:19:48 signature is valid
DEBUG 2018/08/23 20:19:48 Setup secure session
DEBUG 2018/08/23 20:19:48 192.168.7.28:64933 GET /accessories
DEBUG 2018/08/23 20:19:48 {"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"value":"Nest Labs Inc","format":"string"},{"iid":4,"type":"21","perms":["pr"],"value":"undefined","format":"string"},{"iid":5,"type":"23","perms":["pr"],"value":"Nest","format":"string"},{"iid":6,"type":"30","perms":["pr"],"value":"undefined","format":"string"},{"iid":7,"type":"52","perms":["pr"],"value":"","format":"string"}]},{"iid":8,"type":"4A","characteristics":[{"iid":9,"type":"F","perms":["pr","ev"],"value":0,"format":"uint8"},{"iid":10,"type":"33","perms":["pr","pw","ev"],"value":0,"format":"uint8"},{"iid":11,"type":"11","perms":["pr","ev"],"value":0,"format":"float","unit":"celsius","maxValue":0,"minValue":0,"minStep":1},{"iid":12,"type":"35","perms":["pr","pw","ev"],"value":10,"format":"float","unit":"celsius","maxValue":0,"minValue":0,"minStep":1},{"iid":13,"type":"36","perms":["pr","pw","ev"],"value":0,"format":"uint8"}]}]}]}
DEBUG 2018/08/23 20:19:48 192.168.7.28:64933 POST /pairings
DEBUG 2018/08/23 20:19:48 ->     Method: Delete
DEBUG 2018/08/23 20:19:48 -> Permission: 0
DEBUG 2018/08/23 20:19:48 ->   Username: 1A9D0022-5D0F-4812-9514-7F1DE6DC2DFB
DEBUG 2018/08/23 20:19:48 ->       LTPK: []
DEBUG 2018/08/23 20:19:48 Remove LTPK for client '1A9D0022-5D0F-4812-9514-7F1DE6DC2DFB'
DEBUG 2018/08/23 20:19:48 Event: unpaired with device
DEBUG 2018/08/23 20:19:49 Close connection and remove session

I've been able to successfully run a LightSwitch accessory without any issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions