Author Topic: IOR5E control through CGI/HTML Files  (Read 9535 times)

famador

  • Newbie
  • *
  • Posts: 1
    • View Profile
IOR5E control through CGI/HTML Files
« on: March 21, 2006, 12:15:58 PM »
Has anybody tried using CGI scripts and HTML files to control the IOR5E I/O board?

As it is, there is code to view and change the output status of the SBC65EC.  However, I haven't seen any code for use on the CGI/HTML files to control any I/O boards.

I ask because it would be easier, in my application, to control the I/O board through CGI/HTML files rather than recompiling the webserver board everytime I have to change I/O functions.

Can anybody give me examples/ideas on how to do this? Thanks...I will greatly appreciate it.

Franklin

128bit

  • Hero Member
  • *****
  • Posts: 70
    • View Profile
Re: IOR5E control through CGI/HTML Files
« Reply #1 on: May 03, 2006, 06:38:25 PM »
Hi Franklin,

Yes I have done this.

If you like I can email you the code, OR post it here. My code will control the relays and display the status of any of the leds / relays on a cgi page.

If your interested reply or send me a email 128bit (AT) inthepilbara.com

----
Daniel.
----------------------------------------------------
There are 10 types of people, those who understand Binary and those who don't! :)

airiq

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: IOR5E control through CGI/HTML Files
« Reply #2 on: June 05, 2006, 01:23:42 AM »
Hi Franklin or Daniel

I am also very interested by this code because i want to control my IOR5E with a SCB65EC.

Can you send me them or post them here.


Thank you very much


[email protected]


128bit

  • Hero Member
  • *****
  • Posts: 70
    • View Profile
Re: IOR5E control through CGI/HTML Files
« Reply #3 on: June 05, 2006, 03:35:21 AM »
Hi,

I am very sorry for the delay everyone who is after the code.

I will try to post it as soon as i can, however this prob wont be till my exams end, around the 24th of June.

Sorry again about the delay.

----
Daniel.
----------------------------------------------------
There are 10 types of people, those who understand Binary and those who don't! :)

zhh

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: IOR5E control through CGI/HTML Files
« Reply #4 on: August 02, 2006, 05:30:08 PM »
Hi,  thanks for all the info here.  I just finished setting up my IOR5E/SB68EC as my new lawn sprinkler controller. 

I have documented my experience at http://www.zeebar.com/notes/modtronix.html where you will also find code snipets to turn the relays on/off via http (as well as turn them off automatically, which is kind of important if you dont want to flood something because of a network problem)  :-)

What a neat and tidy little box ... if only Modtronix offered more useful functionality for download so you wouldnt have to write and compile code in order to use it.  There really should not be a need for programming (and the required windows box) if all you are going to use it for is remote IO.

ps: Still would like to know how to get data from the digital inputs so that I can have our motion sensors trigger the sprinklers...

javierdc

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: IOR5E control through CGI/HTML Files
« Reply #5 on: January 31, 2008, 10:55:12 PM »
Hi Franklin,

Yes I have done this.

If you like I can email you the code, OR post it here. My code will control the relays and display the status of any of the leds / relays on a cgi page.

If your interested reply or send me a email 128bit (AT) inthepilbara.com

----
Daniel.

I'm also interested in this code, did you had chance to post it?

Thanks

javierdc

  • Jr. Member
  • **
  • Posts: 9
    • View Profile
Re: IOR5E control through CGI/HTML Files
« Reply #6 on: February 05, 2008, 05:26:17 AM »
Here is a sample of what I did to use commands to control the relays and the leds on the IOR5E:

Code: [Select]
in cmd.c
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//We recived a IOR5E command z to control IOR5E
//Add Below 'We received a general command' and before 'PWM command processing'
//TODO: Validate values
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    else if (name[0] == CMDGROUP_IOR5E)
    {
#if (DEBUG_CMD >= LOG_DEBUG)
debugPutMsg(8);     //@mxd:8:Received IOR5E Command
#endif

//The second character of the name part of the name-value pair will be the "Command Code".
switch(name[1]) {
case CMDCODE_IOR5E_RLY:
switch(name[2]) {
case '1':
ior5e.bits.rly1 = value[0];
break;
case '2':
ior5e.bits.rly2 = value[0];
break;
case '3':
ior5e.bits.rly3 = value[0];
break;
case '4':
ior5e.bits.rly4 = value[0];
break;
case '5':
ior5e.bits.rly5 = value[0];
break;
}
break;
case CMDCODE_IOR5E_LEDPWR:
ior5e.bits.ledPWR = value[0];
break;
case CMDCODE_IOR5E_LEDRLY:
switch(name[2]) {
case '1':
ior5e.bits.ledRLY1 = value[0];
break;
case '2':
ior5e.bits.ledRLY2 = value[0];
break;
case '3':
ior5e.bits.ledRLY3 = value[0];
break;
case '4':
ior5e.bits.ledRLY4 = value[0];
break;
case '5':
ior5e.bits.ledRLY5 = value[0];
break;
}
break;
case CMDCODE_IOR5E_LEDIN:
switch(name[2]) {
case '1':
ior5e.bits.ledIN1 = value[0];
break;
case '2':
ior5e.bits.ledIN2 = value[0];
break;
case '3':
ior5e.bits.ledIN3 = value[0];
break;
case '4':
ior5e.bits.ledIN4 = value[0];
break;
case '5':
ior5e.bits.ledIN5 = value[0];
break;
case '6':
ior5e.bits.ledIN6 = value[0];
break;
}
break;
case CMDCODE_IOR5E_LEDOPTO:
switch(name[2]) {
case '1':
ior5e.bits.ledOPTO1 = value[0];
break;
case '2':
ior5e.bits.ledOPTO2 = value[0];
break;
case '3':
ior5e.bits.ledOPTO3 = value[0];
break;
case '4':
ior5e.bits.ledOPTO4 = value[0];
break;
}
break;
}
}

in cmd.h
/////////////////////////////////////////////////
// CMDGROUP_IOR5E
// Below CMDCODE_GEN_PASSWORD
#define CMDGROUP_IOR5E ('z')
// The HTTP Command codes for this group
#define CMDCODE_IOR5E_RLY ('r')      //Relay Control
#define CMDCODE_IOR5E_LEDRLY ('y')    //Led Relay Control
#define CMDCODE_IOR5E_LEDPWR ('l')    //Led Power Control
#define CMDCODE_IOR5E_LEDIN ('i')    //Led IN Control
#define CMDCODE_IOR5E_LEDOPTO ('o')    //Led OPTO Control


Based on the samples posted in this forum. You need ior5e.h & ior5e.c

Pingu

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: IOR5E control through CGI/HTML Files
« Reply #7 on: November 21, 2008, 06:21:07 AM »
Hi,
Thanks for your sample, could you help me to find the famous "ior5e.c" file, I found the "ior5e.h" but not the "ior5e.c" !
Thanks in advance.
Charles

//You need ior5e.h & ior5e.c//