# Shelly Devices

- [Shelly Devices](#shelly-devices)
  - [1PM Mini Gen4](#1pm-mini-gen4)
    - [Setup 1PM Mini Gen4](#setup-1pm-mini-gen4)
    - [Install 1PM Mini Gen4](#install-1pm-mini-gen4)
  - [Shelly Plug US](#shelly-plug-us)
  - [Shelly BLU Motion](#shelly-blu-motion)
  - [Shelly BLU Door/Window](#shelly-blu-doorwindow)
    - [Reset](#reset)
  - [Shelly Flood](#shelly-flood)

## 1PM Mini Gen4

### Setup 1PM Mini Gen4

1. Cut 1 white and 3 black pieces of 14 gauge wire to 3" long.
2. Strip 1/4" from one side of each wire.
3. Strip 1/2" from the other side of each wire.
4. Connect the 1/4" side to the shelly. Tighten the screws until you can't turn them.
5. Push line and neutral into a standard outlet. The wider receptacle is neutral.
6. Press and hold the button for 10 seconds to factory reset. Light will flash on/off every 1/4 second.
7. Press and hold the button for 5 seconds to turn on AP mode. Light will flash on/off every 1/2 second.
8. Connect to shelly network.
9. Navigate to <http://192.168.33.1>.
10. Connect to wifi. The light should turn solid.
11. Update firmware.
12. Set a password for AP mode.
13. Turn off the AP.
14. In Unifi: Name the device, give it a fixed IP, set the icon.
15. Navigate to the Shelly website via its IP address.
16. Set a password for http access: Settings -> Authentication.
17. Name the device: Settings -> Device name.
18. Set Restore last known state of output/relay: Home -> Output -> Input/Output Settings.
19. Enable Zigbee: Zigbee -> Enable.
20. Connect Shelly to Home Assistant via Zigbee.
21. Change switch type: Click on switch control -> Settings -> Show as.

### Install 1PM Mini Gen4

1. Cut 1 3" white wire for neutral bridge.
2. Cut 2 3" black wires for line bridge and light switch input.
3. Prepare 4 14 gauge wire connectors.

## Shelly Plug US

1. Connect to WiFi
2. Set password for AP
3. Disable AP
4. Set password for device authentication
5. Set Restore last known state of output/relay
6. Set Device Name
7. Enable Bluetooth Gateway
8. Update Firmware

## Shelly BLU Motion

1. Download and install the Shelly Debug app
2. Follow the instructions in the app to connect the device
3. Update the firmware
4. Enable encryption (generate a 6 digit code)
5. "Read" from the device and copy the encryption key for home assistant

## Shelly BLU Door/Window

1. Download and install the Shelly Debug app
2. Follow the instructions in the app to connect the device
3. Update the firmware
4. Create a new "login" in Bitwarden called "Shelly BLU DW " + name of device
   1. Password will be the encryption key
   2. Website should be the MAC address of the Shelly
5. Generate a 6 digit code, send it to your phone then throw it away
6. In the Shelly Debug app, enable encryption using the 6 digit code
7. Copy the encryption and store in the password field
8. Add to Home Assistant
9. Unpair from Phone

### Reset

Resetting is super finnicky. You'll need to plug it in, press and hold the power button until the
red light flashes quickly (not slowly, that's a reboot). You'll probably have to do it multiple
times because they seem to reboot halfway through the reset process.

## Shelly Flood

1. In the web interface, ensure "CoIoT" is enabled and pointing to `<home assistant ip>:5683`.
   Allow 5683/udp from shelly flood to home assistant. If you don't do this Shelly Flood will
   not report its status correctly!