RICOH THETA API Over USB Cable - (S, V, SC models)



Hi all, I’m currently running the ricoh S in interval mode plugged into a large USB battery pack, but it seems to turn off on its own randomly between 4 and 8 hours. It never runs out of battery or space for images, so I’m wondering if it’s over heating or something. It sounds like several people have had luck with longer term recording with the Pi. thanks!


There are two very good long-term usage examples with the USB API.

Photosphere by Koen Hufkens has been going for months (I think)

tlapser by Jason Charcalla has been well-tested.

I you want to have it running for months to take several hundred thousand or more pictures, note that there is a problem with unattended remote locations. The USB API does not support turning on the RICOH THETA S. Thus, if there is a power outage, you’ll have to drive to the remote location and turn the camera on. We’ve submitted this feature request to RICOH so that the camera can be used for remote surveillance and image data acquisition.

I’m surprised that the camera turns off after 4 to 8 hours when you have it plugged into the battery. Do you have a battery that is outputting 1.5 amps? You may be able to stabilize the camera by using a battery with higher amperage output. You can test this theory before you spend any money by plugging the camera into a wall charger (like your phone or tablet or kindle charger) that is capable of putting out 1.5 amps and see if the camera turns off overnight. I suspect that the battery you are using is not sufficient enough to keep the battery charged.

I’m interested to learn more about your usage.

If you go with the USB route (which is what I would do), suggest you read through the thread and consider running an earlier version if you have problems with libptp.

I did my tests with both a raspberry pi running Jessie and an Ubuntu laptop. I ran into a problem with stopping video. Another community member mentioned that they had the video stop working with Ubuntu 14.04. That’s the reason I was thinking of testing Wheezy (older version of Raspian). The raspian archive is here


thanks! I’m just trying to last through an 8 hour shift, so I don’t need to pull the images yet, but I’ll try out the Pi soon. I’m using this power pack, which has a 1A and 2A outlet. I’ll make sure I’m using the 2A output.

Right now we’re using several Ricohs in a factory to record equipment being built, but we’d also like to use it to capture events, like conferences and trade shows. It’s been pretty finicky for us, turning off sometimes even after an hour, but other times lasting 8 hours. Still haven’t figured out what the root cause is… the internal battery always has a full charge, and there’s almost always still space left. I should probably try upgrading the firmware. I’m on 1.10.0.

I had read about the inability to turn on via USB… I’m tempted to take it apart and automate the power switch :slight_smile:



i think you have to update your Firmware check this link

Regards Svendus


Agree with @svendus, you should try a firmware update


Instructions on upgrading your firmware.

The most recent version of the firmware is 01.82. See release notes.

After you upgrade the firmware, please confirm that you have disabled offDelay and sleepDelay.

Please let us know if you’re comfortable using the API, either with a Bash script, curl, Python or other language/tool.

Here’s a video I made on setting the offDelay with no coding. View on YouTube in full screen.

I have several more ideas for you to consider. For example, have you considered using live streaming to disk at 1080? This is lower resolution than the images, but it might be usable in your application. Information is here.

Let us know where you stand after the firmware upgrade and verifying that offDelay and sleepDelay are disabled (tell us the value you used).


Thanks again! I’ve got the firmware updated and am doing a test now. We do need the full resolution of the stills for most of our applications.

I’ll also test out disabling the offDelay and sleepDelay, although it seems strange that I’d get a variable performance due to a setting. But doesn’t hurt to double check. I really appreciate all the suggestions.


yes, I agree that part is bothersome. If it consistently went off after a certain amount of time, I’d feel better about us narrowing in the problem. It seems like the original idea of the power amperage could be the source of the problem.

Is it possible that the camera is dropping WiFi signal with the controller (maybe your laptop)? If the WiFi signal dropped, then the sleepDelay would kick in after 20 minutes (I think this is the default). If you’re having WiFi issues, you can try and rotate the WiFi channel of the camera with _wlanChannel. For the test, you can also put the laptop right next to the THETA S (like a foot away).

I would also try to use a Raspberry Pi with the USB API. I realize that you need to buy that part first and it’s not as clean of a physical solution, but the transfer speed over USB is great and you can power the THETA over the same USB cable.

Maybe in the best scenario, you get both working and have a few options for the people taking pictures. I’ve heard of people using both WiFi and USB APIs for timelapse over a few days.


So my last test with the 2A output and new firmware lasted about 5 hours. At that point, the Camera Status LED was blinking red, which I believe indicates a problem in the camera.

There was still plenty of space on the SD card and I believe battery left. I had it on 14s interval. Also, I disconnected the WiFi almost immediately after starting the interval.

I’m going to try a test powered off a Pi USB port and report back. I also have not tried disabling the offDelay and sleepDelay yet, but will soon.


sorry to hear about the failed test with the WiFi. If you have the option of using the USB cable, that might be good to start with. More people have it working with the USB API.

Maybe try and copy the exact configuration for photosphere since Koen has it working for months.

The only thing that isn’t in his is the version of Raspbian he’s using. I think he’s using Raspian Wheezy

Here’s a 24 shot from his project

Here’s a 12 hour time lapse with tlapser

At least you know that other people are using the camera in similar applications.

Have you tested different physical cameras and USB cables? I’m wondering if the USB cable or the connector might be a little loose.

In my initial tests with the USB API, I had a problem with the camera not responding to the API after anywhere from a couple of hours to 6 or 8 hours. The disconnect was apparently random. After several days, I isolated an intermittent problem with my USB cable. It worked sometimes, but sometimes did not. I suspect that the cable was borderline usable. Once I changed the cable, I had a stable time lapse system that could take thousands of pictures.

Hopefully, if each person contributes their own experiences, it will eventually help you trace the problem.


Thanks! It’s great to see that others have had success. I have a lot of variables to tease out… camera, usb cable, battery packs, Pi powered / controlled. When I get it working I’ll post all the details, but it will take me a bit since the tests are 8 hours.


I am trying to build a 24/7 sky monitor using the theta S and a raspberry Pi 3. However, I have had no luck yet. The camera is connected via USB and I use ptpcam to change settings like shutter speed and iso. gphoto2 is used to take pictures, download and erase them directly after each shot.

However, after a few hours the Theta freezes and becomes unresponsive with the power button flashing red. In this case the camera has to be disconnected and rebooted, in order to become responsive again.

Does anyone know, why the camera freezes and becomes unresponsive? has anyone encountered the same problem?


I encountered a problem when my USB cable was a little loose. Try a different cable. Is the air temperature where the THETA is located below freezing? Koen had a problem with the battery freezing.

Most people are using ptpcam to take pictures with the USB. Did you have problems with ptpcam?

When I used gphoto2, I had to remove the gvfs virtual filesystem. There’s a backend process that mounts gvfs, breaking the communication with the camera.

pi@raspberrypi ~ $ sudo apt remove gvfs-backends
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:

Suggest you try and use one the solutions below for Raspberry Pi. Once you get it working, then move to your custom solution.


Thanks for the response, I have already tried a different cable. I am currently just testing on my desk, where the temperature is pretty much constantly about 20°C.

As far as I can tell,I did not have any problems with ptpcam.

I have also removed the gvfs stuff.

I only running into problems, after shooting for a few hours. Sometimes after 6 hours, sometimes after 2 days the camera turns unresponsive. I have also tried a different computer.

Have you or someone else tried taking pictures continuously for more than two days straight?


Koen has it running for several months. Suggest you give his code a try. He used ptpcam, not gphoto2.

Note that I believe he used an older version of Raspian, not the latest version.

During the several month period, he’s had these issues:

  • camera will not turn on if the power goes off. (tree branch falls on power line)
  • camera battery freezes from time to time. (he has it outdoor near Harvard)

The biggest problem is that the camera can’t turn on by itself if you lose power to the Raspberry Pi.

The longest I’ve personally tested it for is one day.

I suspect, though have not verified, that there may be compatibility issues with the ptpcam libptp on the newer versions of Raspian.


Correct, my issues are cold related not heat related. My setup runs reliable at nominal temperatures (not and extremes I fear - yet to experience heat in summer).


Thanks for all this input and real-world experience. You’ve got the coolest long-term application use of the THETA. Also appreciate that you generously made your project open source.


Well it ain’t rocket science putting this together. Maintaining it is an other story. Might have a cold weather fix in today (keep taking pictures during the night to keep it warm ! ).


The picture below made me think about using the neoprene sleeve of the THETA as a form of thermal insulation. It might help retain the heat from the battery. You’d need to cut the sleeve.

Another solution would be to insert a small, flat, heater like this:

I don’t know anything about this area of hardware hacking, but there’s a bunch of stuff here:

This one in particular looks promising

Maybe this:

The cold might be a common problem for equipment used in agriculture. There might be a off-the-shelf heater to heat something like irrigation control units.


The neoprene sleeve idea is wonderful, didn’t think of the sleeve outside the context of protection. In general the resistive heating pads require a lot of power (which I’m short on). So harnessing and retaining heat seems the way to go. Or doing away with the battery all together (but that requires hacking which I will do after the start of the growing season.