Fix MQTT client configuration and add image analysis improvements
- Updated MQTT client to use MQTTv5 without deprecated `clean_session` to resolve ValueError. - Fine-tuned color thresholds for better dayglo detection accuracy. - Added cropping to focus analysis on the central area of the image for improved rating calculation. - Provided command-line option for analyzing specific images, enabling debugging and fine-tuning.
This commit is contained in:
@@ -131,7 +131,7 @@ if len(sys.argv) > 1:
|
||||
print(f"File not found: {image_file}")
|
||||
|
||||
# Set up MQTT client for normal operation
|
||||
client = mqtt.Client(client_id='', clean_session=True, protocol=mqtt.MQTTv5)
|
||||
client = mqtt.Client(protocol=mqtt.MQTTv5)
|
||||
client.username_pw_set(MQTT_USERNAME, MQTT_PASSWORD)
|
||||
client.on_connect = on_connect
|
||||
client.on_message = on_message
|
||||
|
||||
Reference in New Issue
Block a user