# Camera cgi call doesn't work from Client tagchange script

**URL:** <https://forum.inductiveautomation.com/t/camera-cgi-call-doesnt-work-from-client-tagchange-script/114369>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [March 6, 2026, 7:39pm UTC](https://forum.inductiveautomation.com/t/camera-cgi-call-doesnt-work-from-client-tagchange-script/114369 "2026-03-06T19:39:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![George\_Kalpakidis](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/george_kalpakidis/32/60767_2.png) [@George\_Kalpakidis](https://forum.inductiveautomation.com/u/George_Kalpakidis)\
**Post date:** [March 6, 2026, 7:39pm UTC](https://forum.inductiveautomation.com/t/camera-cgi-call-doesnt-work-from-client-tagchange-script/114369/1 "2026-03-06T19:39:20Z")

</div>

I have a several cameras (PTZOptics) that I can control the Preset by execution a cgi call from the tagchange script. The script looks like this:

```python
import urllib2
urllib2.urlopen
import time
print event.tagPath
print initialChange
print newValue
if newValue.value:

    res = urllib2.urlopen(url='http://xx.xx.xxx.126/cgi-bin/param.cgi?pan_tiltdrive_reset')
   
    time.sleep (20)
    res = urllib2.urlopen(url='http://xx.xx.xxx.126/cgi-bin/ptzctrl.cgi?ptzcmd&poscall&11')

```

and it works perfect.

then we got a new camera (Amcrest) and simply substituted the part in the ‘ ‘ with ‘xx.xx.xxx.138/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0’

which works beautiful when you simply put in the address bar of a browser. But in the script as a tagchange Client script does exactly nothing. I spend half a day with AI trying to come up with a way to get it to work and again nothing. Not sure what to do here. Anyone come across this?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 6, 2026, 7:41pm UTC](https://forum.inductiveautomation.com/t/camera-cgi-call-doesnt-work-from-client-tagchange-script/114369/2 "2026-03-06T19:41:15Z")

</div>

Maybe a difference in HTTP versions or behavior in the face of redirects?

Use Wireshark to see the difference in HTTP calls between your browser and your client tag change script.
