New user question

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

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

example of displaying the preview.

with opencv, which seems to be what you want to process.

canny_demo

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