Mqtt » History » Version 5
Frédéric Blanc, 2020-01-17 13:28
1 | 1 | Frédéric Blanc | h1. Mqtt |
---|---|---|---|
2 | |||
3 | !mqtt001.png! |
||
4 | 2 | Frédéric Blanc | |
5 | Controller Subscribe: |
||
6 | 3 | Frédéric Blanc | |
7 | <pre><code> |
||
8 | 4 | Frédéric Blanc | %sysname%/+/+/set |
9 | </code></pre> |
||
10 | |||
11 | Controller Publish: |
||
12 | |||
13 | <pre><code> |
||
14 | %sysname%/%tskname%/%valname% |
||
15 | </code></pre> |
||
16 | |||
17 | Controller LWT Topic: |
||
18 | |||
19 | <pre><code> |
||
20 | %sysname%/$state |
||
21 | 3 | Frédéric Blanc | </code></pre> |
22 | 5 | Frédéric Blanc | |
23 | h2. publication par les règles en json |
||
24 | |||
25 | !mqtt002.png! |
||
26 | |||
27 | |||
28 | <pre><code> |
||
29 | On System#Boot do |
||
30 | Publish fb/%sysname%/IP,%ip% |
||
31 | timerSet,1,60 |
||
32 | endon |
||
33 | |||
34 | On Rules#Timer=1 do |
||
35 | Publish fb/%sysname%/json,'{"rssi":%rssi%,"temp65CF":[temp65CF#Temperature]}' |
||
36 | timerSet,1,60 |
||
37 | endon |
||
38 | </code></pre> |