diff --git a/src/sa/model/index.md b/src/sa/model/index.md index b34ea25..9b6f222 100644 --- a/src/sa/model/index.md +++ b/src/sa/model/index.md @@ -779,7 +779,7 @@ Exceed: Redesign based on >3 reused components (1 Logical View, >1 Process View, Components TBD: - https://github.com/hap-java/HAP-Java -- https://github.com/tlaukkan/zigbee4java +- https://github.com/tlaukkan/MQTT4java - instances of the PostgreSQL 15 RDBMS ([sources here](https://github.com/postgres/postgres) and [specification here](https://www.postgresql.org/docs/15/index.html)), a _free as in beer_ and FOSS piece of software. - https://spring.io/projects/spring-boot @@ -803,8 +803,8 @@ component "IoT Devices" as IOT { [HomeKit smart device] as HD <> [HomeKit smart sensor] as HS <> - [Zigbee smart device] as ZD <> - [Zigbee smart sensor] as ZS <> + [MQTT smart device] as ZD <> + [MQTT smart sensor] as ZS <> HD--HDF HS--HSF @@ -829,12 +829,12 @@ component "Users and Devices" as DEV { interface " " as WSSF [HAP-java] as HAP <> - [zigbee4java] as ZIG <> + [paho.mqtt.java] as ZIG <> [Device Engine] as DI note left of DI: Already implemented using Spring Boot - [Spring WebSocket API] as WSS <> + [javax.websocket API] as WSS <> [User and Device DB <$database{scale=0.33}> (PostgreSQL)] <> as DIDB HDF )-- HAP @@ -898,8 +898,8 @@ title Process View: UI updates state of device box "IoT Devices" participant "HomeKit dev." as HD participant "HomeKit sens." as HS - participant "Zigbee dev." as ZD - participant "Zigbee sens." as ZS + participant "MQTT dev." as ZD + participant "MQTT sens." as ZS end box box "User Interface" @@ -908,11 +908,11 @@ box "User Interface" end box box "Users and Devices" + participant "javax.websocket" as WSS participant "HAP-java" as HAP - participant "zigbee4java" as ZIG + participant "paho.mqtt.java" as ZIG participant "Engine" as DI participant "DB" as DIDB - participant "Spring WS API" as WSS end box box "Triggers and Automations" @@ -925,11 +925,15 @@ box "Scenes" participant "DB" as SCDB end box -UI -> DI: request state update -DI -> ZD: apply new state -ZD -> DI: report successful application -DI -> DIDB: store new state -DI -> UI: display new state +UI -> DI: update state (HTTP PUT) +DI -> ZIG: client.publish(\n TOPIC,\n new MqttMessage(...)\n);\n(request state update) +ZIG -> ZD: PUBLISH\n(state update request) +ZD -> ZIG: PUBLISH\n(new state) +ZIG -> DI: subscriber.subscribe(...) observer called \n(successful application) +DI -> DIDB: JDBC transaction (UPDATE)\n(store new state) +DI -> WSS: s.getBasicRemote().sendText(...)\n(send new device state) +WSS -> WSC: WebSocket protocol +WSC -> UI: connection.onmessage called\n(new device state received, updates UI) DI -> T: report latest device state skinparam monochrome true