Ethernet/PoE Modules

HTTP Command Set

438 views June 1, 2023 aryakrishna 1

This document describes the command sets used on the Numato Lab Ethernet/PoE Modules.

Sl. No.CommandUsageDescription
1info.cgiinfo.cgiDisplays the info data of the module.
2ver.cgiver.cgiDisplays the firmware version.
3idget.cgiidget.cgiReads the Device ID.
4usrget.cgiusrget.cgiReads the username.
5passget.cgipassget.cgiReads the password.
6reset.cgireset.cgiReset all the relays to off state.
7modulereboot.cgimodulereboot.cgiReboots the module to configuration mode.
8id.cgi?devid=[device id]id.cgi?devid=00000001Set new Device ID.

Device ID must be 8 in length.
9settings.cgi?cred=[username] [password]settings.cgi?cred=numato numatoSet new Username and Password.
Enter the username and password accordingly.
User name and password can be of length 1-8.
10relay.cgi?on=xrelay.cgi?on=xTurns on relay ‘x’,
x varies from 0 – 9 & A – V, 000 - 031 depending on the board configuration.
11relay.cgi?off=xrelay.cgi?off=xTurns off relay ‘x’,
x varies from 0 – 9 , A – V, 000-031 depending on the board configuration.
12relay.cgi?read=xrelay.cgi?read=xReads the state of relay ‘x’, x varies from 0 – 9 , A – V, 000-031 depending on the board configuration.
13relay.cgi?writeall=[value]relay.cgi?writeall=[value]On/off multiple relays at a time
Note: value is in hexadecimal from 00 to ffffffff depending on the number of relays onboard.
14relay.cgi?readallrelay.cgi?readallRead all relays status in hexadecimal value.
15gpio.cgi?set=xgpio.cgi?gpioset=0Set gpio x.
x varies from 0 – 9 , A – V, 000-031 depending on the board configuration.
16gpio.cgi?clear=xgpio.cgi?gpioclear=Clear gpio x.
x varies from 0 – 9 , A – V, 000-031 depending on the board configuration.
17gpio.cgi?read=xgpio.cgi?read=5Reads gpio x.
x varies from 0 – 9 , A – V, 000-031 depending on the board configuration.
18gpio.cgi?writeall=[value]gpio.cgi?writeall=ffffSet/clear multiple gpios at a time.
Note: value is in hexadecimal from 00 to ffffffff depending on the number of GPIOs onboard.
19gpio.cgi?iomask=[value]gpio.cgi?iomask=ffffThis command masks the GPIOs in GPIO modules from changing the state..
Note: value is in hexadecimal from 00 to ffffffff depending on the number of GPIOs onboard.

0 – mask & 1 – unmask
20gpio.cgi?iodir=[value]gpio.cgi?iodir=ffffSet the Input/output direction of the GPIOs.
Note: value is in hexadecimal from 00 to ffffffff depending on the number of GPIOs onboard.

0 – Output & 1 – Input.
21gpio.cgi?status=xgpio.cgi?status=xReads gpio x status withput changing it's IO direction.
x varies from 0 – 9 , A – V, 000-031 depending on the board configuration.
22gpio.cgi?readallgpio.cgi?readallThis command reads status of all gpio.
23adc.cgi?read=xadc.cgi?read=0This command reads adc value at pin x.
x varies from 0 – 9 , A – D, 000-013 depending on the board configuration and only if Analog inputs available onboard.
24adc.cgi?rangeset=x Xadc.cgi?rangeset=000 2This command sets the adc pin x to a range X.
x varies from 000 - 003 and X varies from 0 to 8.
25adc.cgi?rangeget=xadc.cgi?rangeget=000Reads the adc x range.
x varies from 000 - 003.
26adc.cgi?offsetset=x z Xadc.cgi?offsetset=000 0 500This command adds/subtracts the offset value X based on the z value to the ADC value of pin x.
x varies from 000 - 003, z: 0 - adds, 1 - subtracts, X varies from 0 to 9999.
27adc.cgi?offsetget=xadc.cgi?offsetget=000Reads the adc x's offset set value with the sign.
x varies from 000 - 003.
28adc.cgi?configset=xadc.cgi?configset=1Sets the x value to the ADC's.
Note: x is in hexdecimal from 0 to f depending on the number of ADCs onboard.

0 - Voltage loop & 1 - Current loop.
29adc.cgi?configgetadc.cgi?configgetReads the ADC's config value. The output read is a hexadecimal value.
30dac.cgi?set=x Xdac.cgi?set=000 1Set DAC x to X volts.
x varies from 000-003, X varies from 0.00 to 10.0
31dac.cgi?read=xdac.cgi?read=000Reads DAC x.
x varies from 000-003.

Refer product page and user manual to know more about the number of relays/GPIOs/ADCs/DACs.

Note:

  1. “gpio – set, clear and status” commands are not Present on PoE Relay, PoE GPI & ETH ADC-DAC modules.
  2. “gpio – iodir and iomask” are not Present on ETH Relay/ADC-DAC, PoE Relay and PoE GPI/GPO modules.
  3. “adc read” commands are not present on PoE Relay & PoE GPIO modules.
  4. “adc – rangeset, rangeget, offsetset, offsetget, configset and configget” commands are only present on ETH ADC-DAC(DAQ) version – A0M01.02 modules.
  5. “relay – on, off, readall, writeall, reset” commands are only present on Relay modules.
  6. “gpio – writeall, readall” command are present only on ETH GPIO and PoE GPIO modules
  7. “gpio – iomask,  iodir” commands are present only on ETH GPIO modules.
  8. “dac – set, read” commands are present only on ETH ADC-DAC modules.
  9. “info” command is not present on ETH ADC-DAC A0M01.01 version.
  10. Prefex IP Address before all commands. Eg: 192.168.1.1/ver.cgi

Was this helpful?

Leave A Comment
*
*