[SOLVED] Using control scripts from command line

Forum for questions and support relating to the 1.28.x releases only.
Locked
sime
Posts: 26
Joined: Thu Jan 01, 2015 8:45 pm

[SOLVED] Using control scripts from command line

Post by sime »

Hi folks,
i use the DCS-5020L control script with zoneminder web interface...

I would need help to use them by command line...

I wanna use CRON to set On and OFF IR

the control code is :

Code: Select all

sub wake
{
    my $self = shift;
    Debug( "Wake - IR on" );
    my $cmd = "setDaynightMode?ReplySuccessPage=night.htm&ReplyErrorPage=errrnight.htm&DayNightMode=3&ConfigDayNightMode=Save";
    $self->sendCmd2( $cmd );
}

sub sleep
{
    my $self = shift;
    Debug( "Sleep - IR off" );
    my $cmd = "setDaynightMode?ReplySuccessPage=night.htm&ReplyErrorPage=errrnight.htm&DayNightMode=2&ConfigDayNightMode=Save";
    $self->sendCmd2( $cmd );
}

sub reset
{
    my $self = shift;
    Debug( "Reset - IR auto" );
    my $cmd = "setDaynightMode?ReplySuccessPage=night.htm&ReplyErrorPage=errrnight.htm&DayNightMode=0&ConfigDayNightMode=Save";
    $self->sendCmd2( $cmd );
}
I reied with wget http:user:pass@ip/setDaynightMode?ReplySuccessPage=night.htm&ReplyErrorPage=errrnight.htm&DayNightMode=0&ConfigDayNightMode=Save
but id dont work...

any clues?

Simon
Last edited by sime on Tue Mar 24, 2015 1:34 pm, edited 1 time in total.
sime
Posts: 26
Joined: Thu Jan 01, 2015 8:45 pm

Re: Using control scripts from command line (SOLVED)

Post by sime »

....

just found out that i need to use zmcontrol.pl --id X --command=wake

sorry for that

Simon
Locked