This is more of a request, and process post than anything. I am trying to make a setup that once my cell phone (Android) connects to my WiFi at my house, it will tell Zoneminder to switch off some of the cameras via changing the Runstate of Zoneminder.
I have two profiles, one called "Away" and the other called "Home"
Tasker has the ability to Post a form via Http.
It would work properly, except that I have a login enabled. Currently, its appears there is no way to auto login via the URL alone. Here is what I have found so far:

From someone posting about auto logging in from a cell phone, where inserting this form into an HTML page will give you a button that will automatically log you in:

I feel like I have two parts that can work together... but unable to see the connection. Any ideas? I'll keep researching and testing till I figure this one out.

And one more little bit that may help (from the Wiki:FAQ)

Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command zmpkg.pl <run state>, for example zmpkg.pl Daytime.
The final step you need to take, is scheduling the time the changes take effect. For this you can use cron. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows,
0 8 * * * /usr/local/bin/zmpkg.pl Daytime
0 20 * * * /usr/local/bin/zmpkg.pl Nighttime

Last edited by camroidv27 on Wed Aug 03, 2011 6:58 am, edited 1 time in total.

This successfully works with Tasker! Having it do an HTTP Post to the file with no data passed to it, makes it work. So, the next part is to make it work without having two files! I have one PHP file per needed state.

Here's how the Tasker App is setup:
Profile named "At Home"
Context: Wifi Connected to my home Wifi Router

Enter Task:

Action Catagory -> Net -> HTTP Post

"Server:Port" = YOURIP:PORT

"Path" = zm/YOURPHP.php

"Timeout" = 30s (this is because Zoneminder takes a little while to set the run state)

Bumping a very old thread.
If you are still out there @camroidv27, what did acutally happend when you changed the Running state? I do get how im supposed to config ZM to actually change the function of my camera, depending on the running state. Because that must be the goal right? So when I leave home, the running state changes to Away, which in turn changes the function of my cameras to "modect".

Hoping to get this to work since i still use Tasker for pretty much everything that has with automation to do daily.

Cheers guys!

Edit: Nevermind, seems I was to fast in changing states back and fourth. Problably didnt let it save the state before i switched again. Now the function changes with each state. Just need to make the script and add the stuff to Tasker i guess. If anyone has any other good ideas on how to configure zoneminder together with Tasker im all ears! =)

Glad you got it working-ish? I haven't been using this setup in quite a while... but if I remember correctly, I just told Tasker to "GET" a webpage at the address with the corresponding .php file.

Unfortunately this is a HUGE security risk, as anyone on the outside can then trigger this php file. Hence why I don't use this setup any more. However, there is a lot of documentation on the API from the zoneminder folks on the newer versions page. Maybe someone can write a tasker script with those in mind? Best of luck!

Im trying to get this setup again somehow. But now the paths doesnt seem to work.
I guess the path /usr/local/bin/ isnt correct for zmpkg.pl any longer?

Anyone have another suggestion on how to solve this? I was hoping to be able to use the short script and then tell Domoticz to send a HTTP Post at certain times to active the MODECT when I activate my alarm.

I ran into this trying to have Darknet/YOLO do object detection on Alarm Frames jpg's. I had to make the PHP shell exec command call a BASH script which started the Darknet analysis of the jpg's sent to it. For some reason I could not use a PHP script to run from the exec command directly but it would work if it called a BASH script. Don't know if any of that will mean anything to you but I am running the scenario you have through the brain matter and troubleshoot this. It should work.