author | Jordan Doyle <jordan@doyle.la> | 2022-10-07 1:38:04.0 +00:00:00 |
---|---|---|
committer | Jordan Doyle <jordan@doyle.la> | 2022-10-07 1:38:07.0 +00:00:00 |
commit | 541b3478cdf4eda7c4c5798b9832e086946e3730 [patch] |
|
tree | 4ab05411f04584d6aaa5b24975b88753538f8eeb |
|
parent | f82021c60721e17d2c41294fc13bf79f7268be08 |
|
download | 541b3478cdf4eda7c4c5798b9832e086946e3730.tar.gz |
Add active characteristic to motion sensor
Diff
cmd/hkbi/main.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/hkbi/main.go b/cmd/hkbi/main.go index 29c22cd..abbface 100644 startListeningForStreams(camera.Id, cam.StreamManagement1, globalState, &config, bi.BaseUrl) startListeningForStreams(camera.Id, cam.StreamManagement2, globalState, &config, bi.BaseUrl) // create the HomeKit motion sensor accessory // create the HomeKit motion sensor service motionSensor := service.NewMotionSensor() motionSensorActive := characteristic.NewActive() motionSensor.AddC(motionSensorActive.C) // create camera recording management service recordingManagement := service.NewCameraRecordingManagement() cam.AddS(recordingManagement.S) // add motion sensor service to camera - TODO: needs to add to DataStreamManagement too cam.AddS(motionSensor.S) // add the cameras to our output array/map for adding to the server and dispatching