Luup/Lua Code For Amcrest Camera Preset Command

I am currently using the following Luup/Lua code in a scene to command my Amcrest IP2M-841B camera to go to preset 1 but it does not work. (note: I use a different password). If I paste the command into my browser, it does work.

luup.inet.wget('http://192.168.1.105:8105/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0&arg4=0',5,admin,password)

However, I also use this following code to position my Foscam 8910W camera to preset 1 and it does wok:

luup.inet.wget("192.168.1.145:8145/decoder_control.cgi?command=31&user=admin&pwd=password",5)

Has anyone had luck sending a preset command to an Amcrest camera from within a scene, please?

Thank you!

Try this maybe?

luup.inet.wget("http://admin:Password@192.168.1.105:8105/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0&arg4=0",5) 

Thanks, but I had tried that form to begin with and it hasn’t worked either. That is what I initially found in Amcrest’s documentation. There was a post in the old Vera Users community forum that suggested what I’m using now. I also tried different forms and syntax of the command, too, but still no luck.

I sent an email to Amcrest support last year and they simply stated what’s in their documentation. I also sent an email to Vera support shortly thereafter and they responded the same.

So, instead of my scene powering up my Amcrest cameras and then sending preset commands 3 minutes later (to give the cameras adequate time to power up), I have to manually send each of my 7 Amcrest cameras a separate preset command after they power up in the evening. I probably won’t buy Amcrest products again. All my 8910W Foscam cameras work just fine when they receive preset commands from my scene. They also have a feature to go to preset 1 on startup which the Amcrests do not.

It’s very frustrating especially after Amcrest touted their cameras to be much better than Foscam. I’m pretty disappointed.