54
CONTENTS
Output:
1.3.6.1.2.1.229.1.2.1.8.5 = INTEGER: 259
Using SNMPv1 to enumerate the actual power states table:
$ snmpwalk -On -v 1 \
-c private \
192.168.0.100 \
1.3.6.1.2.1.229.1.2.1.9
Output:
1.3.6.1.2.1.229.1.2.1.9.1 = INTEGER: 257
1.3.6.1.2.1.229.1.2.1.9.2 = INTEGER: 257
1.3.6.1.2.1.229.1.2.1.9.3 = INTEGER: 259
1.3.6.1.2.1.229.1.2.1.9.4 = INTEGER: 257
1.3.6.1.2.1.229.1.2.1.9.5 = INTEGER: 259
1.3.6.1.2.1.229.1.2.1.9.6 = INTEGER: 257
1.3.6.1.2.1.229.1.2.1.9.7 = INTEGER: 257
1.3.6.1.2.1.229.1.2.1.9.8 = INTEGER: 257
You see that outlets 3 and 5 are on, and all others are off ; you can change outlet states as described above.
10.8
MQTT API
MQTT is an event-oriented protocol with a centralized publish/subscribe model, which makes it a bit awkward to use
for controlling devices; however, an implementation is included due to its popularity.
10.8.1
MQTT client settings
MQTT client configuration
Broker address:
192.168.0.5
Broker port:
1883
Use SSL:
Username:
Password:
Topic root:
pcr12345
Last Will and Testament topic:
Last Will and Testament payload:
Last Will and Testament QoS:
Submit
At most once
General MQTT settings
LPC9 can function as an MQTT client, so you need to have a configured MQTT broker which it could connect to;
then, other MQTT clients connected to the same broker could communicate with it (multi-broker configurations are
also possible but out of scope of this document). SSL and username/password authentication are supported (leave
empty to disable). The default port is 8883 when SSL is enabled, and 1883 otherwise.
Setting and reporting outlet state are performed by means of MQTT messages. MQTT messages carry topic
markers to identify their type. The topics are arranged in a '/'-separated hierarchy.
The 'Topic root' setting allows to prepend a common string to topics related to all outlets, e.g. to group messages
related to the same controller. It is advisable that you set a different topic root for every controller that you connect
to the same MQTT broker; otherwise, you'll get collisions unless you set different topic subtrees for their outlets.
Last Will and Testament functionality is included which allows the broker to notify you if the LPC9 unexpectedly goes
offline. Note that the topic of the message is not prefixed by the topic root.
DLI LPC9 User’s Guide: 1.7.24.0
Содержание LPC9
Страница 1: ...DLI LPC9 User s Guide 1 7 24 0 ...
Страница 81: ......