The HomeKit Accessory Protocol (hap) implemented in Go

Related tags

Network hap
Overview

hap

GoDoc Widget Travis Widget

hap (previously hc) is a lightweight library to develop HomeKit accessories in Go. It abstracts the HomeKit Accessory Protocol (HAP) and makes it easy to work with services and characteristics.

hap handles the underlying communication between HomeKit accessories and clients. You can focus on implementing the business logic for your accessory, without having to worry about the protocol.

Here are some projects which use hap.

What is HomeKit?

HomeKit is a set of protocols and libraries from Apple. It is used by Apple's platforms to communicate with smart home appliances. A non-commercial version of the documentation is now available on the HomeKit developer website.

HomeKit is fully integrated into iOS since iOS 8. Developers can use HomeKit.framework to communicate with accessories using high-level APIs.

Home+.app

I've developed the Home+ app to control HomeKit accessories from iPhone, iPad, and Apple Watch. If you want to support hap, please purchase Home from the App Store. That would be awesome. ❤️

Migrate from hc

This library is a rewrite of hc. If you want to migrate from hc, consider the following changes.

  • Instead of hc.NewIPTransport(...) you now call hap.NewServer(...) to create a server.
  • You can create your own persistent storage by implementing the Store interface.
  • Setting the value of a characteristic can now fail. Fixes hc#163
  • You can define custom http handlers. Fixes hc#212
server.ServeMux().HandleFunc("/ping", func(res http.ResponseWriter, req *http.Request) {
    res.Write([]byte("pong"))
})
  • You can define your own public and private key (just in case) by setting the Key field of the server. Otherwise those keys are generate and stored on disk for you.
server.Key = hap.KeyPair{
	Public:  []byte{...},
	Private: []byte{...},
}

Features

Usage

In a following example a simple on/off switch is created. It can be paired with HomeKit using the Apple Home app – use the pin code 00102003.

package main

import (
	"github.com/brutella/hap"
	"github.com/brutella/hap/accessory"

	"context"
	"log"
	"os"
	"os/signal"
	"syscall"
)

func main() {
	// Create the switch accessory.
	a := accessory.NewSwitch(accessory.Info{
		Name: "Lamp",
	})

	// Store the data in the "./db" directory.
	fs := hap.NewFsStore("./db")

	// Create the hap server.
	server, err := hap.NewServer(fs, a.A)
	if err != nil {
		// stop if an error happens
		log.Panic(err)
	}

	// Setup a listener for interrupts and SIGTERM signals
	// to stop the server.
	c := make(chan os.Signal)
	signal.Notify(c, os.Interrupt)
	signal.Notify(c, syscall.SIGTERM)

	ctx, cancel := context.WithCancel(context.Background())
	go func() {
		<-c
		// Stop delivering signals.
		signal.Stop(c)
		// Cancel the context to stop the server.
		cancel() 
	}()

	// Run the server.
	server.ListenAndServe(ctx)
}

Events

The library provides callback functions, which let you know when a client updates a characteristic value. The following example shows how to get notified when the On characteristic value changes.

a.Switch.On.OnValueRemoteUpdate(func(on bool) {
    if on == true {
        log.Println("Switch is on")
    } else {
        log.Println("Switch is off")
    }
})

If you want to change the state of a switch programmatically, you call SetValue(...).

a.Switch.On.SetValue(true)

The library takes care of the rest and notifies all connected clients that the state has changed.

Multiple Accessories

When you create a server you can specify multiple accessories like this.

var a1, a2, a3 *accessory.A
s, err := hap.NewServer(fs, a1, a2, a3)

By doing so, the first accessory a1 appears as a bridge in HomeKit. When adding the accessories to HomeKit, iOS only shows the bridge accessory. Once the bridge was added, the other accessories appear automatically.

HomeKit requires that every accessory has a unique id, which must not change between system restarts. hap automatically assigns the ids for you based on the order in which the accessories are added to the server.

The best would be to specify the unique id for every accessory yourself, like this

a1.Id = 1
a2.Id = 2

Accessory Architecture

HomeKit uses a hierarchical architecture to define accessories, services and characeristics. At the root level there is an accessory. Every accessory contains services. And every service contains characteristics.

For example a lightbulb accessory contains a lightbulb service. This service contains the on characteristic.

There are predefined accessories, services and characteristics available in HomeKit. Those types are defined in the packages accessory, service, characteristic.

Contact

Matthias Hochgatterer

Website: https://hochgatterer.me

Github: https://github.com/brutella

Twitter: https://twitter.com/brutella

License

hap is available under the Apache License 2.0 license. See the LICENSE file for more info.

Comments
  • hap does not support multiple servers/bridges

    hap does not support multiple servers/bridges

    	server, err := hap.NewServer(store, newBridge.A, a...)
    	if err != nil {
    		// stop if an error happens
    		c.log.Printf("Error creating HAP Bridge '%s'", group)
    	}
    	server.Pin = "111111" // fake
    	c.log.Printf("Starting HAP Bridge '%s' with %d devices", group, len(a))
    	ctx, _ := context.WithCancel(context.Background()) // TODO implement cancel in top
    	err = server.ListenAndServe(ctx)
    

    Multiple bridges with accessories are supported by multiple servers only. So creating a new bridge and assign it to a new server will start listening on random ports. While the bridges all appear on the Home App 'Add new device', only one bridge can be added. When trying to add a second one, the Home App waits to connect and runs into an timeout. All server appear correctly in the DNS viewer. Is there a way to have multiple bridges?

    opened by jurjevic 6
  • Dynamic device resolution

    Dynamic device resolution

    Hey @brutella :wave:

    First of I all would like to thank you! I just started playing around with this library and I finally added some glue code to my own library and was able to create a simple home-automation app with device auto discovery within an hour! :clap:

    Also the possibility to add an external data-storage is great, so I can easily run this within a container and won't have to worry about local filesystems. :clap:

    Nevertheless it seems like I have run into a problem:I am trying to autodetect my devices.

    I am doing something like that:

    devices, _ := hs100.Discover("192.168.2.0/24", configuration.Default().WithTimeout(3*time.Second))
    var plugs []*accessory.A
    for _, d := range devices {
         plugs = append(plugs, toPlug(d).A)
    }
    
    server, err := hap.NewServer(fs, accessory.NewBridge(accessory.Info{
         Name: "bridge",
    }).A, plugs...)
    
    ...
    
    func toPlug(d *hs100.Hs100) *accessory.Switch {
    	info, err := d.GetInfo()
    	if err != nil {
    		panic(err)
    	}
    	
    	result := accessory.NewSwitch(accessory.Info{
    		Name:         info.Name,
    		SerialNumber: info.DeviceId,
    	})
    
    	result.Switch.On.ValueRequestFunc = func(request *http.Request) (value interface{}, code int) {
    		if isOn, err := d.IsOn(); err != nil {
    			// please ignore the wrong return code
                            return false, -1
    		} else {
    			return isOn, 0
    		}
    	}
    
    	result.Switch.On.OnSetRemoteValue(func(v bool) error {
    		if v == true {
    			return d.TurnOn()
    		} else {
    			return d.TurnOff()
    		}
    	})
    	
    	return result
    }
    
    

    This auto-creates the accessories with a consistent name + serialnumber (idempotent action). Sadly the order of the detected devices is not idempotent as there is no order and devices may be added or removed.

    When restarting the services, I have noticed that the name of the Home-App was not matching to the actor anymore. I believe that's because of the id generation of the accessories.

    I tried to work my way around this by manually generating a unique accessory id before starting the server, but that feels like I am having to much knowledge of what is going on inside of hap.

    Maybe you can share some thoughts about potential solutions or maybe my use-case is just unsupported.

    Thanks and best regards, Dennis

    opened by jaedle 3
  • [Question] Windows Shutter process

    [Question] Windows Shutter process

    Hello again, I'm trying to build a gateway with my shutters. I just want some clarification about the process to update / get update with a WindowsCovering device.

    1. As I understand it CurrentPosition is the actual position of the shutter. TargetPosition is the desired value when you use the Homekit UI. Is That correct?

    My Actual process is the following:

    • On TargetPosition.OnValueRemoteUpdate event is received I activate the shutter. When I receive a confimation that the shutter reached the desired position, I SetValue on CurrentPosition.

    • If the shutter is manually positionned, I SetValue on CurrentPosition

    1. Do I need to SetValue on TargetPosition? and when?

    2. Does PositionState need to be updated as well? Or is it handeled by the protocol?

    Thanks for your time

    opened by ferllings 2
  • [Question] on update events

    [Question] on update events

    Hello,

    I would like some clarifications about the update events: Whats the difference between: OnValueRemoteUpdate, OnValueUpdate and OnSetRemoteValue?

    opened by ferllings 2
  • ClientController feature?

    ClientController feature?

    Hello,

    In deprecated library I have found example https://github.com/brutella/hc/blob/master/_example/client.go

    so I'm able to pair with remote accessory.

    Is this functionality present in current package or any plans to implement it?

    Thanks.

    opened by shabunin 1
  • Improve consistency for Accessories

    Improve consistency for Accessories

    This fixes some variable names that were incorrect in accessories/security_system.go but also changes to a single style for all accessories setup, including using AddS() rather than a manual append().

    It also cleans up some spacing and formatting to be consistent between all accessories.

    opened by rblenkinsopp 1
  • Broken link in README

    Broken link in README

    First paragraph:

    hap (previously hc) is a lightweight library to develop HomeKit accessories in Go. It abstracts the HomeKit Accessory Protocol (HAP) and makes it easy to work with services and characteristics.

    link to characteristics (last word) is broken: https://github.com/brutella/hap/blob/master/characteristic/README.md

    opened by bartekpacia 1
  • Fix error handling

    Fix error handling

    This code

    ...
    ctx, cancel := context.WithCancel(context.Background())
    go func() {
    	time.Sleep(time.Second)	
    	cancel()
    }()
    
    err = server.ListenAndServe(ctx)
    if err != nil && !errors.Is(err, http.ErrServerClosed) {
    	log.Println(err)
    }
    ...
    

    throws false positive errors:

    conn.go:83: decryption failed: read tcp 192.168.1.2:38891->192.168.1.3:58876: use of closed network connection
    conn.go:83: decryption failed: read tcp 192.168.1.2:38891->192.168.1.4:49476: use of closed network connection
    accept tcp [::]: 38891: use of closed network connection
    

    Thanks.

    opened by asedov 1
  • Upgrading from HC to HAP

    Upgrading from HC to HAP

    Hello!

    First I would like to thank you for the amazing work on this library, it's really fun to play with Go and Homekit accessories!

    I'm trying to migrate from HC to HAP in the most idiomatic way, but I'm not sure to understand what's the equivalent of OnValueRemoteGet of a characteristic in HAP, to allow Homekit to update the current real value of the characteristic (in my case, it's an air conditioner controlled via a remote API in the cloud, which I can also control using a remote)

    If someone could help me on that, it would really help me!

    Thank you :)

    opened by LorisFriedel 1
  • tlv8: unmarshal (silent) bug

    tlv8: unmarshal (silent) bug

    Servus,

    as previously mentioned, I have been playing with hap as well and used your library to test the correctness of my implementation.

    While trying to debug my tlv8 unmarshal implementation, I found a bug in the tlv8.Unmarshal function. Please find below a test which marshals a struct, unmarshals it and compare the initial and final structs.

    func TestMarhsalUnmarshalDefaultVideoStreamConfiguration(t *testing.T) {
    	want := rtp.DefaultVideoStreamConfiguration()
    	buf, err := Marshal(want)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	var is rtp.VideoStreamConfiguration
    	err = Unmarshal(buf, &is)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	if reflect.DeepEqual(is, want) == false {
    		t.Fatalf("is=%+v want=%+v", is, want)
    	}
    }
    

    I get the following error (as you can see the Parameters, Levels and other attributes differ):

    is={Codecs:[{Type:0 Parameters:{Profiles:[] Levels:[] Packetizations:[]} Attributes:[{Width:1920 Height:1080 Framerate:30} {Width:1280 Height:720 Framerate:30} {Width:640 Height:360 Framerate:30} {Width:480 Height:270 Framerate:30} {Width:320 Height:180 Framerate:30} {Width:1280 Height:960 Framerate:30} {Width:1024 Height:768 Framerate:30} {Width:640 Height:480 Framerate:30} {Width:480 Height:360 Framerate:30} {Width:320 Height:240 Framerate:15}]}]}
    
    want={Codecs:[{Type:0 Parameters:{Profiles:[{Id:0} {Id:1} {Id:2}] Levels:[{Level:0} {Level:1} {Level:2}] Packetizations:[{Mode:0}]} Attributes:[{Width:1920 Height:1080 Framerate:30} {Width:1280 Height:720 Framerate:30} {Width:640 Height:360 Framerate:30} {Width:480 Height:270 Framerate:30} {Width:320 Height:180 Framerate:30} {Width:1280 Height:960 Framerate:30} {Width:1024 Height:768 Framerate:30} {Width:640 Height:480 Framerate:30} {Width:480 Height:360 Framerate:30} {Width:320 Height:240 Framerate:15}]}]}
    

    FYI, my tlv8 implementation is split in 2 steps:

    1. construct an (un)marshaller based exclusively on the reflect.Type (a nested tree of func(io.Reader, reflect.Value) error)
    2. call this (un)marshaller with the reflect.Value

    This way, the first step can be cached based on the type and the whole process is a bit cleaner and faster.


    I will never repeat it enough: huge thanks for your amazing work on this library!

    opened by oliverpool 4
  • accessory pair failed if name is unicode

    accessory pair failed if name is unicode

    nas := accessory.NewSwitch(accessory.Info{
    		Name:         "服务器",
    		SerialNumber: "052AC-26AAM3",
    		Manufacturer: "Apple",
    		Model:        "AB",
    	})
    

    iphone will stuck when add accessory name use unicode unless the name is ascii charset

    opened by zeropool 1
  • MethodDeletePairing doesn't work correctly

    MethodDeletePairing doesn't work correctly

    maybe it's my problem I have 7 users at home adding an accessory works correctly, but if I remove the accessory, not all .pairing files are removed, after the accessory is not added again

    before pairing

    [email protected]:~/test/EX-Switch $ ls
      configHash
      keypair
      schema
      uuid
      version
    [email protected]:~/test/EX-Switch $
    

    after pairing

    [email protected]:~/test/EX-Switch $ ls
    39383141433539452d394636462d344644332d423532432d453631373731303439364342.pairing  
    31363039453845302d383830362d343935372d393746362d353842374132414241423146.pairing
    44323039333344452d343032342d343230422d423636392d313234314243374639343731.pairing
    35443739454338352d463336442d343634462d413436422d303430374236423145414445.pairing
    44414432383334432d383641302d344142312d423442372d393834433230363234393430.pairing  
    36364530414234412d383130392d343142442d414241392d444642343046423338313334.pairing
    46393330423233432d463436312d343845452d384234352d433139413846364241384533.pairing  
    configHash
    keypair
    schema
    uuid
    version
    [email protected]:~/test/EX-Switch $
    

    after removal

    [email protected]:~/test/EX-Switch $ ls
    31363039453845302d383830362d343935372d393746362d353842374132414241423146.pairing
    44414432383334432d383641302d344142312d423442372d393834433230363234393430.pairing
    39383141433539452d394636462d344644332d423532432d453631373731303439364342.pairing
    46393330423233432d463436312d343845452d384234352d433139413846364241384533.pairing
    configHash
    keypair
    schema
    uuid
    version
    [email protected]:~/test/EX-Switch $
    

    LOG

    [email protected]:~/test $ ./switch
    13:49:49 [ EX-Switch / Switch ] hap server create successful.
    13:49:49 [ EX-Switch / Switch ] hap server starting set, address :10102, pin 13467908.
    13:49:49 [HAP_DBG]listening at [::]:10102
    13:50:09 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-setup HTTP/1.1" from 192.168.1.100:54313 - 200 409B in 177.522883ms
    13:50:16 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-setup HTTP/1.1" from 192.168.1.100:54313 - 200 69B in 196.121612ms
    13:50:16 [HAP_DBG]{"Identifier":"66E0AB4A-8109-41BD-ABA9-DFB40FB38134","PublicKey":"G7SS+jNl/tQ1jLTFMUF9leRRbm2VW+GfDpa0fWerdng=","Signature":"ASeqt7Zy3WK3/vOuPD1HofU1cCXP0l3c9mCbnHBzTjQsWb5V/GClCWpwb7sOeBBEnyAGgwgUC4+bTZn3yrIkDQ=="}
    13:50:16 [HAP_DBG]ed25519 signature valid
    13:50:16 [HAP_DBG]storing public key for 66E0AB4A-8109-41BD-ABA9-DFB40FB38134
    13:50:17 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-setup HTTP/1.1" from 192.168.1.100:54313 - 200 140B in 1.123627018s
    13:50:18 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54314 - 200 140B in 20.987468ms
    13:50:18 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54314 - 200 3B in 9.517566ms
    13:50:18 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:50:18 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.100:54314 - 200 617B in 1.149214ms
    13:50:18 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:50:18 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54314 - 204 0B in 729.372µs
    13:50:18 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:50:18 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54314 - 204 0B in 294.269µs
    13:50:18 [HAP_DBG]{"characteristics":[{"aid":1,"iid":3,"value":"alpr777"},{"aid":1,"iid":4,"value":"HAP-SW"},{"aid":1,"iid":6,"value":"EX-Switch"},{"aid":1,"iid":7,"value":"1.2.3"}]}
    13:50:18 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.3,1.4,1.6,1.7 HTTP/1.1" from 192.168.1.100:54314 - 200 164B in 881.507µs
    13:50:19 [HAP_DBG]send event to 192.168.1.100:54314:
    EVENT/1.0 200 OK
    Content-Length: 52
    Content-Type: application/hap+json
    
    {"characteristics":[{"aid":1,"iid":9,"value":true}]}
    13:50:19 [ EX-Switch / Switch ] acc switch update on: bool - true
    13:50:19 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:50:20 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54314 - 200 3B in 1.003771875s
    13:50:20 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:50:21 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54314 - 200 3B in 1.003172295s
    13:50:22 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:50:23 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54314 - 200 3B in 1.005519422s
    13:50:23 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:50:24 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54314 - 200 3B in 1.005829422s
    13:50:24 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49237 - 200 140B in 20.281534ms
    13:50:24 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49237 - 200 3B in 9.18189ms
    13:50:24 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:50:24 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.165:49237 - 200 616B in 973.277µs
    13:50:25 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.178:49505 - 200 140B in 24.395215ms
    13:50:25 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50708 - 200 140B in 26.043959ms
    13:50:26 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 8.208144ms
    13:50:26 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50708 - 200 3B in 9.493191ms
    13:50:26 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:50:26 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.178:49505 - 200 616B in 815.414µs
    13:50:26 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:50:26 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.149:50708 - 200 616B in 1.804055ms
    13:50:28 [HAP_DBG]{"characteristics":[{"aid":1,"iid":7,"value":"1.2.3"}]}
    13:50:28 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.7 HTTP/1.1" from 192.168.1.178:49505 - 200 55B in 290.571µs
    13:50:31 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54317 - 200 140B in 20.626532ms
    13:50:31 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54317 - 200 3B in 9.430952ms
    13:50:31 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:50:31 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.100:54317 - 200 616B in 893.329µs
    13:50:31 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:50:32 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:50:32 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.178:49505 - 204 0B in 330.572µs
    13:50:32 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54317 - 200 3B in 1.004311049s
    13:50:32 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:50:32 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54317 - 204 0B in 470.624µs
    13:50:32 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:50:33 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54317 - 200 3B in 1.004374382s
    13:50:33 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:50:34 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"value":true}]}
    13:50:34 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.9 HTTP/1.1" from 192.168.1.178:49505 - 200 52B in 375.415µs
    13:50:34 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54317 - 200 3B in 1.003785531s
    13:50:34 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:50:35 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54317 - 200 3B in 1.003373346s
    13:50:35 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:50:36 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54317 - 200 3B in 1.005016674s
    13:50:36 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:50:37 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54317 - 200 3B in 1.003744231s
    13:50:42 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49240 - 200 140B in 24.757193ms
    13:50:42 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49240 - 200 3B in 12.577762ms
    13:50:42 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:50:42 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.165:49240 - 200 616B in 892.913µs
    13:50:42 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:50:43 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49240 - 200 3B in 1.003499861s
    13:50:43 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:50:44 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49240 - 200 3B in 1.006367507s
    13:50:44 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:50:45 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49240 - 200 3B in 1.004615952s
    13:50:45 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:50:46 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49240 - 200 3B in 1.004510172s
    13:50:46 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:50:47 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49240 - 200 3B in 1.004366111s
    13:50:47 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:50:48 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49240 - 200 3B in 1.005714804s
    13:50:49 [HAP_DBG]send event to 192.168.1.178:49505:
    EVENT/1.0 200 OK
    Content-Length: 53
    Content-Type: application/hap+json
    
    {"characteristics":[{"aid":1,"iid":9,"value":false}]}
    13:50:49 [ EX-Switch / Switch ] acc switch update on: bool - false
    13:50:53 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49241 - 200 140B in 21.212208ms
    13:50:53 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49241 - 200 3B in 10.620323ms
    13:50:53 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:50:53 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.165:49241 - 200 617B in 1.049579ms
    13:50:53 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:50:54 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49241 - 200 3B in 1.004746844s
    13:50:54 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:50:55 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49241 - 200 3B in 1.00471023s
    13:50:55 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:50:56 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49241 - 200 3B in 1.004023046s
    13:50:56 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:50:57 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.109:52609 - 200 140B in 24.039852ms
    13:50:57 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.109:52609 - 200 3B in 12.402607ms
    13:50:57 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49241 - 200 3B in 1.003746954s
    13:50:57 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:50:57 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:50:57 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.109:52609 - 200 617B in 1.819576ms
    13:50:58 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.106:65242 - 200 140B in 20.683251ms
    13:50:58 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.106:65242 - 200 3B in 11.267924ms
    13:50:58 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49241 - 200 3B in 1.006996004s
    13:50:58 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:50:58 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:50:58 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.106:65242 - 200 617B in 775.622µs
    13:50:59 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50714 - 200 140B in 20.845022ms
    13:50:59 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50714 - 200 3B in 10.960009ms
    13:50:59 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:50:59 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.149:50714 - 200 617B in 942.652µs
    13:50:59 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:50:59 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49241 - 200 3B in 1.003373884s
    13:51:00 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50714 - 200 3B in 1.004543359s
    13:51:00 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:01 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50714 - 200 3B in 1.004306745s
    13:51:01 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:02 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50714 - 200 3B in 1.004477892s
    13:51:02 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:51:03 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54319 - 200 140B in 20.51195ms
    13:51:03 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54319 - 200 3B in 9.28814ms
    13:51:03 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:51:03 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.100:54319 - 200 617B in 900.048µs
    13:51:03 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:03 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50714 - 200 3B in 1.004598725s
    13:51:03 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:51:04 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54319 - 200 3B in 1.003505084s
    13:51:04 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:51:04 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54319 - 204 0B in 377.55µs
    13:51:04 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:51:04 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50714 - 200 3B in 1.005877107s
    13:51:04 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:51:05 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54319 - 200 3B in 1.005296119s
    13:51:05 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:51:05 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50714 - 200 3B in 1.00454555s
    13:51:06 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54319 - 200 3B in 1.005022684s
    13:51:06 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:51:07 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54319 - 200 3B in 1.004293833s
    13:51:07 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:08 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54319 - 200 3B in 1.004667842s
    13:51:08 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:51:09 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54319 - 200 3B in 1.004366438s
    13:51:11 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50717 - 200 140B in 20.612418ms
    13:51:11 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50717 - 200 3B in 9.927149ms
    13:51:11 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:51:11 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.149:50717 - 200 617B in 871.559µs
    13:51:11 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:51:12 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50717 - 200 3B in 1.00356785s
    13:51:12 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:13 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50717 - 200 3B in 1.004462117s
    13:51:13 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:13 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:51:14 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50717 - 200 3B in 1.004790867s
    13:51:14 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004550555s
    13:51:14 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:51:14 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:15 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50717 - 200 3B in 1.004613473s
    13:51:15 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:51:15 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005542219s
    13:51:15 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:16 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50717 - 200 3B in 1.003924882s
    13:51:16 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:51:16 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005228263s
    13:51:16 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:51:17 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50717 - 200 3B in 1.004434308s
    13:51:17 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004550922s
    13:51:17 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:51:18 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004225612s
    13:51:18 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:51:19 [HAP_DBG]send event to 192.168.1.178:49505:
    EVENT/1.0 200 OK
    Content-Length: 52
    Content-Type: application/hap+json
    
    {"characteristics":[{"aid":1,"iid":9,"value":true}]}
    13:51:19 [ EX-Switch / Switch ] acc switch update on: bool - true
    13:51:19 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.006108522s
    13:51:25 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:51:26 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004719989s
    13:51:26 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:27 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004393117s
    13:51:27 [HAP_DBG]{"characteristics":[{"aid":1,"iid":7,"value":"1.2.3"}]}
    13:51:27 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.7 HTTP/1.1" from 192.168.1.178:49505 - 200 55B in 260.624µs
    13:51:27 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:27 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49242 - 200 140B in 20.780595ms
    13:51:27 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49242 - 200 3B in 11.736568ms
    13:51:27 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:51:27 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.165:49242 - 200 616B in 1.007912ms
    13:51:27 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:51:28 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005066917s
    13:51:28 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49242 - 200 3B in 1.004584992s
    13:51:28 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:29 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49242 - 200 3B in 1.004111186s
    13:51:29 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:29 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:51:30 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49242 - 200 3B in 1.005170755s
    13:51:30 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:51:30 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005846508s
    13:51:30 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:51:31 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49242 - 200 3B in 1.004659586s
    13:51:31 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:51:31 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004376175s
    13:51:32 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:51:32 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49242 - 200 3B in 1.005613687s
    13:51:32 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:51:33 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005096491s
    13:51:33 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49242 - 200 3B in 1.00511805s
    13:51:49 [HAP_DBG]send event to 192.168.1.178:49505:
    EVENT/1.0 200 OK
    Content-Length: 53
    Content-Type: application/hap+json
    
    {"characteristics":[{"aid":1,"iid":9,"value":false}]}
    13:51:49 [ EX-Switch / Switch ] acc switch update on: bool - false
    13:51:54 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50718 - 200 140B in 20.871836ms
    13:51:54 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50718 - 200 3B in 10.603576ms
    13:51:54 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:51:54 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.149:50718 - 200 617B in 1.093869ms
    13:51:54 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:51:55 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50718 - 200 3B in 1.004277371s
    13:51:55 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:56 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:51:56 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50718 - 200 3B in 1.004096921s
    13:51:56 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:51:57 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004818554s
    13:51:57 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50718 - 200 3B in 1.004098023s
    13:51:57 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:51:58 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005379241s
    13:51:58 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:58 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:51:59 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50718 - 200 3B in 1.005165518s
    13:51:59 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:51:59 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005210866s
    13:52:00 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50718 - 200 3B in 1.004590172s
    13:52:00 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:52:01 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.149:50718 - 200 3B in 1.004063876s
    13:52:02 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:52:03 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004336036s
    13:52:03 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:52:04 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004127091s
    13:52:04 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:52:05 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.003744031s
    13:52:19 [HAP_DBG]send event to 192.168.1.178:49505:
    EVENT/1.0 200 OK
    Content-Length: 52
    Content-Type: application/hap+json
    
    {"characteristics":[{"aid":1,"iid":9,"value":true}]}
    13:52:19 [ EX-Switch / Switch ] acc switch update on: bool - true
    13:52:28 [HAP_DBG]{"characteristics":[{"aid":1,"iid":7,"value":"1.2.3"}]}
    13:52:28 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.7 HTTP/1.1" from 192.168.1.178:49505 - 200 55B in 240.001µs
    13:52:34 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54322 - 200 140B in 20.624802ms
    13:52:34 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54322 - 200 3B in 9.208046ms
    13:52:34 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:52:34 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.100:54322 - 200 616B in 927.831µs
    13:52:34 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:52:35 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54322 - 200 3B in 1.004271722s
    13:52:35 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:52:35 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54322 - 204 0B in 702.656µs
    13:52:35 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:52:36 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54322 - 200 3B in 1.004545008s
    13:52:36 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:52:37 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54322 - 200 3B in 1.004138819s
    13:52:38 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:52:39 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54322 - 200 3B in 1.009426788s
    13:52:39 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:52:40 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54322 - 200 3B in 1.003739272s
    13:52:40 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:52:41 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54322 - 200 3B in 1.004919204s
    13:52:49 [HAP_DBG]send event to 192.168.1.178:49505:
    EVENT/1.0 200 OK
    Content-Length: 53
    Content-Type: application/hap+json
    
    {"characteristics":[{"aid":1,"iid":9,"value":false}]}
    13:52:49 [ EX-Switch / Switch ] acc switch update on: bool - false
    13:53:01 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49243 - 200 140B in 24.10494ms
    13:53:01 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.165:49243 - 200 3B in 12.60908ms
    13:53:01 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":false}]}]}]}
    13:53:01 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.165:49243 - 200 617B in 895.503µs
    13:53:01 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:53:02 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49243 - 200 3B in 1.003770701s
    13:53:02 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:53:03 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49243 - 200 3B in 1.004338995s
    13:53:03 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:53:04 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49243 - 200 3B in 1.004997391s
    13:53:04 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:53:05 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49243 - 200 3B in 1.004219409s
    13:53:05 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:53:06 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49243 - 200 3B in 1.003822089s
    13:53:06 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:53:07 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.165:49243 - 200 3B in 1.00435103s
    13:53:19 [HAP_DBG]send event to 192.168.1.178:49505:
    EVENT/1.0 200 OK
    Content-Length: 52
    Content-Type: application/hap+json
    
    {"characteristics":[{"aid":1,"iid":9,"value":true}]}
    13:53:19 [ EX-Switch / Switch ] acc switch update on: bool - true
    13:53:29 [HAP_DBG]add pairing F930B23C-F461-48EE-8B45-C19A8F6BA8E3
    13:53:30 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004011799s
    13:53:30 [HAP_DBG]add pairing DAD2834C-86A0-4AB1-B4B7-984C20624940
    13:53:31 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.003778728s
    13:53:31 [HAP_DBG]{"characteristics":[{"aid":1,"iid":7,"value":"1.2.3"}]}
    13:53:31 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.7 HTTP/1.1" from 192.168.1.178:49505 - 200 55B in 242.662µs
    13:53:31 [HAP_DBG]add pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:53:32 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005071522s
    13:53:33 [HAP_DBG]add pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:53:33 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54323 - 200 140B in 20.763558ms
    13:53:33 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54323 - 200 3B in 10.578137ms
    13:53:33 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:53:33 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.100:54323 - 200 616B in 1.068356ms
    13:53:33 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":false}]}
    13:53:33 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54323 - 204 0B in 987.52µs
    13:53:34 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.005147635s
    13:53:34 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":false}]}
    13:53:34 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.178:49505 - 204 0B in 327.351µs
    13:53:34 [HAP_DBG]add pairing 981AC59E-9F6F-4FD3-B52C-E617710496CB
    13:53:35 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.003825046s
    13:53:35 [HAP_DBG]add pairing 1609E8E0-8806-4957-97F6-58B7A2ABAB1F
    13:53:36 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.178:49505 - 200 3B in 1.004645945s
    13:53:49 [ EX-Switch / Switch ] acc switch update on: bool - false
    13:54:19 [ EX-Switch / Switch ] acc switch update on: bool - true
    13:54:31 [HAP_DBG]{"characteristics":[{"aid":1,"iid":7,"value":"1.2.3"}]}
    13:54:31 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.7 HTTP/1.1" from 192.168.1.178:49505 - 200 55B in 332.348µs
    13:54:34 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:54:34 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.178:49505 - 204 0B in 366.15µs
    13:54:35 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"value":true}]}
    13:54:35 [HAP_DBG]"GET http://Switch._hap._tcp.local/characteristics?id=1.9 HTTP/1.1" from 192.168.1.178:49505 - 200 52B in 234.951µs
    13:54:35 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54329 - 200 140B in 20.638585ms
    13:54:35 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54329 - 200 3B in 10.552315ms
    13:54:35 [HAP_DBG]{"accessories":[{"aid":1,"services":[{"iid":1,"type":"3E","characteristics":[{"iid":2,"type":"14","perms":["pw"],"format":"bool"},{"iid":3,"type":"20","perms":["pr"],"format":"string","value":"alpr777"},{"iid":4,"type":"21","perms":["pr"],"format":"string","value":"HAP-SW"},{"iid":5,"type":"23","perms":["pr"],"format":"string","value":"Switch"},{"iid":6,"type":"30","perms":["pr"],"format":"string","value":"EX-Switch"},{"iid":7,"type":"52","perms":["pr"],"format":"string","value":"1.2.3"}]},{"iid":8,"type":"49","characteristics":[{"iid":9,"type":"25","perms":["pr","pw","ev"],"format":"bool","value":true}]}]}]}
    13:54:35 [HAP_DBG]"GET http://Switch._hap._tcp.local/accessories HTTP/1.1" from 192.168.1.100:54329 - 200 616B in 1.256161ms
    13:54:35 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:54:35 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54329 - 204 0B in 375.89µs
    13:54:35 [HAP_DBG]{"characteristics":[{"aid":1,"iid":9,"ev":true}]}
    13:54:35 [HAP_DBG]"PUT http://Switch._hap._tcp.local/characteristics HTTP/1.1" from 192.168.1.100:54329 - 204 0B in 383.338µs
    13:54:40 [HAP_DBG]delete pairing D20933DE-4024-420B-B669-1241BC7F9471
    13:54:40 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54332 - 200 140B in 20.536704ms
    13:54:40 [HAP_INFO]request from 192.168.1.100:54332 not authorized
    13:54:40 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54332 - 400 17B in 893.917µs
    13:54:40 [HAP_INFO]request from 192.168.1.100:54332 not authorized
    13:54:40 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54332 - 400 17B in 424.171µs
    13:54:40 [HAP_INFO]request from 192.168.1.100:54332 not authorized
    13:54:40 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54332 - 400 17B in 143.647µs
    13:54:40 [HAP_INFO]request from 192.168.1.100:54332 not authorized
    13:54:40 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54332 - 400 17B in 164.95µs
    13:54:40 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.100:54332 - 200 3B in 9.260736ms
    13:54:40 [HAP_DBG]delete pairing 5D79EC85-F36D-464F-A46B-0407B6B1EADE
    13:54:41 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54329 - 200 3B in 1.005979679s
    13:54:41 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54332 - 200 3B in 1.006042603s
    13:54:41 [HAP_DBG]delete pairing 66E0AB4A-8109-41BD-ABA9-DFB40FB38134
    13:54:41 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50721 - 200 140B in 20.549577ms
    13:54:41 [HAP_INFO]not paired with 66E0AB4A-8109-41BD-ABA9-DFB40FB38134 yet
    13:54:41 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.149:50721 - 200 6B in 499.223µs
    13:54:42 [HAP_DBG]Closing connection to 192.168.1.178:49505
    13:54:42 [HAP_DBG]Closing connection to 192.168.1.100:54332
    13:54:42 [HAP_DBG]"POST http://Switch._hap._tcp.local/pairings HTTP/1.1" from 192.168.1.100:54332 - 200 3B in 1.007157167s
    13:54:42 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.178:49508 - 200 140B in 21.850683ms
    13:54:43 [HAP_INFO]not paired with 66E0AB4A-8109-41BD-ABA9-DFB40FB38134 yet
    13:54:43 [HAP_DBG]"POST http://Switch._hap._tcp.local/pair-verify HTTP/1.1" from 192.168.1.178:49508 - 200 6B in 520.974µs
    13:54:49 [ EX-Switch / Switch ] acc switch update on: bool - false
    
    opened by xxandev 0
  • Server does not appear to do any service annoucement via DNS-SD

    Server does not appear to do any service annoucement via DNS-SD

    I'm running the example in the README usage section; the server starts and is listening but does not appear to be doing any service announcement and therefore never can be paired in the Home app.

    If I run dns-sd -B _hap._tcp it does not appear.

    I tried the hklamp example from the previous library hc and it worked fine and did show up when running dns-sd -B _hap._tcp so I feel that I can rule out my setup/system/network.

    opened by rogchap 7
  • Build window fail

    Build window fail

    goroutine 18 [running]:
    github.com/brutella/dnssd.(*Service).IPsAtInterface(0xc0000736b8, 0x0)
            D:/***/github.com/brutella/[email protected]/service.go:150 +0x3d
    github.com/brutella/dnssd.A({{0xc000212020, 0x4}, {0x6d4654, 0x9}, {0x6d3039, 0x5}, {0xc000212024, 0xc}, 0xc000206120, 0x0, ...}, ...)
            D:/***/github.com/brutella/[email protected]/dns.go:116 +0x39
    github.com/brutella/dnssd.containsConflictingAnswers(0xc000406090, 0xc000214020)
            D:/***/github.com/brutella/[email protected]/responder.go:465 +0xbb
    github.com/brutella/dnssd.findConflicts(0xc000406090, {0xc00040a010, 0x1, 0x1?})
            D:/***/github.com/brutella/[email protected]/responder.go:446 +0x9b
    github.com/brutella/dnssd.(*responder).handleRequest(0xc000210000, 0xc000406090)
            D:/***/github.com/brutella/[email protected]/responder.go:238 +0x195
    github.com/brutella/dnssd.(*responder).respond(0xc000210000, {0x775710, 0xc00022c040})
            D:/***/github.com/brutella/[email protected]/responder.go:203 +0x1d4
    github.com/brutella/dnssd.(*responder).Respond(0xc000210000, {0x775710, 0xc00022c040})
            D:/***/github.com/brutella/[email protected]/responder.go:113 +0x3ef
    github.com/brutella/hap.(*Server).listenAndServe.func1()
            D:/***/github.com/brutella/[email protected]/server.go:205 +0x37
    created by github.com/brutella/hap.(*Server).listenAndServe
            D:/***/github.com/brutella/[email protected]/server.go:204 +0x465
    
    Process finished with the exit code 2
    

    Same question https://github.com/brutella/hc/issues/201

    opened by zuozhehao 4
Owner
Matthias
Developing Home Automation software (HomeKit, KNX).
Matthias
A simple FTP protocol with client and server implemented in TypeScript and Golang

websocket-ftp A simple FTP protocol with client and server implemented in TypeScript and Golang. Example (Client) const buffer: Uint8Array = (new Text

LQR471814 0 Apr 14, 2022
wire protocol for multiplexing connections or streams into a single connection, based on a subset of the SSH Connection Protocol

qmux qmux is a wire protocol for multiplexing connections or streams into a single connection. It is based on the SSH Connection Protocol, which is th

Jeff Lindsay 202 Nov 30, 2022
A simple tool to convert socket5 proxy protocol to http proxy protocol

Socket5 to HTTP 这是一个超简单的 Socket5 代理转换成 HTTP 代理的小工具。 如何安装? Golang 用户 # Required Go 1.17+ go install github.com/mritd/[email protected] Docker 用户 docker pull m

mritd 7 Sep 7, 2022
BGP implemented in the Go Programming Language

GoBGP: BGP implementation in Go GoBGP is an open source BGP implementation designed from scratch for modern environment and implemented in a modern pr

null 3.1k Dec 1, 2022
A persistent queue implemented in Go.

goq goq is a persistent queue implemented in Go. Features Communication over HTTP RESTful with JSON responses (trivial to write client libraries) Mini

Kunal Anand 29 Feb 10, 2022
URI Templates (RFC 6570) implemented in Go

uritemplates -- import "github.com/jtacoma/uritemplates" Package uritemplates is a level 4 implementation of RFC 6570 (URI Template, http://tools.ietf

Joshua Tacoma 71 Jan 15, 2022
communicate with iOS devices implemented with Golang

Golang-iDevice much more easy to use ?? electricbubble/gidevice-cli Installation go get github.com/electricbubble/gidevice Devices package main impor

雷系泡泡 208 Nov 21, 2022
A TCP socket based chat server implemented using Go

Go Chat Server A better TCP socket chat server implemented using Go Connecting nc localhost 5000 Docker Build the container image docker build -t grub

Christopher Gruber 0 Oct 16, 2021
many tools implemented in Golang

Go-Tools many tools implemented in Golang tools project comments abtest AB测试分流 dag_flow DAG工作流 hugo_themes Hugo主题 log_monitor 日志监控服务 pepper_cache 内存kv

殷雅俊 0 Dec 12, 2021
A Twirp RPC OpenAPI generator implemented as `protoc` plugin

twirp-openapi-gen A Twirp RPC OpenAPI generator implemented as protoc plugin Currently supports only OpenAPI 2.0 Usage Installing the generator for pr

Albenik's Golang Projects 1 May 26, 2022
Pacemaker - Rate limit library. Currently implemented rate limits are

PaceMaker Rate limit library. Currently implemented rate limits are Fixed window

Marquitos 5 Nov 5, 2022
Absystem - Golang implemented absystem core api

环境初始化 export GOPROXY=https://goproxy.cn,direct && export GO111MODULE=on # OR go

liangchengming 2 Feb 16, 2022
Package arp implements the ARP protocol, as described in RFC 826. MIT Licensed.

arp Package arp implements the ARP protocol, as described in RFC 826. MIT Licensed. Portions of this code are taken from the Go standard library. The

Matt Layher 300 Nov 10, 2022
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.1.1 and V5 in golang

中文文档 Gmqtt News: MQTT V5 is now supported. But due to those new features in v5, there area lots of breaking changes. If you have any migration problem

null 759 Nov 20, 2022
A TCP Server Framework with graceful shutdown, custom protocol.

xtcp A TCP Server Framework with graceful shutdown,custom protocol. Usage Define your protocol format: Before create server and client, you need defin

xfx 138 Nov 22, 2022
Go library for writing standalone Map/Reduce jobs or for use with Hadoop's streaming protocol

dmrgo is a Go library for writing map/reduce jobs. It can be used with Hadoop's streaming protocol, but also includes a standalone map/reduce impleme

Damian Gryski 103 Nov 27, 2022
Diameter stack and Base Protocol (RFC 6733) for the Go programming language

Diameter Base Protocol Package go-diameter is an implementation of the Diameter Base Protocol RFC 6733 and a stack for the Go programming language. St

Alexandre Fiori 213 Nov 10, 2022
SMPP 3.4 Protocol for the Go programming language

SMPP 3.4 This is an implementation of SMPP 3.4 for Go, based on the original smpp34 from Kevin Patel. The API has been refactored to idiomatic Go code

Alexandre Fiori 197 Nov 12, 2022