Page 1 of 1

[SOLVED] Using control scripts from command line

Posted: Tue Mar 24, 2015 1:16 pm
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

Re: Using control scripts from command line (SOLVED)

Posted: Tue Mar 24, 2015 1:20 pm
by sime
....

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

sorry for that

Simon