Camera as a sensor
-
Hi all,
Another question that might have been answered elsewhere but I couldn;t find the answer. There are 3 cameras in the shop but no project that uses them. question is, is it even possible to use a sensor as a security camera? Again, I know next to nothing about realtime programming. can the mysensor protocol support that? nothing fancy like a streaming video - just a photo every now and then triggered by motion sensors
-
I'm not sure the images can be processed on the node itself (using the low-end ATMegas). But you could probably take a picture and store it on a SSD when movement is detected by a motion sensor.
The cameras was added mostly for fun wishing someone would play with them and come up with something useful
-
assuming an rpi will act as the sensor backend, would it be possible to send it on the rf module and the current mysensors protocol? this would definitely bring the price and power consumption up but can still be an interesting idea IMHO.
-
Definitely possible (we're transmitting firmware updates today) but it would require some programming to chop up the images and send them pice by pice. There is no functionality in the library that does this automatically.
We're using the command type STREAM for firmware data today. Would probably be good to use that for images as well.
-
@Moshe-Livne what you want to trigger on mysensors side? motion event or sending picture?
most of IP cameras are able to send pictures by themselves, you do not need mysensors for this
but you can integrate camera with my sensors to trigger motion event like PIR sensor can domotion event is definitely supported by mysensors
you need to look at camera integration possibilities to see how you can integrate
the possible scenarios:- camera is configured to upload pictures to FTP at motion event, do setup of FTP server on RPI or even arduino to initiate mysensors event on any upload. Or you can connect many cameras and can differentiate by their IP
- camera is configured to send email using SMTP - do similar as for FTP
- camera has a special API to report motion events. Integrate it according to API
- camera has a wired output of a motion event. connect regular mysensors sensor to it
-
@axillent I was asking about the tiny camera modules that appear in the mysensors store. good and reliable IP cameras are not cheap and they are (sometimes) very awkward to set up and integrate with your wifi (and I actually don't like it so much that my WLAN password reside on a device outside my house). My dream sensor would be a cheap motion event with a photo as a doorbell, for example using the VGA camera you would end up (if rpi is not needed) with a 15$ device.. I am million miles from doing anything like that, was hoping that someone else already done that....
-
@Moshe-Livne IP cameras are starting from $50. they have a processor able to process images at a good speed for you to trigger a motion event in a second after real motion starts. Using camera module you will have to do the same - processing images one by one to detect changes and this will trigger event. You will need at least a RAM to store a series of images at your camera resolution. RPI should be sufficient for this, but the cost of RPI + wifi + camear module + power supply is becoming higher comparing to IP camera.
regarding security. many modern routers allows to setup isolated WIFI spot with separate password
-
this one could be sufficient indoor http://foscam.us/products/foscam-fi8918w-white-wireless-ip-camera-21.html
and this outdoor http://foscam.us/outdoor-cameras/fi9803p-plug-play-1-0-megapixel-1280x720p-h-264-outdoor-wireless-ip-camera.html
-
@axillent i was thinking using PIR for detecting motion, snapping a shot and sending it. you are right about the ram - i would need sd card reader probably
-
@Moshe-Livne said:
@axillent i was thinking using PIR for detecting motion, snapping a shot and sending it. you are right about the ram - i would need sd card reader probably
PIR? it is something different. You need a clear view on what you want. From you first post I realized that you want to detect motion by analyzing camera output etc by analyzing images. Using PIR is very different
-
@axillent I live in NZ.... 45$ shipping....
-
@Moshe-Livne said:
@axillent I live in NZ.... 45$ shipping....
there are many foscam clones shipping free from China starting at $50
-
@axillent no, no.... as I said, i want to use it as cheap entrance device. PIR is good enough to trigger the response
-
@axillent I have one of these, skyeyes. It is not foscam replica, just looks like it. has no snapshot url so completely useless. annoying....
-
@Moshe-Livne said:
@axillent no, no.... as I said, i want to use it as cheap entrance device. PIR is good enough to trigger the response
can you explain exactly what do you want?
PIR is triggering event and someone is taking picture at this moment?
-
@axillent yes. just a door or hall sensor that will be triggered by the PIR, take a snapshot (or maybe several in 10 sec increment) and send them to the home automation system.
-
@Moshe-Livne said:
@axillent yes. just a door or hall sensor that will be triggered by the PIR, take a snapshot (or maybe several in 10 sec increment) and send them to the home automation system.
OK, I see. Do you want both PIR and camera module been connected to the same device? If yes this could have not much todo with mysensors. It can be regular arduino or rpi sketch sending pictures by FTP or email.
If you want to have PIR on other device you can use mysensor to sens PIR and trigger other device to take pictures using mysensors radio
-
I have one (soon two) RPi with camera modules that take pictures and store / send to Pushbullet when a certain MySensors PIR is triggered. Has worked pretty well for the past year. and a Pi + Camera is still reasonably cheap plus it's a "real" computer so it can do anything with the camera and images. And the Pi camera is still pretty good, unless you happen to get a real bad clone from Ebay or something. Hardly worth it. I don't know how good these cameras in the store are, but I doubt they come anywhere near the simplicity and guaranteed quality of the Pi camera module.
If you like, you can also use the "motion" package on the Pi, but that will be a real hassle with false triggers and all. The cheap PIR motion sensors have worked surprisingly well. It's more a question of positioning them right so you don't have problems with sunlight, fireworks, curious magpies etc.
I have my RPi inside camera housings I got from AliExpress. There are a couple there that are pretty good. I think finding a bracket can be more of a challenge. I have J-brackets that fit under the eaves.
I have the raspimjpeg script running on the Pi btw. You could just use raspistill I suppose but it's nice to be able to manually view the camera feed from the browser and have remote control at your fingertips. Hell, you could even get one of those motorized RPi things that are able to turn the camera.
I have a sort of Power Over Ethernet going for my cameras btw.
-
@bjornhallberg That is a very cool setup although i suspect its not very economical. the pi+camera would cost ~80$ i think. plus casing and bracket would get you very close to foscam if not higher. I was aiming at cheapest possible solution. maybe even one that can run on battery.
-
http://www.aliexpress.com/item/LYNEW-Portable-Mini-Wireless-wifi-Router-3G-4G-Hotspot-Wifi-Hotspot-support-3G-USB-modems/32257312139.html
Today there are openwrt enable modules on aliexpress that start from below 8$ that can be attached to mjpg usb camera and can take pictures and streams with less than 10$ price tag.
-
@Mickey this device is a gsm hotspot generator. it connects to a USB GSM dongle and allows you to connect to it either wired or wirelessly. I have never seen devices like the ones you mention. they could be a good solution
-
@Moshe-Livne said:
@Mickey this device is a gsm hotspot generator. it connects to a USB GSM dongle and allows you to connect to it either wired or wirelessly. I have never seen devices like the ones you mention. they could be a good solution
do not stick to it's original application
the idea is that open-wrt can run on this small things. Open-wrt is a linux type system, you can program it very similar to RPI
it is very cool if any camera working example exists for open-wrt
-
@bjornhallberg very nice setup! my congratulations!
for DIY you did it pretty well
but cost vise I do not see how this can be more efficient comparing to foscam
-
@axillent Oh, still not used to thinking this way. This is beyond the (very limited) limits of my knowledge.... can be great.... total setup fee of ~15$
-
@Moshe-Livne said:
@axillent Oh, still not used to thinking this way. This is beyond the (very limited) limits of my knowledge.... can be great.... total setup fee of ~15$
I have an example of this just with tl-wr703n but the one I posted from aliexpress is just the same:
openwrt webcam
-
@Mickey very good and detailed article. I have several of the GSM modems (that I now understand are not GSM modems at all) somewhere so i'll see if they can be flashed with openwrt. should be fuuuunnnn.
-
@Moshe-Livne said:
@Mickey very good and detailed article. I have several of the GSM modems (that I now understand are not GSM modems at all) somewhere so i'll see if they can be flashed with openwrt. should be fuuuunnnn.
Notice that the one I posted from aliexpress have its own procedure to flash openwrt on. Be careful not to brick your module...
-
Yeah, it is perhaps not the most economical solution. Probably closer to $100 per unit. Foscams have probably become better and cheaper since last I looked. Personally I'd rather have more control over my setup. Like how the housing is ventilated. Plus all the fun of building and figuring things out. Of course I don't get night vision, but I figured it is better to trigger a relay to turn on some floodlights or whatnot that will give intruders some warning. No use being sneaky about it.
But yes, it would be really interesting if someone could come up with a really cheap battery powered solution.
-
@bjornhallberg said:
Yeah, it is perhaps not the most economical solution. Probably closer to $100 per unit. Foscams have probably become better and cheaper since last I looked. Personally I'd rather have more control over my setup. Like how the housing is ventilated. Plus all the fun of building and figuring things out. Of course I don't get night vision, but I figured it is better to trigger a relay to turn on some floodlights or whatnot that will give intruders some warning. No use being sneaky about it.
But yes, it would be really interesting if someone could come up with a really cheap battery powered solution.
openwrt as battery powered solution wont last much but they can be attach to cheap 5v solar pannel by day and run on lipo by night so no need for external power source. also
Its possible to install Motion on thoes modules and have state of the art motion sensors.
-
@Mickey how quickly do they boot up? might boot it when pir is triggered.
-
@Moshe-Livne said:
@Mickey how quickly do they boot up? might boot it when pir is triggered.
I thought about it but openwrt is a full linux and it takes 15-20 seconds to boot up so it will be half a minute delay between trigger and response
-
Speaking of battery powered cameras, there already are commercial products such as Arlo and Homeboy:
http://www.cnet.com/products/netgear-arlo-smart-home-security-kit/
http://www.cnet.com/products/homeboy/
Not cheap enough, and battery times will surely vary depending on use, but they are a nice proof of concept.
-
@Mickey they are so small!!!!
-
-
the tiny 3g routers from aliexpress. just got one. do you happen to have the openwrt firmware pre-compiled?
-
which one exactly did you buy?
-
@Mickey http://www.aliexpress.com/item/LYNEW-Portable-Mini-Wireless-wifi-Router-3G-4G-Hotspot-Wifi-Hotspot-support-3G-USB-modems/32257312139.html
-
@Moshe-Livne said:
@Mickey http://www.aliexpress.com/item/LYNEW-Portable-Mini-Wireless-wifi-Router-3G-4G-Hotspot-Wifi-Hotspot-support-3G-USB-modems/32257312139.html
start from here:
http://wiki.openwrt.org/toh/unbranded/a5-v11
-
Been there.... just wasn't keen on compiling it. Oh well.
-
This post is deleted!
-
@Moshe-Livne said:
Been there.... just wasn't keen on compiling it. Oh well.
https://github.com/sternlabs/RT5350F-cheap-router/tree/master/openwrt
https://www.digitalinferno.com/wiki/Wiki.jsp?page=Mini3G4GUSBRouterOpenWrtExternalUSB
-
@Mickey Thanks. will give it a try!