Closed sisamiwe closed 3 years ago
The wildcards don't make sense in the context of the MQTT client status topic. The client status indicates whether or not the hub itself is online. Happy to continue discussion or answer questions, but gonna close this one.
Describe the bug
Putting in a MQTT Topic using single-level wildcards into MQTT Client Status Topic the current code will not leverage the wildcards. MQTT Topic put in: MILIGHT/:device_id/:device_type/:group_id/LWT Publish: "MILIGHT/:device_id/:device_type/:group_id/LWT {"status":"disconnected_clean","firmware":"milight-hub","version":"1.10.7","ip_address":"192.168.2.29","reset_reason":"Software/System restart"}"
Steps to reproduce
See above
Expected behavior
My expectation is that the wildcards for the status topic get also leverages as for the other topics
Setup information
Firmware version
1.10.7
Output of http://milight-hub.local/about
{"firmware":"milight-hub","version":"1.10.7","ip_address":"192.168.2.29","reset_reason":"Software/System restart","variant":"d1_mini","free_heap":16552,"arduino_version":"2_4_2","queue_stats":{"length":0,"dropped_packets":0}}
Output of http://milight-hub.local/settings
{"admin_username":"","admin_password":"","ce_pin":16,"csn_pin":15,"reset_pin":0,"led_pin":-2,"radio_interface_type":"nRF24","packet_repeats":50,"http_repeat_factor":1,"auto_restart_period":0,"mqtt_server":"192.168.2.14:1883","mqtt_username":"","mqtt_password":"","mqtt_topic_pattern":"MILIGHT/:device_id/:device_type/:group_id","mqtt_update_topic_pattern":"MILIGHT/:device_id/:device_type/:group_id/update","mqtt_state_topic_pattern":"MILIGHT/:device_id/:device_type/:group_id/state","mqtt_client_status_topic":"MILIGHT/:device_id/:device_type/:group_id/LWT","simple_mqtt_client_status":false,"discovery_port":48899,"listen_repeats":3,"state_flush_interval":10000,"mqtt_state_rate_limit":500,"mqtt_debounce_delay":500,"mqtt_retain":true,"packet_repeat_throttle_sensitivity":0,"packet_repeat_throttle_threshold":200,"packet_repeat_minimum":3,"enable_automatic_mode_switching":false,"led_mode_wifi_config":"Fast toggle","led_mode_wifi_failed":"On","led_mode_operating":"Off","led_mode_packet":"Flicker","led_mode_packet_count":3,"hostname":"milight-hub","rf24_power_level":"MAX","rf24_listen_channel":"LOW","wifi_static_ip":"","wifi_static_ip_gateway":"","wifi_static_ip_netmask":"","packet_repeats_per_loop":10,"home_assistant_discovery_prefix":"","wifi_mode":"n","default_transition_period":500,"rf24_channels":["LOW","MID","HIGH"],"device_ids":[4661,4662,8496],"gateway_configs":[[8496,8899,5],[4661,8898,5]],"group_state_fields":["state","status","brightness","level","hue","saturation","color","mode","color_temp","bulb_mode","computed_color","effect"],"group_id_aliases":{"Drum":["rgb_cct",4662,1],"Globe 50":["rgb_cct",4661,1],"Wohnzimmer_Decke":["rgbw",8496,1],"Wohnzimmer_TV":["rgbw",8496,3],"Wohnzimmer_TVSchrank":["rgbw",8496,4],"Wohnzimmer_Wandschrank":["rgbw",8496,2]}}
Additional context