Benutzer-Werkzeuge

Webseiten-Werkzeuge


t5_mqtthub

CAN Kommunikation

Heartbeat
Step From To Message
1 Client Hub HEARTBEAT(0x200|nr), len=8, data=uptime:32,interval:16,apimajor:8,apiminor:8
2 Hub Mqtt 'iot/heartbeat/' nr : '{"uptime":' uptime ',"interval":' interval ',"apiversion": apimajor '.' apiminor '}'
Step From To Message
1 Hub Client HUBBEAT(0x280), len=8, data=uptime:32,interval:16,0x0010:16
2 Hub Mqtt 'iot/heartbeat/hub' : '{"uptime":' uptime ',"interval":' interval '}'
JSON
Step From To Message
1 Client Hub JSON(0x240|nr), len=8, data=json
n-1 Client Hub JSON(0x240|nr), len=8, data=json
n Client Hub JSON(0x240|nr), len=6/7, data=frames:16, crc:16, jsonlen:16 [,heading=status(0),update(1):8]
n+1 Hub Mqtt 'iot/status/'/'iot/update/' nr : json
Step From To Message
1 Mqtt Hub 'iot/set/' nr : json
2 Hub Client JSON(0x240|nr), len=8, data=json
n-1 Hub Client JSON(0x240|nr), len=8, data=json
n Hub Client JSON(0x240|nr), len=6/7, data=frames:16, crc:16, jsonlen:16[,heading=set(2):8]

Note:

  1. The crc of the JSON completion frame pertains to all data frames for len=6, plus the completion frame itself (with the crc set to 0) for len=7
  2. Expect clients to have only a limited amount of memory at hand to process incoming JSON requests.
  3. Expect clients to implement only a limited form of JSON parsing, for instance only allowing integer numbers or strings as values.
  4. TODO: Are clients able to receive JSON data at high pace? Otherwise either the Hub should throttle or ACKs should be introduced.
  5. TODO: Include frames and jsonlen of last frame into crc.

MQTT Hub Kommunikation

Step From To Message
1 Hub Mqtt 'iot/heartbeat/hub': '{"uptime":' uptime ',"interval":' interval '}'
Step From To Message
1 Hub Mqtt 'iot/status/hub': '{"id":' deviceno ', "hw":"TEENSY40", "type":"mqtthub", "sw": "' sw '"}'
t5_mqtthub.txt · Zuletzt geändert: 2023/05/09 10:27 von sebastian