Interfacing with Standard NetLinx API (SNAPI)
Standard NetLinx API (SNAPI) R 1.7.0
6
Commands
Commands in SNAPI are sent like commands to other devices, using the SEND_COMMAND keyword:
SEND_COMAND dvDevice,'?VERSION'
Commands used to query for the status of a property start with a "?". Query commands cause the module to respond with a response command. Note that this
response is a command, not a string and can be captured in a DATA_EVENT in the COMMAND sub-section:
DATA_EVENT[dvDevice]
{
COMMAND:
{
// DATA.TEXT holds the response to a query command
}
}
General
The NetLinx program should assume that NetLinx levels are initially 0 and that channels are 'off'. The SNAPI router will notify the NetLinx client upon a change
of state.
All Duet Virtual Devices should be created on port 1, e.g. 41000:1:0 in the following statements:
DEFINE_DEVICE
vdvModule = 41000:1:0
dvDevice = 135:1:0
DEFINE_MODULE 'LightModule' LightModule1 (vdvModule , dvDevice )
While it is possible to create a Duet Virtual Device on a port other than 1 and pass it to the Duet module, the behavior of the module is undefined.
Channel and Level Ranges
SNAPI uses only channels in range 1-299. Some channels are used for multiple functions but these channels belong to components that do not overlap within a
single device. For instance, HVAC and Display both use channel 214 for setFanState and setFreezeOn respectively. Some channels are used for the same function
in multiple components, for instance Video Conference and Display both define channel 191 for cyclePIPPosition. In both cases, this is by design.
Some devices may use custom channels for advanced functions. Channels 67-76 and 300-399 are reserved for modules to use for whatever functions they like. See
specific module documentation for details on the channels used in that module.
SNAPI uses Levels in the range 1-48. Some levels are used for the same function in multiple components, for instance HVAC, Pool/Spa and Weather all define
level 34 for Outdoor Temperature. This is by design.
Some device may use custom levels for advanced functions. Levels 50-80 and above are reserved for modules to use for whatever functions they like. See specific
module documentation for details on the levels used in that module.
Summary of Contents for CAFE DUET
Page 16: ...Standard NetLinx API SNAPI R 1 8 0 12 ...
Page 28: ...Standard NetLinx API SNAPI R 1 8 0 24 ...
Page 34: ...Standard NetLinx API SNAPI R 1 8 0 30 ...
Page 40: ...Standard NetLinx API SNAPI R 1 8 0 36 ...
Page 46: ...Standard NetLinx API SNAPI R 1 8 0 42 ...
Page 52: ...Standard NetLinx API SNAPI R 1 8 0 48 ...
Page 58: ...Standard NetLinx API SNAPI R 1 8 0 54 ...
Page 142: ...Standard NetLinx API SNAPI R 1 8 0 138 ...
Page 148: ...Standard NetLinx API SNAPI R 1 8 0 144 ...
Page 156: ...Standard NetLinx API SNAPI R 1 8 0 152 ...
Page 172: ...Standard NetLinx API SNAPI R 1 8 0 168 ...
Page 184: ...Standard NetLinx API SNAPI R 1 8 0 180 ...
Page 192: ...Standard NetLinx API SNAPI R 1 8 0 188 ...
Page 206: ...Standard NetLinx API SNAPI R 1 8 0 202 ...
Page 226: ...Standard NetLinx API SNAPI R 1 8 0 222 ...
Page 240: ...Standard NetLinx API SNAPI R 1 8 0 236 ...
Page 244: ...Standard NetLinx API SNAPI R 1 8 0 240 ...
Page 252: ...Standard NetLinx API SNAPI R 1 8 0 248 ...
Page 268: ...Standard NetLinx API SNAPI R 1 8 0 264 ...
Page 302: ...Standard NetLinx API SNAPI R 1 8 0 298 ...
Page 328: ...Standard NetLinx API SNAPI R 1 8 0 324 ...
Page 343: ...Standard NetLinx API SNAPI Devices 339 Standard NetLinx API SNAPI R 1 7 0 ...