Clear MQTT topics on boot
This commit is contained in:
@@ -39,6 +39,7 @@ void NukiNetworkOpener::initialize()
|
||||
_network->initTopic(_mqttPath, mqtt_topic_config_action, "--");
|
||||
_network->subscribe(_mqttPath, mqtt_topic_config_action);
|
||||
|
||||
_network->initTopic(_mqttPath, mqtt_topic_query_keypad, "0");
|
||||
_network->initTopic(_mqttPath, mqtt_topic_query_config, "0");
|
||||
_network->initTopic(_mqttPath, mqtt_topic_query_lockstate, "0");
|
||||
_network->initTopic(_mqttPath, mqtt_topic_query_battery, "0");
|
||||
@@ -47,6 +48,20 @@ void NukiNetworkOpener::initialize()
|
||||
_network->subscribe(_mqttPath, mqtt_topic_query_config);
|
||||
_network->subscribe(_mqttPath, mqtt_topic_query_lockstate);
|
||||
_network->subscribe(_mqttPath, mqtt_topic_query_battery);
|
||||
|
||||
_network->initTopic(_mqttPath, mqtt_topic_keypad_json_action, "--");
|
||||
_network->initTopic(_mqttPath, mqtt_topic_timecontrol_action, "--");
|
||||
_network->initTopic(_mqttPath, mqtt_topic_auth_action, "--");
|
||||
_network->initTopic(_mqttPath, mqtt_topic_lock_retry, "0");
|
||||
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_config_action_command_result);
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_keypad_command_result);
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_keypad_json_command_result);
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_timecontrol_command_result);
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_auth_command_result);
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_query_lockstate_command_result);
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_lock_completionStatus);
|
||||
_network->removeTopic(_mqttPath, mqtt_topic_lock_action_command_result);
|
||||
|
||||
if(_disableNonJSON)
|
||||
{
|
||||
@@ -94,21 +109,17 @@ void NukiNetworkOpener::initialize()
|
||||
_network->subscribe(_mqttPath, mqtt_topic_keypad_command_enabled);
|
||||
}
|
||||
|
||||
_network->initTopic(_mqttPath, mqtt_topic_query_keypad, "0");
|
||||
_network->initTopic(_mqttPath, mqtt_topic_keypad_json_action, "--");
|
||||
_network->subscribe(_mqttPath, mqtt_topic_query_keypad);
|
||||
_network->subscribe(_mqttPath, mqtt_topic_keypad_json_action);
|
||||
}
|
||||
|
||||
if(_preferences->getBool(preference_timecontrol_control_enabled, false))
|
||||
{
|
||||
_network->initTopic(_mqttPath, mqtt_topic_timecontrol_action, "--");
|
||||
_network->subscribe(_mqttPath, mqtt_topic_timecontrol_action);
|
||||
}
|
||||
|
||||
if(_preferences->getBool(preference_auth_control_enabled))
|
||||
{
|
||||
_network->initTopic(_mqttPath, mqtt_topic_auth_action, "--");
|
||||
_network->subscribe(_mqttPath, mqtt_topic_auth_action);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user