mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-26 15:21:41 +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:**
|
**mqtt_state_topic_pattern:**
|
||||||
`milight/states/:device_id/:device_type/:group_id`
|
`milight/states/:device_id/:device_type/:group_id`
|
||||||
|
|
||||||
|
**MQTT Client Status Topic:**
|
||||||
|
`milight/status`
|
||||||
|
|
||||||
**group_state_fields:**
|
**group_state_fields:**
|
||||||
IMPORTANT: Make sure only the following are ticked:
|
IMPORTANT: Make sure only the following are ticked:
|
||||||
|
|
||||||
|
@ -487,7 +487,7 @@ public class EspMilightHubHandler extends BaseThingHandler implements MqttMessag
|
|||||||
updateStatus(ThingStatus.ONLINE);
|
updateStatus(ThingStatus.ONLINE);
|
||||||
} else {
|
} else {
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
|
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 {
|
} else {
|
||||||
try {
|
try {
|
||||||
@ -537,6 +537,8 @@ public class EspMilightHubHandler extends BaseThingHandler implements MqttMessag
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.connection = connection;
|
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(fullStatesTopic, this);
|
||||||
connection.subscribe(STATUS_TOPIC, this);
|
connection.subscribe(STATUS_TOPIC, this);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user