I'm getting the same thing, I need my app to commistion IoT devices by a professtional installer. Some divices support https and some not over the same URL.
Works fine if connecting to http first and then to https. But not the other way around. Still tries the https even though the URL is http.
Did you find a solution to make the switch from https to http work?