Hi guys,
I just created an esphome configuration for a Kruidvat Smart outdoor plug art.nr. SH.33.407 since i couldn’t find an ESPHOME configuration for on the internet. Maybe someone can put this info to use, or it can safe someone so valuable some time. Price of the IP44 outdoor plug is only 10 euro.
The plug can be fairly easy opened by twisting and pulling the green rubber cap (IP44) off. Then 2 triangle security screws are reveiled that hold the 2 black plastic parts together.
Inside is a small CB2S chip which can be flashed with ESPHOME.
Pinout can be found here: CB2S - LibreTiny
I desoldered the small chip from the board and flashed it with the configuration below:
esphome:
name: outdoorplug
friendly_name: OutdoorPlug
bk72xx:
board: cb2s
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxx"
ota:
- platform: esphome
password: "xxxxx"
# Enable Web server.
web_server:
port: 80
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Outdoorplug Fallback Hotspot"
password: "xxxxx"
captive_portal:
# Code below is specific for Kruidvat SMART outdoor plug
# art.nr: SH.33.407
# The main relay is connected to P24
switch:
- platform: gpio
name: Socket
pin: P24
id: socket1
on_turn_on:
then:
light.turn_on: greenled
on_turn_off:
then:
light.turn_off: greenled
- platform: gpio
name: Red Led
pin: P6
inverted: true
id: redled
# The button on the side of the socket is wired to P8
binary_sensor:
- platform: gpio
pin:
number: P8
mode:
input: true
pullup: true
inverted: true
name: Button
on_click:
min_length: 50ms
then:
switch.toggle: socket1
# The LED is directly controlled via the state of the relay with the switch above
light:
- platform: binary
name: "Green LED"
id: greenled
output: greenled_output
internal: true
output:
- id: greenled_output
platform: gpio
inverted: true
pin: P7
interval:
- interval: 30sec
then:
if:
condition:
not:
- wifi.connected:
then:
switch.turn_on: redled
else:
switch.turn_off: redled
```