This demo contains two general modules: AI algorithm module and a zigbee device module.
- CC2531 USB sniffer with firmware been refreshed
- KubeEdge (v1.4+)
- Clone the project
- Run KubeEdge
$ cd face-recong
$ docker build -t face-recon:dev
$ cd ..
$ kubectl apply -f faceReconDeployment.yaml
- Calling the camera defaults to a local camera, and you can change the IP address of the camera by using
-- camera = ip:port
- You can add the
--show
parameter to determine whether the recognition results are displayed on the display. - When adding the
--show
parameter, you can pass in face data via the S key on the keyboard - Copy the model to the local
/model/facenet
directory before running it
$ cd motion detection
$ docker build -t motion-detection:dev
$ cd ..
$ kubectl apply -f motionDetectionDeployment.yaml
- The camera information configuration is the same as face recognition
- When a moving object appears in front of the camera, the program will record the video and save the result to the local directory /data/video
$ cd crds
$ kubectl apply -f devicemodel.yaml
$ kubectl apply -f device.yaml
When the device is connected, you can view the results of the cloud device synchronization through the following command
$ kubectl get device switch -oyaml -w
$ cd zigbee2mqtt
$ docker build -t zigbee2mqtt:v1 .
$ cd ..
$ kubectl apply -f deployzigbee2mqtt.yaml
- Make sure cc2531 USB Sniffer is connected to your device and there is a directory
/dev/ttyacm0
$ cd mapper
$ docker build -t mapper:v1 .
$ kubectl apply -f deployMapper.yaml
During face recognition, the ZigBee switch will be turned on if the recognition result exists in the face database. If the result is unknown, the Zigbee switch will be turned off. The status information of the switch can be viewed through the Device Switch in the cloud.