I wrote a script to aid in configuring these plugs to client mode.
Codewhile : ; do curl --connect-timeout 1 \ 'http://192.168.33.1/settings/sta?enabled=1&ssid=YOUR_WIFI_SSID&key=YOUR_WIFI_PASSWORD&ipv4_method=dhcp' [ $? = 0 ] && break done
Procedure:
- Start the above script in a dedicated terminal/shell. Every second you should see an error message from curl such as "curl: (28) Connection timed out after 1000 milliseconds". This is normal. Curl only waits one second for a connection. If no connection was made, curl exits and the script loops and starts curl again. The goal is to send the configuration request as soon as the shellyplug enters AP mode -- and before it locks up. The script will exit if curl was successful in sending the config request to the shellyplug.
- Configure the WiFi on your Linux machine to associate to the SSID of the shelly you're trying to configure. The SSID of the plug is 'shellyplugu1-XXXXXX' where XXXXXX is a hexadecimal identifier of the SSID your plug uses. There is no password.
- Turn on/energize the shelly plug.
Good luck!
-Jason
Jason, thanks for this idea and script -- it worked for me! I had a "US" plug that I could not connect to any other way. After a few attempts I was able to associate with its AP long enough for cURL to pump the WiFi credentials over. I used a MacBook. Clearly these devices have some software problems that don't inspire confidence.
Thanks again.
Ryan