Shelly Plug US Bluetooth Proxy

Obtained a Shelly plug in hopes of using it to extend the Bluetooth from my Yale lock. The plug is configured and updated to the latest firmware (.12). HA recognizes and can control it. I’ve configured the Shelly integration for active Bluetooth. HA is at the latest (2022.12.3). The plug is 3’ from the lock and I can see the lock’s address coming through the Shelly integration in the logs. However, the Yale integration still doesn’t see the lock. Is there anything else I need to configure to connect the Shelly and Yale integrations?

I have the Bluetooth integration running on my platform (RPi3) and another Yale lock that it can control just fine (as it’s close enough to the RPi).

I’m in the same situation. I have 2 Yale locks. My RPI is close to one of them, and see’s it just fine. I’ve added a Shelly 1 Plus to my home, adjacent to the other lock, and put the Bluetooth in active mode. i’m unclear if I need to do anything else.

Unless there’s something else to configure, my guess is the Shelly Bluetooth proxy isn’t working quite right yet. I just read another thread where the poster was able to get ESPHome Bluetooth proxy working with his Yale lock.

The Shellys only support Bluetooth advertisements and don’t make active ble connections

Check the Bluetooth integration docs for a full list of what is supported by each remote adapter

2 Likes

Well that’s unfortunate. I had hoped the Shelly could be a nicely packaged and integrated Bluetooth Proxy device.

The only other similar device I’ve found is the SwitchBot Plug Mini (after some work):

Thanks!

would flashing the shelly plus with ESPHome make it work for Yale locks?

I tried flashing my Shelly Plus 1PM. I was able to get ESPhome on it, but my Shelly Plus 1PM (v2.0.0 printed on the circuit board) came with 80 mhz single core cpu. Despite my best effort i wasnt able to get wifi and bluetooth to work on it using ESPHome IDF framework. Whenever I enabled bluetooth_proxy the devices wouldn’t even connect to wifi.

If anyone else has success do let me know. Alternatively if anyone knows of a esp32 dual core device which comes with ac power input and similar size as shelly plus devices that would be great too.

Logs from Device:

Using 'COM4' as serial port.
Showing logs:
[22:01:58][D][wifi:401]: Found networks:
[22:01:58][I][wifi:445]: - 'masked-iot' (ZZ:2A:ZZ:CA:95:22) ▂▄▆█
[22:01:58][D][wifi:446]:     Channel: 6
[22:01:58][D][wifi:447]:     RSSI: -30 dB
[22:01:58][I][wifi:445]: - 'masked-iot' (ZZ:EC:ZZ:A4:92:63) ▂▄▆█
[22:01:58][D][wifi:446]:     Channel: 6
[22:01:58][D][wifi:447]:     RSSI: -56 dB
[22:01:58][I][wifi:445]: - 'masked-iot' (XX:EC:XX:A4:C6:5E) ▂▄▆█
[22:01:58][D][wifi:446]:     Channel: 6
[22:01:58][D][wifi:447]:     RSSI: -76 dB
[22:01:58][I][wifi:445]: - 'masked-iot' (XX:2A:XX:54:2C:98) ▂▄▆█
[22:01:58][D][wifi:446]:     Channel: 9
[22:01:58][D][wifi:447]:     RSSI: -78 dB
[22:01:58][I][wifi:445]: - 'masked-iot' (XX:EC:XX:A4:33:25) ▂▄▆█
[22:01:58][D][wifi:446]:     Channel: 6
[22:01:58][D][wifi:447]:     RSSI: -81 dB
[22:01:58][I][wifi:445]: - 'masked-iot' (XX:EC:XX:32:B1:95) ▂▄▆█
[22:01:58][D][wifi:446]:     Channel: 1
[22:01:58][D][wifi:447]:     RSSI: -87 dB
[22:01:58][D][wifi:450]: - 'masked' (XX:2A:A8:CA:95:XX) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked-admin' (XX:2A:A8:CA:95:22) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked-admin' (XX:EC:DA:A4:92:63) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked' (XX:EC:DA:A4:92:63) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked' (XX:EC:DA:A4:C6:5E) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked-admin' (XX:EC:DA:A4:C6:5E) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked' (XX:2A:A8:54:2C:98) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked-admin' (XX:2A:A8:54:2C:98) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked' (XX:EC:DA:A4:33:25) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked-admin' (XX:EC:DA:A4:33:25) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked-admin' (XX:EC:DA:32:B1:95) ▂▄▆█
[22:01:58][D][wifi:450]: - 'masked' (XX:EC:DA:32:B1:95) ▂▄▆█
[22:01:58][D][wifi:450]: - '' (XX:8F:CA:86:D9:7E) ▂▄▆█
[22:01:58][I][wifi:257]: WiFi Connecting to 'masked-iot'...
[22:01:58][D][esp-idf:000]: I (5198) wifi:
[22:01:58][D][esp-idf:000]: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
[22:01:58][D][esp-idf:000]: 
[22:01:58]
[22:01:59][D][esp-idf:000]: I (5742) wifi:
[22:01:59][D][esp-idf:000]: state: init -> auth (b0)
[22:01:59][D][esp-idf:000]: 
[22:01:59]
[22:01:59][D][esp-idf:000]: I (5751) wifi:
[22:01:59][D][esp-idf:000]: state: auth -> assoc (0)
[22:01:59][D][esp-idf:000]: 
[22:01:59]
[22:01:59][D][esp-idf:000]: I (5759) wifi:
[22:01:59][D][esp-idf:000]: state: assoc -> run (10)
[22:01:59][D][esp-idf:000]: 
[22:01:59]
[22:01:59][D][esp-idf:000]: I (5797) wifi:
[22:01:59][D][esp-idf:000]: connected with masked-iot, aid = 2, channel 6, BW20, bssid = 8a:2a:a8:ca:95:22
[22:01:59][D][esp-idf:000]: 
[22:01:59]
[22:01:59][D][esp-idf:000]: I (5798) wifi:
[22:01:59][D][esp-idf:000]: security: WPA2-PSK, phy: bgn, rssi: -33
[22:01:59][D][esp-idf:000]: 
[22:01:59]
[22:01:59][D][esp-idf:000]: I (5801) wifi:
[22:01:59][D][esp-idf:000]: pm start, type: 1
[22:01:59]
[22:01:59][D][esp-idf:000]: 
[22:01:59]
[22:01:59][D][esp-idf:000]: I (5815) wifi:
[22:01:59][D][esp-idf:000]: AP's beacon interval = 102400 us, DTIM period = 1
[22:01:59][D][esp-idf:000]: 
[22:01:59]
[22:02:28][W][wifi:543]: Timeout while connecting to WiFi.
[22:02:28][I][wifi:257]: WiFi Connecting to 'masked-iot'...
[22:02:28][D][esp-idf:000]: I (35193) wifi:
[22:02:28][D][esp-idf:000]: state: run -> init (0)
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][D][esp-idf:000]: I (35194) wifi:
[22:02:28][D][esp-idf:000]: pm stop, total sleep time: 23265363 us / 29383480 us
[22:02:28]
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][D][esp-idf:000]: W (35196) wifi:
[22:02:28][D][esp-idf:000]: <ba-del>idx
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][D][esp-idf:000]: I (35218) wifi:
[22:02:28][D][esp-idf:000]: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][W][wifi_esp32:633]: Event: Disconnected ssid='masked-iot' bssid=XX:2A:A8:CA:95:22 reason='Association Leave'
[22:02:28][W][wifi:549]: Error while connecting to network.
[22:02:28][D][esp-idf:000]: I (35246) wifi:
[22:02:28][D][esp-idf:000]: state: auth -> assoc (0)
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][W][wifi:585]: Restarting WiFi adapter...
[22:02:28][D][esp-idf:000]: I (35258) wifi:
[22:02:28][D][esp-idf:000]: state: assoc -> init (0)
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][D][esp-idf:000]: I (35268) wifi:
[22:02:28][D][esp-idf:000]: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][D][esp-idf:000]: I (35279) wifi:
[22:02:28][D][esp-idf:000]: flush txq
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][D][esp-idf:000]: I (35298) wifi:
[22:02:28][D][esp-idf:000]: stop sw txq
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][D][esp-idf:000]: I (35300) wifi:
[22:02:28][D][esp-idf:000]: lmac stop hw txq
[22:02:28][D][esp-idf:000]: 
[22:02:28]
[22:02:28][W][wifi_esp32:633]: Event: Disconnected ssid='masked-iot' bssid=XX:2A:A8:CA:95:22 reason='Association Failed'
[22:02:33][D][wifi:386]: Starting scan...
[22:02:33][D][esp-idf:000]: I (40413) wifi:
[22:02:33][D][esp-idf:000]: mode : sta (XX:17:93:cf:b9:08)
[22:02:33][D][esp-idf:000]: 
[22:02:33]
[22:02:33][D][esp-idf:000]: I (40414) wifi:
[22:02:33][D][esp-idf:000]: enable tsf
[22:02:33][D][esp-idf:000]: 
[22:02:33]
[22:02:33][D][esp-idf:000]: W (40418) wifi:
[22:02:33][D][esp-idf:000]: Error! Should use default active scan time parameter for WiFi scan when Bluetooth is enabled!!!!!!
[22:02:33]
[22:02:33][D][esp-idf:000]: 
[22:02:33]
[22:02:33][D][esp-idf:000]: I (40430) wifi:
[22:02:33][D][esp-idf:000]: Set ps type: 1
[22:02:33]
[22:02:33][D][esp-idf:000]: 
[22:02:33]
....
[22:02:37][I][wifi:257]: WiFi Connecting to 'masked-iot'...
[22:02:37][W][wifi:549]: Error while connecting to network.
[22:02:37][D][esp-idf:000]: I (44062) wifi:
[22:02:37][D][esp-idf:000]: new:<6,0>, old:<1,0>, ap:<255,255>, sta:<6,0>, prof:1
[22:02:37][D][esp-idf:000]: 
[22:02:37]
[22:02:38][D][esp-idf:000]: I (44607) wifi:
[22:02:38][D][esp-idf:000]: state: init -> auth (b0)
[22:02:38][D][esp-idf:000]: 
[22:02:38]
[22:02:38][D][esp-idf:000]: I (44610) wifi:
[22:02:38][D][esp-idf:000]: state: auth -> init (0)
[22:02:38][D][esp-idf:000]: 
[22:02:38]
[22:02:38][D][esp-idf:000]: I (44612) wifi:
[22:02:38][D][esp-idf:000]: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
[22:02:38][D][esp-idf:000]: 
[22:02:38]
[22:02:39][D][esp-idf:000]: I (45662) wifi:
[22:02:39][D][esp-idf:000]: flush txq
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][D][esp-idf:000]: I (45663) wifi:
[22:02:39][D][esp-idf:000]: stop sw txq
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][D][esp-idf:000]: I (45666) wifi:
[22:02:39][D][esp-idf:000]: lmac stop hw txq
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][I][wifi:257]: WiFi Connecting to 'masked-iot'...
[22:02:39][D][esp-idf:000]: I (45770) wifi:
[22:02:39][D][esp-idf:000]: mode : sta (XX:17:93:cf:b9:08)
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][D][esp-idf:000]: I (45771) wifi:
[22:02:39][D][esp-idf:000]: enable tsf
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][W][esp32_ble_tracker:121]: Too many BLE events to process. Some devices may not show up.
[22:02:39][W][wifi_esp32:633]: Event: Disconnected ssid='masked-iot' bssid=XX:EC:DA:A4:92:63 reason='Authentication Failed'
[22:02:39][D][esp-idf:000]: I (45789) wifi:
[22:02:39][D][esp-idf:000]: Set ps type: 1
[22:02:39]
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][W][wifi:549]: Error while connecting to network.
[22:02:39][W][wifi:585]: Restarting WiFi adapter...
[22:02:39][D][esp-idf:000]: I (45823) wifi:
[22:02:39][D][esp-idf:000]: state: run -> init (0)
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][D][esp-idf:000]: I (45824) wifi:
[22:02:39][D][esp-idf:000]: new:<6,0>, old:<6,0>, ap:<255,255>, sta:<6,0>, prof:1
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][D][esp-idf:000]: I (45865) wifi:
[22:02:39][D][esp-idf:000]: flush txq
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][D][esp-idf:000]: I (45866) wifi:
[22:02:39][D][esp-idf:000]: stop sw txq
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][D][esp-idf:000]: I (45869) wifi:
[22:02:39][D][esp-idf:000]: lmac stop hw txq
[22:02:39][D][esp-idf:000]: 
[22:02:39]
[22:02:39][W][wifi_esp32:633]: Event: Disconnected ssid='masked-iot' bssid=XX:EC:DA:A4:92:63 reason='Association Leave'
[22:02:44][D][wifi:386]: Starting scan...
[22:02:44][D][esp-idf:000]: I (50973) wifi:
[22:02:44][D][esp-idf:000]: mode : sta (XX:17:93:cf:b9:08)
[22:02:44][D][esp-idf:000]: 
[22:02:44]
[22:02:44][D][esp-idf:000]: I (50974) wifi:
[22:02:44][D][esp-idf:000]: enable tsf
[22:02:44][D][esp-idf:000]: 
[22:02:44]
[22:02:44][D][esp-idf:000]: W (50978) wifi:
[22:02:44][D][esp-idf:000]: Error! Should use default active scan time parameter for WiFi scan when Bluetooth is enabled!!!!!!
[22:02:44]
[22:02:44][D][esp-idf:000]: 
[22:02:44]
[22:02:44][W][esp32_ble_tracker:121]: Too many BLE events to process. Some devices may not show up.
[22:02:44][D][esp-idf:000]: I (51000) wifi:
[22:02:44][D][esp-idf:000]: Set ps type: 1
[22:02:44]
[22:02:44][D][esp-idf:000]: 
[22:02:44]
[22:02:44][W][esp32_ble_tracker:121]: Too many BLE events to process. Some devices may not show up.

ESPHome Config:

esphome:
  name: shelly-ble-proxy

esp32:
  board: esp32dev
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
      CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"

# Enable logging
logger:
  level: DEBUG

# Enable Home Assistant API
api:

# Enable OTA
ota:

# Change the WiFi config to a non-static IP if needed
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

esp32_ble_tracker:
  scan_parameters:
    active: false

bluetooth_proxy:
  active: true

here is something that might help to make it work with Arduino framework:

#####

esphome:
   name: ${device_name}
   friendly_name: ${friendly_name}
   platformio_options:
      board_build.f_cpu: 160000000L
      platform: https://github.com/tasmota/platform-espressif32/releases/download/2023.02.00/platform-espressif32.zip
      framework: arduino
      platform_packages:
         - framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master
      build_flags:
         - "-DCONFIG_FREERTOS_UNICORE=1"
         - "-DFRAMEWORK_ARDUINO_SOLO1"
      board: esp32-solo1


esp32:
  board: esp32doit-devkit-v1

####

I know this was solved but i want to help other people not waste time trying to find a solution when they need the funtionality given by the Arduino framework in ESPHome (web_server, …)

Any news here on getting it to work?