6 ms·
Show HN: HTML5 webcam pics to email with motion detection
- pixeltwenty 9y agoThe motion detection takes place in the browser with JavaScript which analyzes and quantifies RGB value differences. HTML5 takes care of the camera. An email server is still required - HTML5 doesn't cover that of course. This works with up-to-date Firefox, Chrome, Edge, and Opera browsers on Windows, Mac, and Android (the OS specific browsers running as applicable on various platforms). I am currently aware of just Safari and iOS on iPhone/iPad not working - the camera view shows all black and I have not yet attempted to solve.
- blacksmith_tb 9y agoWhat if js could handle sending email via Mailgun, Sendgrid etc.? Then it could be self-hosted (though you may not want it to be, of course).
- pixeltwenty 9y agoThanks for the ideas. One thing I have wrestled with in the past is how to prevent exposing the third party site email credentials (credentials the page would utilize for accessing Sendgrid, etc.) if the emailing code were hosted in the local and observable JavaScript. With the current server solution, at a minimum the browser and CORS enforcement take care of attempted cross domain access ... which is probably just slightly better than nothing at all.
- j_s 9y agoLet end users provide their own third party site email credentials.
- pixeltwenty 9y agoI like that idea. It could be an alternative, an additional option.
- randomString1 9y agoYou could use something that is not e-mail. From uploading the images to a shared/cloud folder and/or a messenging protocol to notify you.
- DougWebb 9y agoIt might be useful to get it running on headless Chrome, so it can run completely server-side. There's probably better ways to do that, but it could be fun.
- untog 9y agoI've not used it, but there's a node-webcam module: https://www.npmjs.com/package/node-webcam https://www.npmjs.com/package/node-webcam That you could presumably pair with node-canvas (or something similar) to achieve the same results without a browser needing to be involved.
- chad_prescott 9y agohave fun creeps
- deleted 9y ago[deleted]
- seanalltogether 9y agoBe careful with exposing an open sendmail feature on your website. If it gets highjacked to send spam your domain could get blacklisted by google, yahoo, etc.
- bhhaskin 9y agoSendmail is pretty much blocked everywhere anyways.
- brandon272 9y agoSomewhat unrelated, but on the topic of detecting motion, I have a Nest Outdoor camera and subscribe to Nest's "Nest Aware" service for $10 a month, which enables me to save a week's worth of video and also is supposed to give me "intelligent" alerts when motion is detected, and is supposed to use "advanced cloud algorithms" to let me know when important things are happening and whether or not I should be notified. I'm honestly really disappointed in it because 99% of the alerts I get from this camera are false alarms. The most frequent offender is light from passing vehicles. It is worse when it has rained and the reflection of headlights can be seen in the "zone" I have set up to send me alerts. You would think Google would be able to drop false alarms down to nothing for the common things like everyday street traffic, but apparently not. They also have a weird rule where you can only get 1 notification within a 30 minute window. So if I take my garbage outside and the camera sees me, it will send an alert. If an axe murderer comes onto the property 20 minutes after that, the camera won't alert me.
- bufferout 9y agoMobitix cameras have a high level of customisability in regards to motion detection. High end but worth it.
- ravenstine 9y ago> They also have a weird rule where you can only get 1 notification within a 30 minute window. So if I take my garbage outside and the camera sees me, it will send an alert. If an axe murderer comes onto the property 20 minutes after that, the camera won't alert me. So a burglar can shine a laser pointer into the lens from a far distance and disable the camera from recording them? Wow. My parents have a Ring with motion alerts and it's constantly getting set off by reflections, moths, birds, etc. This is a device that also has a supposed "Smart Alert algorithm", but it seems little better than basic statistical detection.
- pavel_lishin 9y agoIt sounds like it doesn't disable the recording, but disables the alert. Which can still be abused, but isn't as bad as what you describe.
- phyrex 9y agoThis is great! Any chance you can open source this?