
56
CONTENTS
you'll see the current state, but the program will wait for more state messages and print the states as they arrive; if
you flip the outlet, you'll see output like this:
0
1
0
1
etc.
To change the state of the first outlet, use the mosquitto_pub command, e.g. to switch it on use:
mosquitto_pub -h 192.168.0.5 -t pcr12345/outlets/0/set -m 1
and to switch it off use:
mosquitto_pub -h 192.168.0.5 -t pcr12345/outlets/0/set -m 0
As mentioned
, alternate value forms, e.g.
mosquitto_pub -h 192.168.0.5 -t pcr12345/outlets/0/set -m true
mosquitto_pub -h 192.168.0.5 -t pcr12345/outlets/0/set -m on
will also work as expected.
DLI LPC9 User’s Guide: 1.7.24.0
Summary of Contents for LPC9
Page 1: ...DLI LPC9 User s Guide 1 7 24 0 ...
Page 81: ......