mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[mqtt.espmilighthub] Fix things do not come ONLINE if MQTT Client Status Topic not supplied. (#14877)
* Update readme and add new thing status message. Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
parent
4d811691e9
commit
39e285257e
@ -42,6 +42,9 @@ Leave this blank.
|
||||
**mqtt_state_topic_pattern:**
|
||||
`milight/states/:device_id/:device_type/:group_id`
|
||||
|
||||
**MQTT Client Status Topic:**
|
||||
`milight/status`
|
||||
|
||||
**group_state_fields:**
|
||||
IMPORTANT: Make sure only the following are ticked:
|
||||
|
||||
|
@ -487,7 +487,7 @@ public class EspMilightHubHandler extends BaseThingHandler implements MqttMessag
|
||||
updateStatus(ThingStatus.ONLINE);
|
||||
} else {
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
|
||||
"Milight Hub is not connected to your MQTT broker.");
|
||||
"Waiting for 'milight/status: connected' MQTT message to be sent from your ESP Milight hub.");
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
@ -537,6 +537,8 @@ public class EspMilightHubHandler extends BaseThingHandler implements MqttMessag
|
||||
return;
|
||||
}
|
||||
this.connection = connection;
|
||||
updateStatus(ThingStatus.UNKNOWN, ThingStatusDetail.CONFIGURATION_PENDING,
|
||||
"Waiting for 'milight/status: connected' MQTT message to be received. Check hub has 'MQTT Client Status Topic' configured.");
|
||||
connection.subscribe(fullStatesTopic, this);
|
||||
connection.subscribe(STATUS_TOPIC, this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user