ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / Domotics functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Sends a command to one or more electrical devices compatible with the X10 protocol.
Remark: In order for the X10 protocol to operate properly through power-line carrier, continuous power is required between the devices. For example, the transmission cannot pass through an insulation transformer.
Example
// Open the X10 connection
ConnectionID is int
ConnectionID = DomoOpen("COM4", "A")  
// Switch on the lamps connected to the A3 and A4 modules
DomoSend(ConnectionID, "A3 A4", domoOn)
// Equivalent to: DomoSwitchOn(ConnectionID, "A3 A4")
// Modify the intensity of these lamps
DomoSend(ConnectionID, "A3 A4", domoDim, -60)
// Equivalent to: DomoSend(ConnectionID, "A3 A4", domoModify, -60)
...
// Switch off the lamps
DomoSend(ConnectionID, "A3 A4", domoOff)
// Equivalent to: DomoSwitchOff(ConnectionID, "A3 A4")
// Switch off all the devices on A
DomoSend(ConnectionID, "A", domoAllOff)
Syntax
<Result> = DomoSend(<Connection identifier> , <Address> , <Command to send> [, <Command value>])
<Result>: Boolean
  • True if the command was successfully sent,
  • False otherwise (transmission error, device did not respond, etc.). If an error occurs, use ErrorInfo with the errMessage constant to get more details on the error.
<Connection identifier>: Integer
Identifier of the connection to use. This identifier is defined by DomoOpen.
<Address>: Character string
Address of electrical devices compatible with the relevant X10 protocol.
The address format is as follows: <House code><Module code>
Where:
<House code> corresponds to a letter found between A and P.
<Module code> corresponds to a number found between 1 and 16.
For example: "A1", "B14".
To specify several addresses, the addresses must be separated by a space character. For example: "A1 A3 B15".
<Command to send>: Integer constant
Command that must be sent to the specified electrical devices:
domoAllOffSwitches all the specified electrical appliances off. In this case, <Address> must only contain one or more house codes.
domoBrightIncreases the intensity of the specified electrical devices by <Command value> percent (brightness of the lamps in most cases).
domoDimReduces the intensity of the specified electrical devices by <Command value> percent (brightness of the lamps in most cases).
domoModifyModifies the current status of the specified electrical appliances. In this case, <Command Value> corresponds to:
  • True: Switches the specified electrical appliances on.
  • False: Switches the specified electrical appliances off.
  • <Positive value>: Increases the intensity of the specified electrical devices by <Positive value> percent
  • <Negative value>: Reduces the intensity of the specified electrical devices by <Negative value> percent
domoOffSwitches the specified electrical appliances off.
domoOnSwitches the specified electrical appliances on.
<Command value>: Optional boolean or integer
Value of the command sent:
TrueSwitches the specified electrical appliances on.
FalseSwitches the specified electrical appliances off.
<Positive value>Increases the intensity of the specified electrical devices by <Positive value> percent.
<Negative value>Reduces the intensity of the specified electrical devices by <Negative value> percent.
Component: wd290com.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help