forked from vladpen/cams
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_camera.sh
More file actions
executable file
·50 lines (40 loc) · 1.31 KB
/
setup_camera.sh
File metadata and controls
executable file
·50 lines (40 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
echo "Setting up Thingino camera in the app..."
# Launch the app
adb shell am start -n com.vladpen.cams/.MainActivity
sleep 3
# Tap the "ADD CAMERA" button (center coordinates from UI dump: bounds="[405,997][675,1117]")
echo "Tapping ADD CAMERA button..."
adb shell input tap 540 1057
sleep 2
# Enter camera name
echo "Entering camera name..."
adb shell input text "Thingino%sCamera"
sleep 1
# Tab to next field and enter RTSP URL
echo "Entering RTSP URL..."
adb shell input keyevent 61
sleep 1
adb shell input text "rtsp://thingino:AjVHVSUPOoZQkGG2U@10.0.0.51:554/ch0"
sleep 1
# Scroll down to find ONVIF fields
echo "Scrolling to ONVIF fields..."
adb shell input swipe 500 1500 500 800
sleep 1
# Enter ONVIF service URL with credentials
echo "Entering ONVIF URL..."
adb shell input keyevent 61
adb shell input keyevent 61
sleep 1
adb shell input text "onvif://thingino:AjVHVSUPOoZQkGG2U@10.0.0.51:80/onvif/device_service
sleep 1
# Save the configuration
echo "Saving configuration..."
adb shell input keyevent 4 # Back key to save
sleep 2
# Tap on the newly created camera to open video
echo "Opening video stream..."
adb shell input tap 540 300 # Tap in the recycler view area
sleep 3
echo "Setup complete! The video should now be open with PTZ controls."
echo "Touch the center of the screen to see the PTZ dot."