NSPanelManager icon indicating copy to clipboard operation
NSPanelManager copied to clipboard

Temperature Calibration set causes MQTTManager to crash.

Open eelco2k opened this issue 1 month ago • 1 comments

Describe the bug After setting a value in "Temperature calibration" on the Settings page of an NSPanel. The MQTTManager crashes and returns this in de docker logs:

[2025-11-14 23:17:51.804] [debug] [nspanel.cpp:230] [38] Loaded NSPanel 1::SLAAPKAMER, type: EU. Sending config.
[2025-11-14 23:17:51.804] [info] [nspanel.cpp:245] [38] Sending config over MQTT for panel 1::SLAAPKAMER
[2025-11-14 23:17:51.805] [trace] [mqtt_manager_config.hpp:257] [38] Found setting min_button_push_time with value 50
[2025-11-14 23:17:51.805] [trace] [mqtt_manager_config.hpp:257] [38] Found setting button_long_press_time with value 300
[2025-11-14 23:17:51.805] [trace] [mqtt_manager_config.hpp:257] [38] Found setting special_mode_trigger_time with value 300
[2025-11-14 23:17:51.805] [trace] [mqtt_manager_config.hpp:257] [38] Found setting special_mode_release_time with value 5000
[2025-11-14 23:17:51.805] [trace] [mqtt_manager_config.hpp:257] [38] Found setting screen_dim_level with value 100
[2025-11-14 23:17:51.805] [trace] [mqtt_manager_config.hpp:257] [38] Found setting screensaver_dim_level with value 1
[2025-11-14 23:17:51.805] [trace] [mqtt_manager_config.hpp:257] [38] Found setting screensaver_activation_timeout with value 16000
[2025-11-14 23:17:51.806] [trace] [mqtt_manager_config.hpp:257] [38] Found setting clock_us_style with value False
[2025-11-14 23:17:51.807] [trace] [mqtt_manager_config.hpp:257] [38] Found setting light_turn_on_brightness with value 50

terminate called after throwing an instance of 'std::invalid_argument'

  what():  stoi

I do not have any extra hardware sensor attached within the SonOff / NSPanel. Not sure if that creates the problem ?? Also perhaps it does not acceps "1,65" with "," as a number...?? and also not a negative number??? like "-3.4" or "-3,4" ???

Furthermore in sqlite file, web_nspanelsettings table. 4 new values have been added with NULL values in it:

button1_relay_lower_temperature      NULL
button1_relay_upper_temperature     NULL
button2_relay_lower_temperature     NULL
button2_relay_upper_temperature    NULL

Environment info (please complete the following information):

  • NSPanelManager version: 2.0-devel branch
  • NSPanel Firmware version: 0.3.767

eelco2k avatar Nov 15 '25 10:11 eelco2k

Hey, thanks for reporting back. Are you running the devel branch or beta? Shouldn't matter any way. I can't replicate this but value do you actually have set? Is it "-3.4" or "-3,4"? I can see there being an issue with the comma and not the dot. For my region I can't set a comma in that field.

tpanajott avatar Nov 22 '25 16:11 tpanajott