You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/mqtt.pm
+16-9
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,7 @@ my $msg_id = 1;
195
195
my$blocking_read_timeout = .5;
196
196
197
197
my%MQTT_Data;
198
+
my$init_global_v_cmd = 0;
198
199
199
200
# $main::Debug{mqtt} = 0;
200
201
@@ -1049,17 +1050,24 @@ sub get_voice_cmds {
1049
1050
1050
1051
#a bit of a kludge to pass along the voice command option, get the said value from the voice command.
1051
1052
my$object_name = $self->get_object_name();
1053
+
my%global_voice_cmds = (
1054
+
"<global> -- List all mqtt interfaces to the print log"=>"&mqtt::print_interface_list()",
1055
+
"<global> -- Publish current states of all local items"=>"&mqtt_LocalItem::publish_current_states()",
1056
+
"<global> -- Write all discovered items to <data_dir>/mqtt_discovered_items.mht.gen"=>"&mqtt::write_discovered_items( '$::config_parms{data_dir}/mqtt_discovered_items.mht.gen' )",
1057
+
);
1052
1058
my%voice_cmds = (
1053
-
"List all mqtt interfaces to the print log"=>"${object_name}->print_interface_list()",
1054
-
"List retained topics for $command"=>"${object_name}->list_retained_topics()",
1055
-
"Publish discovery data for $command"=>"${object_name}->publish_discovery_data()",
1056
-
"Publish current states of all local items"=>"mqtt_LocalItem::publish_current_states()",
1057
-
"Cleanup discovery info on $command and republish"=>"${object_name}->cleanup_discovery_topics()",
1058
-
"Cleanup all retained topics on mqtt server $command and republish (BE CAREFUL)"=>"${object_name}->cleanup_all_retained_topics()",
1059
-
"Write all discovered items to <data_dir>/mqtt_discovered_items.mht.gen"=>"&mqtt::write_discovered_items( '$::config_parms{data_dir}/mqtt_discovered_items.mht.gen' )",
1059
+
"$command -- List retained topics"=>"${object_name}->list_retained_topics()",
0 commit comments