[INTERMITTENT] Theta shows online, but can't send requests to API

Hi all,

I have 2 Ricoh Theta X’s that seem to randomly go ‘offline’. I put offline in quotes, because I can still ping them. It’s like the camera is still network connected but the API service has crashed. My requests just hang.

I am in client mode. The API seems to work for about 7ish hours then quits out.

Has anyone else experienced this? It’s causing me a lot of issues. There is no timeout of any sorts. The request will just hang. This is with the Python requests library as well as curl commands. The digest auth is definitely correct.

Here’s some info about one of the cameras:

{
    "api": [
        "/osc/info",
        "/osc/state",
        "/osc/checkForUpdates",
        "/osc/commands/execute",
        "/osc/commands/status"
    ],
    "apiLevel": [
        2
    ],
    "_bluetoothMacAddress": "[HIDDEN]",
    "endpoints": {
        "httpPort": 80,
        "httpUpdatesPort": 80
    },
    "firmwareVersion": "2.51.0",
    "gps": true,
    "gyro": true,
    "manufacturer": "Ricoh Company, Ltd.",
    "model": "RICOH THETA X",
    "serialNumber": "[HIDDEN]",
    "supportUrl": "https://theta360.com/en/support/",
    "uptime": 2638,
    "_wlanMacAddress": " -"
}

Are you using WiFi? If so, try use the 5GHz. I’ve had problems in the past with the 2.4Ghz dropping due to WiFi interference, the losing API access when the network reconnected. If you have a permanent install, you may want to consider IP over Ethernet or the USB API.

When the camera becomes unresponsive, is there anything in /osc/state for the errors?

theta-api-specs/theta-web-api-v2.1/protocols/state.md at main · ricohapi/theta-api-specs · GitHub


If you use AP mode, does the problem still occur?

In Client Mode, the router may introduce new conditions. If you can isolate the problem with AP mode, it would help.

Hi Craig, sorry for the late reply.

So it seems that there were multiple factors at play. Will post this update for anyone that may encounter these issues in the future:

Firstly, Craig was spot on, and after doing some light analysis via our networking tools, interference seemed to be the culprit for many of the times this has occurred. 5GHz seems to eliminate the problem.

Now for the edge case.

We found that if the lower settings menu is open (the one where white balance and ISO can be adjusted), sending certain requests (get state, and take picture I believe) to the API will cause it to totally lock up. The only remedy to this was to restart the camera. I’m not sure if this issue is due to a firmware update. Regardless, we were able to use the _cameraControlSource command to essentially prevent the option of accidentally opening that menu. It’s not perfect, but will work for our use-case.

2 Likes

@lamslo thank you for this additional information.

I’ll add this to the agenda we have with RICOH to report on community feedback.

If you have a single camera connected to a nearby laptop, you may want to use Ethernet.

If you have multiple camera connected in a room, you may still be able to use Ethernet.

However, if the WiFi meets your requirement, then maybe it will just work.

@jcasman this would be a good test to assign our intern for the edge case of the menu coming up and causing the camera to lock. Though, I think we’re assigning her something else tomorrow.


update evening of Aug 5,

The official mobile app sets the camera control to the API prior to taking a picture. Thus, the lower menu does not impact the official mobile app.

I also tried with Insomnia and could not replicate the error with the dropped WiFi or camera locking up.

Camera

  • THETA X firmware 2.51.0.
  • tested with EV, WB, Option menu open (swipe from bottom and small menu appears)
  • tested with menu swiping from top open

APIs Tested

  • info
  • state
  • takePicture

results

Could not replicate

other

I have seen the locking behavior described before, but I couldn’t replicate it today. I have not seen a connection between the online menus and the API locking behavior yet.