I have progressed a bit on the issue.
I used eWeLink and it works perfectly, I can interact on the switch remotely. I took the oppotunity to upgrade the Sonoff M5 switch firmware.
After a unpair+ reset, the device is discovered by the Hubitat Elevation an start to pair , exchange keys, ask to search for Wifi networks and pass the Wifi WPA2-AES key.
Then it tries to connect and after a few minutes a error message is displayed :
"Pairing failed @ connecting device to
configured Wi-Fi network with code 172
(Internal error)"
Any idea ? Could it be the WIFI passphrase length that is not managed properly by the Hub ?
Thank you for your replies !
I confirm this is linked to passphrase length, I have replace the Wifi SSID password by a shorter one and the pairing went fine. (from 24 to 10 char long).
This is definitely a bug in the Hubitat elevation hub that seems to transmit a truncated chain as password.
I detected this issue, when I tried to pair successfully the switch with eWeKink and it worked perfectly with a long complex pwd.
Thank you