grechut / watchdog Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
We should either remove it (also good option) or update it from time to time. If we decide to keep it, we could use e.g. https://www.npmjs.com/package/react-timeago.
Sometimes after refreshing or joining device, error Cannot signal after peer is destroyed
is thrown.
Stored in the devices
collection. Simple adjustment of detectors params. Also, turning them on/off.
It's mostly done, but needs to be finished both on the client (responding to push notification) and server (actually sending them to GCM).
Currently when new listener subscribes, the count of listeners on the camera / device owner / whatever we call it page is not updated and shows 0 until the page is reloaded.
If going to link /devices/:device_id/device
while not being the owner, the redirection to Device
(listener) is not working properly. It routes to the DeviceOwner
page.
Probably issue in https://github.com/grechut/watchdog/blob/master/app/routes.jsx#L72
To be debugged.
We could subscribe to devices in general or to a specific detector on this device (e.g. /devices/:device-id
or /devices/:device-id/:detector
). This way we can send only one notification and FCM will send it to all subscribed devices.
This info needs to be stored in both FCM and Firebase db, so that we can show state of each subscription.
More info how to subscribe a device to a topic: https://developers.google.com/instance-id/reference/server#create_relationship_maps_for_app_instances (Instance ID is the token we get from Firebase on the client).
I'm not really sure how it works in practice, but we can try to use collapse_key
to collapse similar messages. We could use device ID for that, or a combination of device ID and notification code (motion_started
etc.).
server.js
(also improve/drop HMR)The motion detection works pretty slow and causes video to pause quite often. We could try out using web worker, send an image to it and perform the detection there.
We can switch to Firebase Cloud Functions instead of maintaining separate server.
Details: https://firebase.googleblog.com/2017/03/introducing-cloud-functions-for-firebase.html
When camera goes offline and then online again, the listener is not automatically reconnected and sees a black screen, even though it knows that the camera is online again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.