Switchbot Curtain through D1 mini esp32 and MQTT stopped working

A long time ago I followed the procedure at https://peyanski.com/home-assistant-switchbot-mqtt-esp32-integration/ to install and configure a D1 mini esp32 device to connect to MQTT and to a Switchbot curtain.

Everything was working fine. I had the Switchbot Curtain show up in Mosquitto broker. Then several days ago I accidentally disconnected the D1 mini esp32 device from the USB port it was connected to. I reconnected it but since then the status of the Switchbot Curtain has shown errorLocatingDevice in MQTT Explorer.

If I disconnect the D1 mini esp32 then it and Switchbot Curtain go missing from HA in and when I reconnect it then it shows backup in HA. However, it never shows any data that different from what it had after it was disconnected.

Based on the above, it seems as though the D1 mini esp32 is connecting fine to MQTT and HA is getting data fine from MQTT but the D1 mini esp32 isn’t ever able to connect to Switchbot curtain.

I have tried resetting the Switchbot curtain by holding down the button for 45 seconds but the only difference was that I had to recalibrate it in the application.

Does anyone have any ideas on what I could do so that D1 mini esp32 can talk to Switchbot Curtain again?