Shelly integration no longer works

Home Assistant fails to discover my Shelly 1PM devices.
I did have a unit working for a few months then it failed - I think it had an over temperature problem. I tried a new replacement unit but it does not get discovered by Home Assistant. I can access both the old and new devices by their IP address. The only possible cause I can think of is that I have enabled cloud access using Nabu Casa.
When I try to add the Shelly integration specifying the host IP address I get error message “Failed to connect”.
ANy help appreciated.