You aren't encoding the username and password in the URL, so if you're using any special character, that is a likely failure point. That's quite possibly not the issue here, but it's definitely something I'd suggest looking at in the future. Your catch will also throw its own exception because hubAction is not defined in its scope--definitely not the problem here, but something I'd fix.
To really test this, I'd suggest creating a smaller test case for yourself, perhaps a minimal driver where you forget the if and just literally set the value of this item, something like:
and see if that works, perhaps with and without the username and password.
If you believe it's a platform change causing the problem, you could also downgrade to 2.1.7 from the port 8081 diagnostic UI (be careful if you use Thermostat Manager, as noted in the release notes). If it doesn't work there either, you've ruled something out. If it does and breaks when you upgrade, perhaps you've discovered something.
I tried multiple ways and it simply does not work and I have no idea what version it changed in but I know it wasn't working in the last version either.
@bravenel please test on your side because it simply is not working on mine.