Ecmd Reference: Unterschied zwischen den Versionen

Aus Ethersex_Wiki
Wechseln zu: Navigation, Suche
(Importing text file)
(Importing text file)
Zeile 4: Zeile 4:
 
patches for those files!
 
patches for those files!
 
</div>
 
</div>
 +
 
__NOTOC__
 
__NOTOC__
== Network configuration ==
+
== Analog/Digital Conversion (ADC) ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| mac [xx:xx:xx:xx:xx:xx]
+
| adc get  [CHANNEL]
| Display/Set the MAC address.
+
| Get the ADC value in hex of CHANNEL or if no channel set of all channels.
 +
|-
 +
|}
 +
== Clock ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| ip [IP]
+
| date
| Display/Set the IP address.
+
| Display the current date.
 
|-
 
|-
| netmask [IP]
+
| time
| Display/Set the network mask.
+
| Display the current time in seconds since January 1st 1970.
 
|-
 
|-
| gw [IP]
+
| whm
| Display/Set the address of the default router.
+
| Display the uptime.
 
|-
 
|-
 
|}
 
|}
== Resetting the controller ==
+
== Cron commands (dynamic variant) ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| reset
+
| cron_add  MIN HOUR DAY MONTH DOW ECMD
| Reset the Ethersex.
+
| Add ECMD to cron to be executed at given time
 
|-
 
|-
| wdreset
+
| cron_list
| Go into endless loop to trigger a watchdog timeout.
+
| Show all cron entries
 
|-
 
|-
| bootloader
+
| cron_rm  POSITION
| Call the bootloader.
+
| Remove one cron entry
 
|-
 
|-
 
|}
 
|}
== Stella commands ==
+
== DC3840 Handycam support ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| stella store
+
| dc3840 capture
| Store values in eeprom
+
| Take a picture.  Access 'dc3840' via VFS afterwards.  See [[DC3840 Camera]] for details.
 
|-
 
|-
| stella load
+
| dc3840 send  A B C D E
| Load values from eeprom
+
| Send provided command bytes to the camera.
 
|-
 
|-
| stella cron CHANNEL VALUE MINUTE HOUR DAY MONTH DAYOFWEEK
+
| dc3840 sync
| Add a cronjob for stella to set the CHANNEL to VALUE. You may use fade channel constants.
+
| Re-sync to the camera
 
|-
 
|-
| channels
+
|}
| Return stella channel size
+
== DNS Resolver ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| moodlight get CHANNEL
+
| dns server  [IPADDR]
| Return on if channel CHANNEL is moodlighted
+
| Display/Set the IP address of the DNS server to use to IPADDR.
 
|-
 
|-
| moodlight set CHANNEL ONOFF
+
| nslookup  HOSTNAME
| Set CHANNEL moodlight on=1 or off=0
+
| Do DNS lookup for HOSTNAME (call twice).
 
|-
 
|-
| stella fadestep set FADESTEP
+
|}
| Set stella fade step
+
== Dallas 1-wire ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| stella fadestep get
+
| 1w convert  [DEVICE]
| Get stella fade step
+
| Trigger temperature conversion of either DEVICE or all connected devices
 
|-
 
|-
| channel set CHANNEL VALUE FUNCTION
+
| 1w get  DEVICE
| Set stella channel to value. The third parameter is optional. You may use 's' for instant set
+
| Return temperature value of onewire DEVICE (provide 64-bit ID as 16-hex-digits)
 
|-
 
|-
| channel get CHANNEL
+
| 1w list
| Get stella channel value
+
| Return a list of the connected onewire devices
 
|-
 
|-
 
|}
 
|}
== Cron commands (dynamic variant) ==
+
== DataFlash ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| cron_list
+
| df status
| Show all cron entries
+
| Display internal status.
 +
|-
 +
| fs format
 +
|  Format the filesystem.
 +
|-
 +
| fs inspect inode  INODE
 +
|  Inspect INODE (and associated page).
 +
|-
 +
| fs inspect node  NODE
 +
|  Inspect NODE and dump to serial.
 +
|-
 +
| fs list
 +
|  List the directory.
 +
|-
 +
| fs mkfile  NAME
 +
|  Create a new file NAME.
 +
|-
 +
| fs remove  NAME
 +
|  Delete the file NAME.
 +
|-
 +
| fs truncate  NAME LEN
 +
|  Truncate the file NAME to LEN bytes.
 +
|-
 +
|}
 +
== ECMD Aliases ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| cron_rm POSITION
+
| alias list
| Remove one cron entry
+
| List all available aliases
 
|-
 
|-
 
|}
 
|}
== Port I/O ==
+
== ECMD Scripting ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| io set ddr PORTNUM HEXVALUE [MASK]
+
| call  FILENAME
| Set the DDR of port PORTNUM to VALUE (possibly using the provided MASK).
+
| Start script named FILENAME
 
|-
 
|-
| io get ddr PORTNUM
+
| dec  VAR
| Display the current value of the DDR PORTNUM.
+
| Decrement variable VAR (a number)
 
|-
 
|-
| io set port NUM HEXVALUE [MASK]
+
| echo  <any>
| Set the PORT NUM to VALUE (possibly using the provided MASK).
+
| Print out all arguments of echo
 
|-
 
|-
| io get port NUM
+
| exit
| Display the current value of the PORT NUM.
+
| Exit currently running script
 
|-
 
|-
| io get pin PORTNUM
+
| get VAR
| Display the current value of the PIN-register of the port PORTNUM.
+
| Get value of variable VAR
 
|-
 
|-
| io get mask PORTNUM
+
| goto  N
| Display the mask of the port PORTNUM.
+
| Goto line N in currently running script
 +
|-
 +
| if  ( CMD/VAR == CONST ) then CMD2
 +
|  If condition matches execute CMD2
 +
|-
 +
| inc  VAR
 +
|  Increment variable VAR (a number)
 +
|-
 +
| rem <any>
 +
|  Remark for anything
 +
|-
 +
| set  VAR VALUE
 +
|  Set variable VAR to VALUE
 +
|-
 +
| wait  I
 +
|  Wait I milliseconds
 
|-
 
|-
 
|}
 
|}
== Control 6 ==
+
== EEPROM ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| c6 get  VARNAME
+
| eeprom reinit
| Display the current value of the ECMD_GLOBAL Variable
+
| Force reinitialization of the EEPROM config area
|-
 
| c6 set  VARNAME VALUE
 
| Set an new value on the ECMD_GLOBAL Variable
 
 
|-
 
|-
 
|}
 
|}
== Named Pins ==
+
== FS20 ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| pin get NAME
+
| fs20 receive
| Read and display the status of pin NAME.
+
| Receive FS20 sequence and display it.
 
|-
 
|-
| pin set NAME STATUS
+
| fs20 send HOUSECODE ADDR CMD
| Set the status of pin NAME to STATUS.
+
| Send FS20 command. See [[FS20]] for details.
 
|-
 
|-
| pin toggle NAME
+
| fs20 ws300
| Toggle the status of pin NAME.
+
| Receive FS20 sequence from WS300 weather station and decode it.
 
|-
 
|-
 
|}
 
|}
 
== HD44780 LCD Display ==
 
== HD44780 LCD Display ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| lcd clear [LINE]
+
| lcd char  N D1 D2 D3 D4 D5 D6 D7 D8
| Clear line LINE (0..3) or the whole display (if parameter is omitted)
+
| Define use-definable char N with data D1..D8 (provide DATA in hex)
 
|-
 
|-
| lcd write TEXT
+
| lcd clear  [LINE]
| Write TEXT to the current cursor location
+
| Clear line LINE (0..3) or the whole display (if parameter is omitted)
 
|-
 
|-
| lcd goto LINE COL
+
| lcd goto LINE COL
| Move cursor to LINE and column COL (origin is 0/0)
+
| Move cursor to LINE and column COL (origin is 0/0)
 
|-
 
|-
| lcd char N D1 D2 D3 D4 D5 D6 D7 D8
+
| lcd reinit  CURSOR BLINK
| Define use-definable char N with data D1..D8 (provide DATA in hex)
+
| Reinitialize the display, set whether to show the cursor (CURSOR, 0 or 1) and whether the cursor shall BLINK
 
|-
 
|-
| lcd init CURSOR BLINK
+
| lcd shift  DIR
| Reinitialize the display
+
| Shift the display to DIR (either ''left'' or ''right'')
 
|-
 
|-
| lcd shift DIR
+
| lcd write  TEXT
| Shift the display to DIR (either ''left'' or ''right'')
+
| Write TEXT to the current cursor location
 
|-
 
|-
 
|}
 
|}
== Dallas 1-wire ==
+
== I2C (TWI) ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| 1w list
+
| i2c detect
| Return a list of the connected onewire devices
+
| list detected I2C Chips
 
|-
 
|-
| 1w get DEVICE
+
| lm75 ADDR
| Return temperature value of onewire DEVICE (provide 64-bit ID as 16-hex-digits)
+
| Get temperature
 
|-
 
|-
| 1w convert [DEVICE]
+
| pca9531 ADDR PERIODPWM1 DUTYPWM1 PERIODPWM2 DUTYPWM2 LED0..3 LED4..7
| Trigger temperature conversion of either DEVICE or all connected devices
+
| set PWM1 and PWM2 and LED states
 +
|-
 +
| pcf8574x read ADDR CHIP
 +
|  Get bits
 +
|-
 +
| pcf8574x set ADDR CHIP HEXVALUE
 +
|  Set bits
 
|-
 
|-
 
|}
 
|}
== DNS Client ==
+
== KTY ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| nslookup HOSTNAME
+
| kty autocalibrate CHANNEL
| Do DNS lookup for HOSTNAME (call twice).
+
| Calibrate to 1000 Ohm precision Resistor.
 
|-
 
|-
| dns server [IPADDR]
+
| kty cal get
| Display/Set the IP address of the DNS server to use to IPADDR.
+
|  Return the calibration difference to 2k2 Resistor.
 +
|-
 +
| kty get  [CHANNEL]
 +
| Get the temperature in xxx.x °C of CHANNEL or if no channel set of all channels.
 
|-
 
|-
 
|}
 
|}
== NTP Client/Server ==
+
== MCUF ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| ntp query
+
| mcuf modul N
| Query the NTP server to get an NTP update.
+
| Select module N
 +
|-
 +
| mcuf modul list
 +
|  List all modules
 
|-
 
|-
| ntp server [IPADDR]
+
| mcuf showclock
| Display/Set the IP address of the NTP server to use to IPADDR.
+
| Show digital clock
 +
|-
 +
| mcuf showstring MESSAGE
 +
|  Show scrolling MESSAGE on the display
 
|-
 
|-
 
|}
 
|}
== Clock ==
+
== MySQL ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| time
+
| mysql query  QUERY
| Display the current time in seconds since January 1st 1970.
+
| Send specified MySQL query to the configured server
|-
 
| date
 
| Display the current date.
 
 
|-
 
|-
 
|}
 
|}
== Analog/Digital Conversion (ADC) ==
+
== NTP Client ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| adc get [CHANNEL]
+
| ntp query
| Get the ADC value in hex of CHANNEL or if no channel set of all channels.
+
|  Query the NTP server to get an NTP update.
 +
|-
 +
| ntp server  [IPADDR]
 +
| Display/Set the IP address of the NTP server to use to IPADDR.
 
|-
 
|-
 
|}
 
|}
== KTY ==
+
== Named Pins ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| kty get [CHANNEL]
+
| pin get NAME
| Get the temperature in xxx.x °C of CHANNEL or if noch channel set of all channels.
+
| Read and display the status of pin NAME.
 
|-
 
|-
| kty cal get
+
| pin set  NAME STATUS
| Return the calibration difference to 2k2 Resistor.
+
| Set the status of pin NAME to STATUS.
 
|-
 
|-
| kty autocalibrate CHANNEL
+
| pin toggle  NAME
| Calibrate to 1000 Ohm precision Resistor.
+
| Toggle the status of pin NAME.
 
|-
 
|-
 
|}
 
|}
== DataFlash ==
+
== Network IP Statistics ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| df status
+
| ipstats
| Display internal status.
+
| Display IP statistics.
 
|-
 
|-
| fs format
+
|}
| Format the filesystem.
+
== Network Statistics ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| fs list
+
| ns
| List the directory.
+
| Net Statistic - Public anouncment of running ethersex
 
|-
 
|-
| fs mkfile  NAME
+
|}
| Create a new file NAME.
+
== Network configuration ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| fs remove  NAME
+
| gw [IP]
| Delete the file NAME.
+
| Display/Set the address of the default router.
 
|-
 
|-
| fs truncate  NAME LEN
+
| ip [IP]
| Truncate the file NAME to LEN bytes.
+
| Display/Set the IP address.
 
|-
 
|-
| fs inspect node  NODE
+
| mac [xx:xx:xx:xx:xx:xx]
| Inspect NODE and dump to serial.
+
| Display/Set the MAC address.
 
|-
 
|-
| fs inspect inode  INODE
+
| netmask [IP]
| Inspect INODE (and associated page).
+
| Display/Set the network mask.
 
|-
 
|-
 
|}
 
|}
== SD/MMC Card Reader ==
+
== PWM Servo Control ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| sd dir
+
| pwm servo_init
| List contents of current SD directory.
+
| Initialise servo
 +
|-
 +
| pwm servo_set
 +
|  Set servo position
 
|-
 
|-
 
|}
 
|}
== RFM12 ==
+
== Port I/O ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| rfm12 status
+
| io get ddr  PORTNUM
| Display internal status.
+
| Display the current value of the DDR PORTNUM.
 
|-
 
|-
| rfm12 setbaud BAUD
+
| io get mask  PORTNUM
| Set baudrate to BAUD.
+
| Display the mask of the port PORTNUM.
 
|-
 
|-
| rfm12 setbandwidth BW
+
| io get pin  PORTNUM
| Set RX bandwidth to BW.
+
| Display the current value of the PIN-register of the port PORTNUM.
 
|-
 
|-
| rfm12 setmod MOD
+
| io get port  NUM
| Set modulation to MOD.
+
| Display the current value of the PORT NUM.
 
|-
 
|-
| rfm12 setgain GAIN
+
| io set ddr  PORTNUM HEXVALUE [MASK]
| Set preamplifier gain to GAIN.
+
| Set the DDR of port PORTNUM to VALUE (possibly using the provided MASK).
 
|-
 
|-
| rfm12 setdrssi DRSSI
+
| io set port  NUM HEXVALUE [MASK]
| Set the drssi to DRSSI.
+
| Set the PORT NUM to VALUE (possibly using the provided MASK).
 
|-
 
|-
| rfm12 tevion
+
|}
| housecode command delay cnt
+
== RFM12 ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| rfm12 2272
+
| rfm12 setbandwidth  BW
| housecodeCommand delay cnt
+
| Set RX bandwidth to BW.
 
|-
 
|-
| rfm12 external filter [1]
+
| rfm12 setbaud  BAUD
| Enable ext. filter pin if argument is present (disable otherwise)
+
| Set baudrate to BAUD.
 
|-
 
|-
| rfm12 ask sense
+
| rfm12 setdrssi  DRSSI
| Trigger (Tevion) ASK sensing. Enable ext. filter pin before!
+
Set the drssi to DRSSI.
 
|-
 
|-
|}
+
| rfm12 setgain  GAIN
== DC3840 Handycam support ==
+
| Set preamplifier gain to GAIN.
{| border="1"
 
| ''Command syntax''
 
| ''Short description''
 
 
|-
 
|-
| dc3840 capture
+
| rfm12 setmod  MOD
| Take a picture.  Access 'dc3840' via VFS afterwards. See [[DC3840 Camera]] for details.
+
Set modulation to MOD.
 
|-
 
|-
| dc3840 send  A B C D E
+
| rfm12 status
| Send provided command bytes to the camera.
+
| Display internal status.
|-
 
| dc3840 sync
 
| Re-sync to the camera
 
 
|-
 
|-
 
|}
 
|}
== Sound/Melody support ==
+
== RFM12 ASK ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| pwm melody
+
| rfm12 2272 
| Play melody
+
| housecodeCommand delay cnt
 +
|-
 +
| rfm12 ask sense
 +
|  Trigger (Tevion) ASK sensing.  Enable ext. filter pin before!
 
|-
 
|-
| pwm wav
+
| rfm12 external filter [1]
| Play wav
+
| Enable ext. filter pin if argument is present (disable otherwise)
 
|-
 
|-
| pwm stop
+
| rfm12 tevion 
| Stop wav
+
| housecode command delay cnt
 
|-
 
|-
 
|}
 
|}
== I2C (TWI) ==
+
== Resetting the controller ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| i2c detect
+
| bootloader
| list detected I2C Chips
+
| Call the bootloader.
 
|-
 
|-
| lm75 ADDR
+
| reset
| Get temperature
+
| Reset the Ethersex.
 
|-
 
|-
| pca9531 ADDR PERIODPWM1 DUTYPWM1 PERIODPWM2 DUTYPWM2 LED0..3 LED4..7
+
| wdreset
| set PWM1 and PWM2 and LED states
+
| Go into endless loop to trigger a watchdog timeout.
|-
 
| pcf8574x read ADDR CHIP
 
| Get bits
 
|-
 
| pcf8574x set ADDR CHIP HEXVALUE
 
| Set bits
 
 
|-
 
|-
 
|}
 
|}
== MCUF ==
+
== SD/MMC Card Reader ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| mcuf showclock
+
| sd dir
| Show digital clock
+
| List contents of current SD directory.
 
|-
 
|-
| mcuf showstring MESSAGE
+
| sd mkdir PATH
| Show scrolling MESSAGE on the display
+
| Create directory hierarchy PATH.
|-
 
| mcuf modul list
 
| List all modules
 
|-
 
| mcuf modul N
 
| Select module N
 
 
|-
 
|-
 
|}
 
|}
== FS20 ==
+
== Sound/Melody support ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| fs20 send HOUSECODE ADDR CMD
+
| pwm melody 
| Send FS20 command. See [[FS20]] for details.
+
| Play melody
 
|-
 
|-
| fs20 receive
+
| pwm stop 
| Receive FS20 sequence and display it.
+
| Stop wav
 
|-
 
|-
| fs20 ws300
+
| pwm wav 
| Receive FS20 sequence from WS300 weather station and decode it.
+
| Play wav
 
|-
 
|-
 
|}
 
|}
== ECMD Scripting ==
+
== Stella commands ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| goto N
+
| channel get CHANNEL
| Goto line N in currently running script
+
| Get stella channel value
 +
|-
 +
| channel set  CHANNEL VALUE FUNCTION
 +
| Set stella channel to value. The third parameter is optional. You may use 's' for instant set, 'f' for fade and 'y' for flashy fade.
 
|-
 
|-
| exit
+
| channels
| Exit currently running script
+
| Return stella channel size
 
|-
 
|-
| wait  I
+
| moodlight get CHANNEL
| Wait I milliseconds
+
| Return on if channel CHANNEL is moodlighted
 
|-
 
|-
| set VAR VALUE
+
| moodlight set CHANNEL ONOFF
| Set variable VAR to VALUE
+
| Set CHANNEL moodlight on=1 or off=0
 
|-
 
|-
| get VAR
+
| stella cron CHANNEL VALUE MINUTE HOUR DAY MONTH DAYOFWEEK
| Get value of variable VAR
+
| Add a cronjob for stella to set the CHANNEL to VALUE. You may use fade channel constants.
 
|-
 
|-
| inc  VAR
+
| stella fadestep get
| Increment variable VAR (a number)
+
| Get stella fade step
 
|-
 
|-
| dec VAR
+
| stella fadestep set FADESTEP
| Decrement variable VAR (a number)
+
| Set stella fade step
 
|-
 
|-
| call  FILENAME
+
| stella load
| Start script named FILENAME
+
| Load values from eeprom
 
|-
 
|-
| if  ( CMD/VAR == CONST ) then CMD2
+
| stella store
| If condition matches execute CMD2
+
| Store values in eeprom
 
|-
 
|-
| rem <any>
+
|}
| Remark for anything
+
== UPnP ==
 +
{| border='1'
 +
| ''Command syntax''
 +
| ''Short description''
 
|-
 
|-
| echo  <any>
+
| upnp send
| Print out all arguments of echo
+
| Send UPnP broadcast packet
 
|-
 
|-
 
|}
 
|}
 
== Miscelleanous ==
 
== Miscelleanous ==
{| border="1"
+
{| border='1'
 
| ''Command syntax''
 
| ''Command syntax''
 
| ''Short description''
 
| ''Short description''
 
|-
 
|-
| d ADDR
+
| adc get [CHANNEL]
| Dump the memory at ADDR (16 bytes).
+
| Get the ADC value in hex of CHANNEL or if no channel set of all channels.
 
|-
 
|-
| help
+
| alias list
| List which commands are available.
+
| List all available aliases
 
|-
 
|-
| version
+
| d  ADDR
| Display the version number.
+
| Dump the memory at ADDR (16 bytes).
 
|-
 
|-
| ipstats
+
| eeprom reinit
| Display IP statistics.
+
| Force reinitialization of the EEPROM config area
 
|-
 
|-
| free
+
| free  
| Display free space.
+
| Display free space.
 
|-
 
|-
| whm
+
| help
| Display the uptime.
+
| List which commands are available.
 
|-
 
|-
| eeprom reinit
+
| ipstats
| Force reinitialization of the EEPROM config area
+
| Display IP statistics.
 
|-
 
|-
 
| mysql query  QUERY
 
| mysql query  QUERY
| Send specified MySQL query to the configured server
+
| Send specified MySQL query to the configured server
 
|-
 
|-
| alias list
+
| ns
| List all available aliases
+
| Net Statistic - Public anouncment of running ethersex
 +
|-
 +
| upnp send
 +
|  Send UPnP broadcast packet
 +
|-
 +
| usart baud  BAUD
 +
|  Set the USART baudrate to BAUD.
 +
|-
 +
| version
 +
| Display the version number.
 
|-
 
|-
 
|}
 
|}
 +
 
[[Category:Ethersex]]
 
[[Category:Ethersex]]
 +
[[Category:ECMD]]

Version vom 19. Juli 2009, 00:25 Uhr

This page is automatically generated from ecmd_defs.m4 and wiki.m4 which are part of the Ethersex source code repository. Do not edit this page but send patches for those files!


Analog/Digital Conversion (ADC)

Command syntax Short description
adc get [CHANNEL] Get the ADC value in hex of CHANNEL or if no channel set of all channels.

Clock

Command syntax Short description
date Display the current date.
time Display the current time in seconds since January 1st 1970.
whm Display the uptime.

Cron commands (dynamic variant)

Command syntax Short description
cron_add MIN HOUR DAY MONTH DOW ECMD Add ECMD to cron to be executed at given time
cron_list Show all cron entries
cron_rm POSITION Remove one cron entry

DC3840 Handycam support

Command syntax Short description
dc3840 capture Take a picture. Access 'dc3840' via VFS afterwards. See DC3840 Camera for details.
dc3840 send A B C D E Send provided command bytes to the camera.
dc3840 sync Re-sync to the camera

DNS Resolver

Command syntax Short description
dns server [IPADDR] Display/Set the IP address of the DNS server to use to IPADDR.
nslookup HOSTNAME Do DNS lookup for HOSTNAME (call twice).

Dallas 1-wire

Command syntax Short description
1w convert [DEVICE] Trigger temperature conversion of either DEVICE or all connected devices
1w get DEVICE Return temperature value of onewire DEVICE (provide 64-bit ID as 16-hex-digits)
1w list Return a list of the connected onewire devices

DataFlash

Command syntax Short description
df status Display internal status.
fs format Format the filesystem.
fs inspect inode INODE Inspect INODE (and associated page).
fs inspect node NODE Inspect NODE and dump to serial.
fs list List the directory.
fs mkfile NAME Create a new file NAME.
fs remove NAME Delete the file NAME.
fs truncate NAME LEN Truncate the file NAME to LEN bytes.

ECMD Aliases

Command syntax Short description
alias list List all available aliases

ECMD Scripting

Command syntax Short description
call FILENAME Start script named FILENAME
dec VAR Decrement variable VAR (a number)
echo <any> Print out all arguments of echo
exit Exit currently running script
get VAR Get value of variable VAR
goto N Goto line N in currently running script
if ( CMD/VAR == CONST ) then CMD2 If condition matches execute CMD2
inc VAR Increment variable VAR (a number)
rem <any> Remark for anything
set VAR VALUE Set variable VAR to VALUE
wait I Wait I milliseconds

EEPROM

Command syntax Short description
eeprom reinit Force reinitialization of the EEPROM config area

FS20

Command syntax Short description
fs20 receive Receive FS20 sequence and display it.
fs20 send HOUSECODE ADDR CMD Send FS20 command. See FS20 for details.
fs20 ws300 Receive FS20 sequence from WS300 weather station and decode it.

HD44780 LCD Display

Command syntax Short description
lcd char N D1 D2 D3 D4 D5 D6 D7 D8 Define use-definable char N with data D1..D8 (provide DATA in hex)
lcd clear [LINE] Clear line LINE (0..3) or the whole display (if parameter is omitted)
lcd goto LINE COL Move cursor to LINE and column COL (origin is 0/0)
lcd reinit CURSOR BLINK Reinitialize the display, set whether to show the cursor (CURSOR, 0 or 1) and whether the cursor shall BLINK
lcd shift DIR Shift the display to DIR (either left or right)
lcd write TEXT Write TEXT to the current cursor location

I2C (TWI)

Command syntax Short description
i2c detect list detected I2C Chips
lm75 ADDR Get temperature
pca9531 ADDR PERIODPWM1 DUTYPWM1 PERIODPWM2 DUTYPWM2 LED0..3 LED4..7 set PWM1 and PWM2 and LED states
pcf8574x read ADDR CHIP Get bits
pcf8574x set ADDR CHIP HEXVALUE Set bits

KTY

Command syntax Short description
kty autocalibrate CHANNEL Calibrate to 1000 Ohm precision Resistor.
kty cal get Return the calibration difference to 2k2 Resistor.
kty get [CHANNEL] Get the temperature in xxx.x °C of CHANNEL or if no channel set of all channels.

MCUF

Command syntax Short description
mcuf modul N Select module N
mcuf modul list List all modules
mcuf showclock Show digital clock
mcuf showstring MESSAGE Show scrolling MESSAGE on the display

MySQL

Command syntax Short description
mysql query QUERY Send specified MySQL query to the configured server

NTP Client

Command syntax Short description
ntp query Query the NTP server to get an NTP update.
ntp server [IPADDR] Display/Set the IP address of the NTP server to use to IPADDR.

Named Pins

Command syntax Short description
pin get NAME Read and display the status of pin NAME.
pin set NAME STATUS Set the status of pin NAME to STATUS.
pin toggle NAME Toggle the status of pin NAME.

Network IP Statistics

Command syntax Short description
ipstats Display IP statistics.

Network Statistics

Command syntax Short description
ns Net Statistic - Public anouncment of running ethersex

Network configuration

Command syntax Short description
gw [IP] Display/Set the address of the default router.
ip [IP] Display/Set the IP address.
mac [xx:xx:xx:xx:xx:xx] Display/Set the MAC address.
netmask [IP] Display/Set the network mask.

PWM Servo Control

Command syntax Short description
pwm servo_init Initialise servo
pwm servo_set Set servo position

Port I/O

Command syntax Short description
io get ddr PORTNUM Display the current value of the DDR PORTNUM.
io get mask PORTNUM Display the mask of the port PORTNUM.
io get pin PORTNUM Display the current value of the PIN-register of the port PORTNUM.
io get port NUM Display the current value of the PORT NUM.
io set ddr PORTNUM HEXVALUE [MASK] Set the DDR of port PORTNUM to VALUE (possibly using the provided MASK).
io set port NUM HEXVALUE [MASK] Set the PORT NUM to VALUE (possibly using the provided MASK).

RFM12

Command syntax Short description
rfm12 setbandwidth BW Set RX bandwidth to BW.
rfm12 setbaud BAUD Set baudrate to BAUD.
rfm12 setdrssi DRSSI Set the drssi to DRSSI.
rfm12 setgain GAIN Set preamplifier gain to GAIN.
rfm12 setmod MOD Set modulation to MOD.
rfm12 status Display internal status.

RFM12 ASK

Command syntax Short description
rfm12 2272 housecodeCommand delay cnt
rfm12 ask sense Trigger (Tevion) ASK sensing. Enable ext. filter pin before!
rfm12 external filter [1] Enable ext. filter pin if argument is present (disable otherwise)
rfm12 tevion housecode command delay cnt

Resetting the controller

Command syntax Short description
bootloader Call the bootloader.
reset Reset the Ethersex.
wdreset Go into endless loop to trigger a watchdog timeout.

SD/MMC Card Reader

Command syntax Short description
sd dir List contents of current SD directory.
sd mkdir PATH Create directory hierarchy PATH.

Sound/Melody support

Command syntax Short description
pwm melody Play melody
pwm stop Stop wav
pwm wav Play wav

Stella commands

Command syntax Short description
channel get CHANNEL Get stella channel value
channel set CHANNEL VALUE FUNCTION Set stella channel to value. The third parameter is optional. You may use 's' for instant set, 'f' for fade and 'y' for flashy fade.
channels Return stella channel size
moodlight get CHANNEL Return on if channel CHANNEL is moodlighted
moodlight set CHANNEL ONOFF Set CHANNEL moodlight on=1 or off=0
stella cron CHANNEL VALUE MINUTE HOUR DAY MONTH DAYOFWEEK Add a cronjob for stella to set the CHANNEL to VALUE. You may use fade channel constants.
stella fadestep get Get stella fade step
stella fadestep set FADESTEP Set stella fade step
stella load Load values from eeprom
stella store Store values in eeprom

UPnP

Command syntax Short description
upnp send Send UPnP broadcast packet

Miscelleanous

Command syntax Short description
adc get [CHANNEL] Get the ADC value in hex of CHANNEL or if no channel set of all channels.
alias list List all available aliases
d ADDR Dump the memory at ADDR (16 bytes).
eeprom reinit Force reinitialization of the EEPROM config area
free Display free space.
help List which commands are available.
ipstats Display IP statistics.
mysql query QUERY Send specified MySQL query to the configured server
ns Net Statistic - Public anouncment of running ethersex
upnp send Send UPnP broadcast packet
usart baud BAUD Set the USART baudrate to BAUD.
version Display the version number.