Webcam Dropbox Uploader - a plugin to store images to dropbox

I don’t have a foscam camera, soI don’t know what happens when it detects motion. If the vera knows about it happening though, you can easily write a couple of lines of lua to send the image to dropbox as an automated task. See previous posts for details of how to send an image.

Martin

I unfortunately do not know how to write lua

Sent from my iPhone using Tapatalk

In Automation, click on New Scene. Pick whatever you want to trigger the scene in triggers, e.g. your camera detecting something. In the LUUP tab, paste the following, swapping in the numbers of your webcam and the dropbox uploader. Click on Confirm Changes, then Save.

Martin

lul_settings={}
lul_settings[“webcamNumber”]=number of your webcam device
luup.call_action(“urn:milliesoft-com:serviceId:WebcamDropboxUploader1”,“SendSnapshot”, lul_settings,number of your dropbox uploader device)

[quote=“martin12345, post:83, topic:176879”]In Automation, click on New Scene. Pick whatever you want to trigger the scene in triggers, e.g. your camera detecting something. In the LUUP tab, paste the following, swapping in the numbers of your webcam and the dropbox uploader. Click on Confirm Changes, then Save.

Martin

lul_settings={}
lul_settings[“webcamNumber”]=number of your webcam device
luup.call_action(“urn:milliesoft-com:serviceId:WebcamDropboxUploader1”,“SendSnapshot”, lul_settings,number of your dropbox uploader device)[/quote]

Martin,

I didnt see this until now. Thanks for the code. A few questions. I have to change both the device number e.g. 41 and the urn for that device correct?

In the scene the camera have a red label over them so I cannot use them to trigger anything, so if I am reading this write your code will allow me to specify the motion sensor in my network to trigger a picture and then upload to dropbox?

Can this be done for video as well?

[quote=“Bboy486, post:84, topic:176879”]Martin,

I didnt see this until now. Thanks for the code. A few questions. I have to change both the device number e.g. 41 and the urn for that device correct?

In the scene the camera have a red label over them so I cannot use them to trigger anything, so if I am reading this write your code will allow me to specify the motion sensor in my network to trigger a picture and then upload to dropbox?

Can this be done for video as well?[/quote]
You need to change the two things in italics - the device number of your webcam, and the device number of the dropbox uploader. You don’t change the urn.
Yes, if you have a motion sensor, use that as the trigger.
No, this can’t be done for video, but you can call the last line multiple times to capture a number of snapshots.

Martin,

Thanks a million! It works (I am sure you know). I did notice that even though I set one camera to trigger on a motion sensor all three of my camera are taking photos. Not a bad thing I guess since it is cleaner than doing is separately. I assume this is due to the Webcam Uploader because I did set the correct webcam number in your lua script. I figured your script was only envoking the camera Id I spec’ed out.

Is it correct that once I add the code into LUUP tab i will not be able to see it again when I edit the scene?

Awesome plugin! Glad I ran across this thread!

So after a few test it looks like my setup is still not working.

When my motion sensors is tripped the cameras are not taking a photo.

I used the option within the cameras settings but the motion is not triggering the snapshot.

The cameras only seem to be taking the photos when I view the camera from Vera or edit the camera

I am pretty stumped on what is preventing the motion sensors from triggering.

Can anyone give me some guidance?

I have a problem with Webcam dropbox uploader startup lua failed. I have migrated from a Vera lite to a Vera 3 via a backup. Everything so far working fine. But i have this error, and am not sure how to get rid of it. I found this in the log:

01 01/03/14 21:23:40.525 LuaInterface::CallFunction_Startup-1 device 326 function lug_startup failed [string “-------------------------------------------…”]:366: Unexpected character at Line 1 character 164: ] (93) when reading array ({ or [ or ’ or " or number or boolean or null expected)
Context:
": “app_folder”, “contents”: [], “icon”: “folder”}
^ <0x2b637680>
01 01/03/14 21:23:40.525 LuImplementation::StartLua running startup code for 326 I_WebcamDropboxUploader1.xml failed <0x2b637680>

[quote=“mikee123, post:89, topic:176879”]I have a problem with Webcam dropbox uploader startup lua failed. I have migrated from a Vera lite to a Vera 3 via a backup. Everything so far working fine. But i have this error, and am not sure how to get rid of it. I found this in the log:

01 01/03/14 21:23:40.525 LuaInterface::CallFunction_Startup-1 device 326 function lug_startup failed [string “-------------------------------------------…”]:366: Unexpected character at Line 1 character 164: ] (93) when reading array ({ or [ or ’ or " or number or boolean or null expected)
Context:
": “app_folder”, “contents”: [], “icon”: “folder”}
^ <0x2b637680>
01 01/03/14 21:23:40.525 LuImplementation::StartLua running startup code for 326 I_WebcamDropboxUploader1.xml failed <0x2b637680>[/quote]
Try uninstalling and re-installing the plugin - looks like the restore may have corrupted the code.

Martin

@martin12345

Thanks, yes that worked. I was hoping to avoid a uninstall / reinstall, but it wasnt as difficult as i thought. All up and running again.

It was working for about 1 hour, now i have the Lua startup failure again. But only for the first device. I have installed another plugin for my second camera. I have 2 cameras, and i have 2 different scenes for them to upload, so i created a second plugin device to handle the second camera. Maybe i did not need another one ? I am not sure if i had 2 previously, or if i only had one. Looking at my luup code it looks as i i might have had 2 originally.

Can you share your scene? Including any Lua code and why you used the code?

for loopNumber= 1, 4, 1 do
lul_settings={}
lul_settings[“webcamNumber”]=214
luup.call_action(“urn:milliesoft-com:serviceId:WebcamDropboxUploader1”,“SendSnapshot”, lul_settings,356)
end

This is the first scene, which i activate on an armed sensor, the camera is device 214, the dropbox plugin device is 356

The second scene, again when an armed sensor is triggered the scene is run

luup.call_action(“urn:intvelt-com:serviceId:HWPush1”, “SendMessage”, {Msg = “Patio door has been opened”}, 299)

lul_settings={}
lul_settings[“webcamNumber”]=153
for loopNumber= 1, 40, 1 do
luup.call_action(“urn:milliesoft-com:serviceId:WebcamDropboxUploader1”,“SendSnapshot”, lul_settings,357)
end

The webcam being device 153, the second dropbox plugin device 357

I am not sure if i really need 2 different dropbox devices

Do you have two Dropbox accounts? Otherwise why do you need two web Dropbox uploader devices?

Sent from my iPhone using Tapatalk

No they are for the same account. I’ll delete the one which is causing the error message and see what happens.

Right but you have two different device IDs for the uploader

Sent from my iPhone using Tapatalk

The uploader can upload from as many webcams as you want - it isn’t tied to a single webcam, just to a single dropbox account. I’m not sure what funky things will happen if you have two of them. Bboy486 is definitely right that you only want one of them.

Martin

I have deleted one of the dropbox devices and changed the corresponding device id in the scene to that of the remaining dropbox uploader device, so both scenes use the same and only device. No errors so far. And the more i think about it on my old system when everything was working i am sure i only had one. Dont know why i thought i needed two…

I still can’t get motion to trip camera (any motion device) and then upload to Dropbox. I am stumped.

Sent from my iPhone using Tapatalk