Unable to connect in AP mode

  • I recently purchased a set of 4 shellyplug US (shellyplugu1) switches. Using my laptop, I paired two of them them same way I've paired numerous other shelly switches -- energize, select the SSID of the device, bring up 192.168.33.1 in browser, enter my WiFi credentials in the client mode config screen and save.


    The other two have been a complete pain to set up. I have spent hours trying to get connected to these other two plugs. I've performed the factory reset numerous times (energize, press and hold switch button for 10 seconds and the red/blue LEDs are blinking) but hasn't helped.


    Here's the procedure I've been following:

    1. energize (plug in) the shelly plug.
    2. blue LED starts blinking slowly.
    3. Select shellyplugu1-XXXXXX from list of WiFi networks and attempt connection.

    At this point one of two things happens:

    • the blue led will go out (no red LED either)
    • --OR--
    • the blue led will stay on solid (and no red LED)

    In either case no WiFi connection is made and the push button is no longer responsive. I believe the unit is in some sort of wedged state at this point. Within 45-60 seconds the unit seems to reset and the blue led will start slow blinking again as if it'd been newly energized.


    Every so often I can get connected to the shellyplug, but only for a few seconds -- not long enough to perform any configuration.


    I've opened a trouble ticket with Shelly support, but after sending them a video of me trying to connect to these plugs I haven't heard anything in several days so I thought I'd try here.


    I let the two problematic plugs sit for a few days. Today I decided to try again and I managed to get connected to one of them and configure client access mode. In that case I'd pressed the button once so that the red and blue LEDs were slow blinking and was able to connect. I tried to repeat this same procedure with the second problematic plug but no luck.


    Part of what's confusing here is the documentation says the unit is in AP mode if both red and blue LEDs are blinking, but my own experience would indicate that one can typically only connect in AP mode if just the blue LED is slow blinking. This reddit thread also indicates that the documentation is suspect and slow blue blink mode is the AP connection mode.


    I've run out of new things to try so I'm going to unplug and let this sit a few days and try again.


    Regards,

    -Jason

  • I'm having this exact same issue. Same steps, same behavior with the lights. Purchased as part of a two pack of plugs and the first one setup quickly, but the second one cannot connect at all

  • I just got mine as well, and it's doing the EXACT same behavior. No red LED's blinking ever, ONLY blue, and as soon as I get connected it seems to reset.

  • Suggest you open a support ticket. They're very reasonable and responsive. Just keep in mind that they're working out of the EU (Bulgaria, perhaps?) so if you're in the States like me you'll typically get replies overnight. Nice to wake up to. :)


    Regarding my two original units, I finally got the third one to pair long enough to get it in to client mode, but the fourth I had to get warranty replaced (which is done with a coupon code for the store -- you get to keep the broken unit(s)).


    Fast forward to last week -- this probably deserves a thread of its own. Received 8 more plugs. I'll preface all this by saying that I typicall work in a Mac ecosystem (desktop/laptop/tablet/phone). So I unbox all 8 of these units and NONE of them will pair. Same bahavior as before: see, the AP but when try to connect the plug freezes up. I try my desktop, laptop, iPad, phone....nothing mac works.


    At this point I'm pretty sure that all 8 units aren't defective, so I boot up a RPi4 running Linux, configure WiFi and right away I get an address, connect to it with the RPi and configure for client mode. So, something mac is doing with WiFi is incompatible with the plugs? Because I've configured many other models of Shellies (1, 1P, 2.5, EM, RGB2, DW2, i3) with my Macs and NEVER had this issue. For me, this is entirely unique to the shellyplugus1.


    I continue with the other shellyplugs and I eventyally get 6 out of 8 confugured. Of the remaining 5 I configured with LInux it often took multiple power cycles before I could associate with the AP long enough to configure for client mode, so while LInux eventually got the job done it wasn't problem-free.


    Two of the 8 new ones failed. With these units, 90% of the time you'll get a brief red/blue blip at power on and then either no LED or LED will blink blue for a bit and go solid blue -- at which point they're wedged. I contacted support, provided them a video of my troubleshooting, and got a coupon code for two replacements the next day..


    I do not think that Allterco Robotics is the OEM for the shellyplugus units in the same way they are for other shellies I've purchased. I've seen pictures of a unit that's the spitting image of a shellyplugus but is not Shelly branded. The lack of convenient headers is another indication that these may not be Allterco OEM -- but just guessing.


    I did take one of the broken ones apart and if you desolder the hot and neutral plugs, on the back by where the board with the ESP8266 attaches there are two solder pads labelled TX and RX. I was going to see if I could re-flash these units, but none of the other pins are labelled, so I don't know which pin GPIO0 is (have to ground it momentarily as part of the flashing procedure). I'm going to try using the button to see if maybe that's linked to GPIO0. Otherwise it's trial and error. Will post if I come up with anything. Even if I do it's kind of a pain getting to the non-component side of the board.


    -Jason

  • I received my two replacement shellyplugus' today. Same behavior on Apple equipment. Had a Windows10 laptop. No joy with that either. This is kind of insane. Only thing that works for me is using a Raspberry Pi 4 running Linux.


    I wrote a script to aid in configuring these plugs to client mode.


    Code
    while : ; 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

    You'll need to replace the strings YOUR_WIFI_SSID and YOUR_WIFI_PASSWORD accordingly. Be sure to "url encode" any special characters (e.x. "my passwd" => "my%20passwd"). These are the settings of you existing WiFi network you want to configure the shellyplug to use.


    I used the following procedure to more quickly configure my plugs for client mode without a browser.

    Start with the plug powered off/deenergized.


    Procedure:

    1. 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.
    2. 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.
    3. Turn on/energize the shelly plug.

    If you're successful you'll see something like the following:


    Code
    [...]
    curl: (28) Connection timed out after 1001 milliseconds
    curl: (28) Connection timed out after 1001 milliseconds
    curl: (28) Connection timed out after 1001 milliseconds
    {"enabled":true,"ssid":"YOUR_WIFI_SSID","ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null}


    Else you'll just keep seeing the "connection timed out" messages.

    Like before you may have to power cycle the plug several times before it even goes into Access Point mode.


    Although not tested, there's no reason this script shouldn't on any system with a Bourne compatible shell and curl. The whole point is to rapidly hammer requests to the shelly so as soon as you can associate to its WiFi and get an address that the configuration request is sent before it wedges.


    Good luck!

    -Jason

  • Jason,


    I just used your method after experiencing the exact same symptoms and frustration with my brand new Shelly Plug US. Like you, I tried Windows, Mac, and even iOS and Android and could not get any of them to retain a connection to the plug in AP mode to configure the settings. I've had no similar problems with my Shelly 1, 1L, 2.5, or Dimmer2 units.


    I'm pleased to say that manually configuring my Raspberry Pi 3b+ with the SSID and running your shell script worked like a charm and now my Shelly Plug US is happily on my home WiFi network.


    Cheers to you, sir!

    -Mat

  • I wrote a script to aid in configuring these plugs to client mode.

    Code
    while : ; 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:

    1. 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.
    2. 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.
    3. 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

  • Clearly these devices have some software problems that don't inspire confidence.

    Indeed. Having purchased 15 of these and having them be unusable with stock Shelly firmware due to random hangs/going offline and random momentary power cycles I decided to try the Tasmota firmware. I'm happy to report that in the three days since I started using Tasmota, all 10 of the switches I have in production have been 100% solid. Tasmota also gives you the ability to calibrate the units to a known accurate voltage/current/power settings, which is really nice.

  • Just a quick note that curl's --connect-timeout option can take decimal values for sub-second timeouts.

    I had a particularly problematic switch which only made it to AP mode about one in 10 times I energized it and despite seeing its SSID appear I wasn't able to successfully send the configuration request before it locked up. I changed the timeout to .5 and finally got it on the next time the SSID appeared, so I think the shorter timeout helped.

  • FYI I used this script on a MacBook, as I see have others, and it worked well. Thx for the script!

  • Not that I have plug that is configured and connecting to my network, it drops off the network frequently and the only way to get it working again is to unplug it and plug it back in. Stays connected anywhere from a few hours to a few days.


    Anyone have solutions for this? There is a new firmware release coming out real soon now -- maybe that will help.

  • I ordered 4 plugs and have had nothing but troubles. One was able to pair in the smartphone app right away - the other three kept dropping off wifi when trying to pair and restarting. Eventually got two working and the other would work after trying over 10 times. Came back to it weeks later and finally paired.


    When paired, only 1 would load device status in the app. The others almost always show "offline" and only show as "online" about 1/5 refreshes. Thus I connected them to shelly cloud to see their status all the time. I also tried updating firmware but none of the firmware updates were successful and/or the previous firmware version ID is listed as "up to date" after the update procedure.


    After 2 days, they no longer are synced to shelly cloud and are always "offline", meaning totally inaccessible in the app. Meanwhile, one of the plugs randomly turns off the relay.


    To say there are "minor software problems" is a massive understatement.

  • Something is clearly wrong with the US Plug hardware I have 2 of 4 from Shelly directly with this issue and the are replacing Dec ship date. And just had 3 of 6 ordered from AmeriDroid with this issue. Basically 50% DOA on 10 devices. You can tell some of the switches are odd even at power up so likely a hardware issue unless they have two firmwares shipping.