hurricane/security_camera/resources/cloud_server/functions/config/firebase-config.js

// This should be copied and pasted from Firebase
//
// 1. Issue the following commands:
// cd <sdk app dir>/resources/cloud_server
// firebase apps:sdkconfig web
// 2. From the command output, copy everything between the curly brackets,
// e.g. copy all lines from `"projectId"` to `measurementId"` (inclusive).
// 3. And paste below:
exports.FIREBASE_CONFIG = {
apiKey: "AIzaSyAp9iefFb2YIcSwfq_CzIhXgPuTjm6bvmI",
authDomain: "seccam-af5fe.firebaseapp.com",
databaseURL: "https://seccam-af5fe.firebaseio.com",
projectId: "seccam-af5fe",
storageBucket: "seccam-af5fe.appspot.com",
messagingSenderId: "946499510410",
appId: "1:946499510410:web:64331e6dddc2e7056b8d73",
measurementId: "G-XVW5RLXJ43"
};
// This should be copied and pasted from Firebase.
//
// 1. Go to the remote Firebase console
// 2. Select the `Function` sidebar tab
// 3. Select the `Dashboard` tab
// 4. There should be two functions in the list:
// - `/addImage`
// - `/registerDevice`
// 5. Copy the URL of the `/addImage` function, _exluding_ the last part: `/addImage`
// e.g. If the URL is:
// https://us-central1-gecko-os-security-camera.cloudfunctions.net/addImage
// then only copy:
// https://us-central1-gecko-os-security-camera.cloudfunctions.net
//
// 6. Paste the copied URL as the value of this variable here
exports.FUNCTIONS_URL = 'https://us-central1-seccam-af5fe.cloudfunctions.net'
// This is a randomly generated token the DMS webhook must provide to add images to the database.
//
// Add this to your DMS product by doing the following:
// 1. Goto https://dms.zentri.com and log into your account
// 2. Select the 'Products' tab on the sidebar
// 3. Lookup your DMS product associated with this example app
// 4. Select the 'Connectors' tab on the product sidebar
// 5. Click the 'Create Connector' button
// 6. For the 'Title' field enter any name you like
// 7. For the 'Code' field, enter: IMAGE
// 8. For the 'Type' field, select: Webhook
// 9. For the 'Endpoint' field, select: REST
// 10. For the 'URL (POST)' field, add the 'addImage' cloud function URL
// Goto to the firebase console for your firebase app, select the 'Functions' sidebar
// In the 'Dashboard' tab, you should see a list of functions, the 'addImage' function should be the first in the list
// NOTE: This is the same value a exports.FUNCTIONS_URL below
// 11. Check the 'Headers' checkbox
// 12. For the 'Key' field, enter: Authorization
// 13. For the 'Value' field, enter the value of exports.DMS_WEBHOOK_AUTH_TOKEN below
// NOTE: You should re-generate this value, see https://www.uuidgenerator.net/version4
// 14. Click the 'Save' button
exports.DMS_WEBHOOK_AUTH_TOKEN = '262bcb82-8942-4c2c-9c52-41eb2c1b3f43'
// This is the maximum number of images to store per device
// NOTE: If using the 'Free Tier' then this number needs to be
// fairly small otherwise you'll quickly exceed the database 'reads' quota of 50K/day
exports.MAX_STORED_IMAGES = 100