alexng
April 21, 2025, 7:21pm
1
Hello,
I am totally new user and just got the z1. I am excited to build application.
I have a wifi router and the z1 is connecting it with IP assigned (192.168.0.100, check from router admin page) then i want to access the zi using Python,
import requests
from requests.auth import HTTPDigestAuth
import cv2
import numpy as np
url = 'http://192.168.0.100/osc/commands/execute'
username = "THETAYNxxxxxxx.OSC"
password = "xxxxx"
payload = {
"name": "camera.getLivePreview"
}
headers = {
"Content-Type": "application/json;charset=utf-8"
}
response = requests.post(url, auth=HTTPDigestAuth(username, password), json=payload, headers=headers, stream=True)
if response.status_code == 200:
print("connection ok")
else:
print("fail")
but keep failed. any idea?
Alex
alexng
April 22, 2025, 1:31am
2
HI,
Oh sorry finally I found that in order to access , it requires login/pass and the login is “THETAYNxxxxxxx” (without.OSC) now I can access now!
Thanks and amazing product with great support here!
Alex
2 Likes
craig
April 22, 2025, 4:57pm
3
example of displaying the preview.
Python script example of using livePreview to get an equirectangular stream from RICOH THETA cameras over WiFi
with opencv, which seems to be what you want to process.
The X will work over Ethernet. The Z1 will not.
Both will work over USB.
Most people use USB with OpenCV.
The motionjpeg will work, but you may eventually get buffering over wifi.
See this document
[image]
Tested using Ubuntu 20.04 or 22.04
git clone https://github.com/ricohapi/libuvc-theta.git
sudo apt install libjpeg-dev
cd libuvc-theta
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
git clone https://github.com/ricohapi/libuvc-theta-sample.git
cd libuvc-theta-sample/gst
make
# THETA must be plugged into your computer and in
# live streaming mode
$ ./gst_viewer
If the build fails, you may need a few gstreamer packages. The command below installs everything. You do no…