diff -r 825210ba2707 -r 09b5efe0c633 thermferm/server.c --- a/thermferm/server.c Sat Apr 13 16:50:26 2024 +0200 +++ b/thermferm/server.c Sun Apr 14 12:46:02 2024 +0200 @@ -613,6 +613,7 @@ srv_send(s, (char *)"MQTT_PORT,%d", Config.mqtt_port); srv_send(s, (char *)"MQTT_USER,%s", Config.mqtt_username); srv_send(s, (char *)"MQTT_PASS,%s", Config.mqtt_password); + srv_send(s, (char *)"WEBSOCKET_PORT,%d", Config.websocket_port); srv_send(s, (char *)"."); return 0; } @@ -751,6 +752,14 @@ else Config.mqtt_password = NULL; + } else if (val && (strcmp(kwd, (char *)"WEBSOCKET_PORT") == 0)) { + if (sscanf(val, "%d", &ival) == 1) { + if (Config.websocket_port != ival) { + syslog(LOG_NOTICE, "Global Websocket port %d to %d", Config.websocket_port, ival); + Config.websocket_port = ival; + } + } + } } }