The purpose of this sample code is to notify restaurant staff members about guests in the entry area that are waiting to be seated.
Thereby, guests are detected via two Meraki MV cameras and a Meraki MT30 button sensor. The detection data is delivered via MQTT. A notification can be displayed on one or more tablets, mobile phones or screens within the restaurant.
Multiple scenarios and statuses are supported: no guests present, new guests arrived, guests have been waiting for quite some time and guests actively asked for seating.
MQTT is a Client-Server publish/subscribe messaging transport protocol. This sample code requires the setup of a locally installed or use of an online MQTT broker that gathers the data from all cameras and sensors and publish it to our sample script.
Popular MQTT brokers are for example: Mosquitto or HiveMQ.
Note: Some online MQTT brokers can involve major delays in data delivery. Delays can strongly affect the quality of this demo.
After the MQTT broker is successfully set up, some configurations in the Meraki Dashboard are required. Follow the MV Sense MQTT Instructions to configure MQTT for both cameras and MT MQTT Setup Guide to configure MQTT for the MT sensor.
Note: For demo purposes, use None as value for the field Security in both cases. Please be aware that it is recommended to use TLS in production setups. Further adaptions of this code are required for the latter.
This sample code allows to optionally narrow the camera and detection view via Meraki MV Privacy Windows and Zones. Follow the Instructions for Privacy Windows or Instructions for MV Zones to set these up.
cd [add name of virtual environment here]
git clone [add github link here]
Access the downloaded folder:
cd gve_devnet_meraki_seating_request_notifier
Install all dependencies:
pip3 install -r requirements.txt
Define the MQTT broker to use for this script. Therefore, open the app.py file and adapt the following lines 25 and 26:
app.config['MQTT_BROKER_URL'] = "[Fill in ip of locally installed MQTT broker or URL for online MQTT broker]"
app.config['MQTT_BROKER_PORT'] = [Fill in MQTT port]
Run the script by using the command:
python3 app.py
Assuming you kept the default parameters for starting the Flask application, the address to navigate would be: http://localhost:5000/settings
Fill in all settings form fields and save the changes.
Form field descriptions:
MV Camera 1/2 - Serial Number: Serial number of Meraki MV Camera
MV Camera 1/2 - Zone: Use 0 for full screen with or without privacy windows or zone ID for Camera MV zone. Zone ID available under Cameras > [Choose Camera] > Settings Tab > **Sense Tab ** > /merakimv/xxxx-xxxx-xxxx/{zone ID}.
MT30 Button - Mac Address: Mac address of Meraki MT30 sensor in format XX:XX:XX:XX:XX:XX
MT30 Button - Local ID: Local ID of Meraki button sensor - available under Sensors > MONITOR > Sensors > MQTT Broker > MQTT Topics > meraki/v1/mt/{local ID}/....
Reviewing Interval (ms): Milliseconds interval in which received MQTT MV messages are reviewed based on the timestamp of the message.
Notification Interval (ms): Time span between the first and second/escalated notification in milliseconds.
Navigate to http://localhost:5000/ to access the notification dashboard.
Enter the camera view of both cameras and optionally press the button to trigger a notification.
The dashboard supports the following scenarios and statuses:
Provided under Cisco Sample Code License, for details see LICENSE
Our code of conduct is available here
See our contributing guidelines here
Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.
You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community