-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Aaron edited this page Jan 9, 2023
·
3 revisions
How does a device propagate its state into Indigo through the plugin?
sequenceDiagram
autonumber
participant device as Shelly Device
participant broker as MQTT Broker
participant indigo as Indigo
participant connector as MQTTConnector (Plugin)
participant plugin as ShellyNGMQTT (Plugin)
device->>broker: Turned on
broker-->>connector: Message received
connector->>indigo: Queue message
loop Check message queue
plugin-->>indigo: Process message
end
- The device is manually turned on (any device-originated change) and a message is sent to the MQTT Broker.
- MQTTConnector receives this message through the properly configured topic subscription.
- MQTTConnector queues the message for dispatch through Indigo's inter-plugin communication bus.
- ShellyNGMQTT continually polls Indigo for queued messages and processes them.
How does an Indigo action propagate to the device?
sequenceDiagram
autonumber
participant device as Shelly Device
participant broker as MQTT Broker
participant indigo as Indigo
participant connector as MQTTConnector (Plugin)
participant plugin as ShellyNGMQTT (Plugin)
indigo->>plugin: Turn on
plugin->>connector: Publish message
connector->>broker: Publish message
broker-->>device: Message received
- The device is turned on through the Indigo UI.
- Indigo notified ShellyNGMQTT of the action and the plugin generates and publishes a message through MQTTConnector.
- MQTTConnector publishes the message to the broker.
- The device receives the message through the MQTT topic subscription.