Is there a way to update a registered config_string?
I have added a wifiManager to my sketch so I can configure a WiFi AP if the device cannot connect to the last known AP. So I have registered a SSID and Password string. During startup I read the values after knx.load():
_SIDID_id = knx.register_config_string("sSID_ID", 50, WiFi.SSID());
_SIDPW_id = knx.register_config_string("sSID_PW", 50, WiFi.psk());
param_id = knx.register_config_int("My Parameter", default_val);
Serial.print("_SIDID_id ["); Serial.print(_SIDID_id); Serial.println("]");
Serial.print("_SIDPW_id ["); Serial.print(_SIDPW_id); Serial.println("]");
knx.load(); // Try to load a config from EEPROM
sSID_ID = knx.get_config_string(_SIDID_id);
sSID_PW = knx.get_config_string(_SIDPW_id);
Serial.print("Connect to AP ["); Serial.print(sSID_ID); Serial.println("]");
....
If the sSID_ID and sSID_PW does not make a WiFi connection I start the wifiManager to select the right AP. Then I want to save the new WiFi.SSID() and WiFi.pks() to te already registered positions ...
Hi Nico,
Is there a way to update a registered config_string?
I have added a wifiManager to my sketch so I can configure a WiFi AP if the device cannot connect to the last known AP. So I have registered a SSID and Password string. During startup I read the values after knx.load():
If the sSID_ID and sSID_PW does not make a WiFi connection I start the wifiManager to select the right AP. Then I want to save the new WiFi.SSID() and WiFi.pks() to te already registered positions ...
I tried:
but "__config_set_string()" is not public...
So, I created a public function:
... that does the trick! Any change you can put this patch in the master?
Same goes with update_config_int() i suppose ..
Regards