AbelCam Forum
Download AbelCam buy Pro
 
 
 
Welcome Anonymous User
03/29/2024 - 03:53 PM
Quick Search:
Quick Jump:
 
Announcements
Latest Topics
 
Greater than 10 Commands
By: AnthonyBa
Rank: Newbie
Topics: 3
From: n/a
Added: 05/02/2012 - 07:54 PM

I have some custom HTML on my site that sends PC commands to the server when users hit buttons on the webpage. The problem is, I have 11 buttons that need commands but the AbelCam server software only seems to allows me to add 10. I tried to directly add an eleventh command to Config.xml but it does not show up in the command list and gets erased when I save the server configuration. Is there a way to increase the number of commands I can add on the commands dialog through some parameter, registry hack, etc?

Thanks
By: sse
Rank: Forum Addict
Topics: 73
From: n/a
Added: 06/04/2012 - 11:14 AM

Hello Anthony

you may increase the number of commands available by using parameters.

See the examples in the wwwroot/commands folder.
By: WilbertB
Rank: Newbie
Topics: 1
From: Belgium
Added: 10/22/2012 - 05:00 PM

Hello,
I intended to use external commands for my home automation but I got all so a limitation
problem of 10 external commands!
In the folder C:\Documents and Settings\All Users\Application Data\Seiz System
Engineering\AbelCam I entered more commands directly in the config.xml but this
doesn't seem to work and when I do a save in Abelcam only the first 10 commands are
saved. I looked in in the wwwroot/commands folder as you suggested to Anthony but don't see a solution to increase the number of commands.
Why I want to use more commands (>500 or unlimited)? I like to use Abelcam
with Winlirc (winlirc.sourceforge.net). In Winlirc you can use remote control codes from
all most every trademark or capture and store the remote signals (it works like an
universal remote control), no limitation and easy to configure , very simple and
inexpensive hardware to send and to receive IR or RF signals, this makes it very
interesting to use it in conjunction with Abelcam and its webserver capabilities.
A plugin, just like the X10 or K8055 plugin could be a solution but I don't have the
knowledge to write a plugin.
Do you have a solution?

Thanks


By: sse
Rank: Forum Addict
Topics: 73
From: n/a
Added: 10/23/2012 - 11:49 AM

Yes, of course there's a solution (to unlimited number of commands).
Have a look at the file script.cmd in the wwwroot\commands folder.
This can easily be extended to execute any number of commands.

Here an example with three commands in one command definition:

@echo off

rem evaluate parameter
if %1. == . goto help
if %1. == 1. goto o1
if %1. == 2. goto o2
if %1. == 3. goto o3
goto end

:o1 
echo option 1
rem add any command in here
goto end

:o2 
echo option 2
rem add any command in here
goto end

:o3
echo option 3
rem add any command in here
goto end

:help
rem optionally the help section can explain what options exist
echo In this example there are 3 options available, just add ?x to your
request where x is a number from 1 to 3
goto end
:end


Save the code above into the commands folder as ex.cmd
add the command in options (Help Page)

Play around with it and come back to ask more questions if this post does not solve your problem Wink
By: AnthonyBa
Rank: Newbie
Topics: 3
From: n/a
Added: 11/17/2012 - 04:00 AM

WilbertB,

If the above answer doesn't help, you could do what I did and create one command that opens a command shell (cmd.exe), or any program, in widows then execute simple .bat files in a folder called C:\bats to execute your commands and then run them through your web page's html with buttons or whatever using code similar to:


<a href="HTTP://10.10.10.10:8080/address?/c%20c:\\bats\\My.bat" target="dummy"><input name="Button1" type="button" value="UR" style="width: 42px"></a>

The IP address and port should be your IP, where it says address? should be the name you designated in the address field of the commands section in AbelCam, and where it says My.bat use the name you gave your bat file.

This also works with any program that you want to pass parameters to like a command to open media player (C:\Program Files\Windows Media Player\wmplayer) in AbelCam and then html that looks like this to open a wav file:

<a href="HTTP://10.10.10.10:8080/play?/c%20c:\\sounds\\sample.wav" target="dummy"><input name="Button2" type="button" value="Sample" style="width: 75px"></a>

Hope this helps.