I wanted to store my webcam images periodically (like I used to be able to do with my Vera 2), so I wrote a plugin to send the images to Dropbox. After you link the app to your dropbox account, it will by default send images from all Cameras to dropbox every 10 minutes. You can change the frequency that it uploads, and you can change the length of time that images are stored in dropbox before they are removed. You can also make service calls to send images from one or all of the cameras at any time, so you can integrate it in to more complex scenes. The plugin is now in the app store, so feel free to give it a go and let me know how it works for you;
http://apps.mios.com/plugin.php?id=8741
Martin
Update 19/10/2015 : The URL for instructions had to change. You can find it here now;
[url=http://www.milliesoft.co.uk/2013/09/10/dropbox-webcam-uploader/]http://www.milliesoft.co.uk/2013/09/10/dropbox-webcam-uploader/[/url]
Hello !
I have 5 cameras and is working fine for 3…2 are foscam and 1 panasonic.
but 2 foscam cameras the picture saved has only 1Kbyte and not open…the anothers has between 25 and 32 kbytes and are ok.
what can be wrong ?
thanks for good plug in…
The image URL for the webcam is built up as
http://{user}:{pass}@{ip}{URL}
or if there is no username and password just
http://{ip}{URL}
If your webcams don’t work with those exact URLs (e.g. you don’t have a slash at the end of ip or start of URL), perhaps that is the problem. Do let me know if that is the case.
Martin
are you taking the user and password from settings in the camera ?
the cameras what not works has for image the url:
/snapshot.cgi
equal the anothers are runnning.
The one you set against the webcam in the username and password field.
the cameras are with the settings ok, user, password, url, mac address and ip.
and being displayed in my apps (homewave, sqremote, etc.)
Did you try building the URL as described and seeing if it works?
If it does, try running the uploader for one failing webcam in isolation to see if the issue is to do with too many requests close to each other;
lul_settings={}
lul_settings["webcamNumber"]=YYY
luup.call_action("urn:milliesoft-com:serviceId:WebcamDropboxUploader1","SendSnapshot", lul_settings,XXX)
replacing XXX with the number of your Webcam Dropbox Uploader device, and YYY with the number of your webcam. You can paste that in Apps → Develop Apps → Test Luup Code (lua) to quickly run it.
Martin
with the code same behavior. picture with 1K and not open.
Did you try building the URL as described and seeing if it works?
I put this code:
lul_settings={}
lul_settings[“webcamNumber”]=50
luup.call_action(“urn:milliesoft-com:serviceId:WebcamDropboxUploader1”,“SendSnapshot”, lul_settings,153)
50 is my cam
153 is my plugin.
Thanks. I was referring to a step earlier than that though. The URL used for the webcam is as follows;
http://{user}:{pass}@{ip}{URL}
Did you try putting the exact values from your device in there and paste the URL in to a browser? If it doesn’t work, I may not be doing everything right with the way I build the URL.
Great plugin idea - I got it all going, authorized, etc and an image was successfully uploaded to Dropbox. I had to restart the LUUP engine for something else I was messing around with. At that point, the DropBox plugin then failed to start up. Checked the log and found this:
01 09/14/13 10:58:25.215 LuaInterface::CallFunction_Startup-1 device 87 function lug_startup failed /usr/lib/lua/socket/http.lua:116: bad argument #2 to 'connect' (number expected, got string) <0x2b963680>
01 09/14/13 10:58:25.216 LuImplementation::StartLua running startup code for 87 I_WebcamDropboxUploader1.xml failed <0x2b963680>
Interestingly - even though it says the start up failed, it does in fact upload an image at this point successfully but none there after. If I force it to do an upload, I get a “not ready” in the log and no image is uploaded.
08 09/14/13 11:28:19.703 JobHandler_LuaUPnP::HandleActionRequest device: 87 service: urn:milliesoft-com:serviceId:WebcamDropboxUploader1 action: SendAllSnapshots <0x30014680>
02 09/14/13 11:28:19.704 Device_LuaUPnP::HandleActionRequest 87 not ready 0xc823c8 <0x30014680>
I would have looked through the code but I think it’s encrypted? Second number may be the port number?
Yes, the code is encrypted because it contains an app key and app key secret for connecting to dropbox. However, you can see the code without those values in them here;
http://forum.micasaverde.com/index.php/topic,16477.0.html
As for your error, the error message implies a problem making an http connection, which it does to pull the image from the webcam. If it works once, it should continue to work though.
Did you actually save the uploader settings before you restarted the engine? In advanced settings You should have AccessToken and AccessTokenSecret with string values, and optionally SendFrequency and DaysToKeep with numeric values. If you have anything other than numbers in the last two, that could cause a problem.
If worst comes to worst, uninstall and reinstall it.
Martin
This is a fantastic App. Thank you!! I’ve loaded it into my UI5, and I’ve gotten it hooked up to my DropBox, and its uploading files. But the files are 1K and they do not open. The Viewer says the files may be damaged or unsupported.
My camera is a FosCam that I bought from the MiCasaVerde site.
I’m also trying to get a Generic IP dome camera connected. so I’ll want those stills to be uploaded to drop box as well.
Help?
thanks again!!
After installing and configuring I get a LUA startup error:
1 09/14/13 21:20:21.398 ctrl_chr[31;1mLuaInterface::CallFunction_Startup-1 device 259 function lug_startup failed /usr/lib/lua/socket/http.lua:116: bad argument #2 to ‘connect’ (number expected, got string)ctrl_chr[0m LEAK this:8192 start:671744 to 0x1475000 <0x2c09d680>
[quote=“melberg65, post:14, topic:176879”]This is a fantastic App. Thank you!! I’ve loaded it into my UI5, and I’ve gotten it hooked up to my DropBox, and its uploading files. But the files are 1K and they do not open. The Viewer says the files may be damaged or unsupported.
My camera is a FosCam that I bought from the MiCasaVerde site.
I’m also trying to get a Generic IP dome camera connected. so I’ll want those stills to be uploaded to drop box as well.
Help?
thanks again!![/quote]
I am beginning to suspect that some of the cameras may behave differently to mine, so I have submitted a new version which gets the images in a different way. As soon as MCV approve it, you should get the new version which will hopefully solve this issue.
Martin
You did save your settings didn’t you? Can you look in the logs to see what error?
See above, just changed my post
That looks like the same error that a-lurker got. I really wish the log put line numbers for the exceptions, but they don’t. Anyway, hopefully the new version will resolve that.
Martin
Can you addth files, so i can test them?