Starterkit DIY home

I just bought my daughter (10y) a ‘DIY home kit from Keyestudio’ to keep her occupied during summer holiday. She already had a lot of fun with building it, and thinking what she can do with it. My target was to let her play a bit with HA. But sadly, this was not so straight forward. I guess I maybe wiped somewhere the ESP board with my first HA connectivity. But I learned a lot around ESP32 with this kit, so it was positive at the end.

To be honest, I’m very surpised! For this price, you get a real nice package of different sensors (temperature, moisture, humidity, PIR, NFC, gas, buzzer, fan, servo, led, RGB led, display…).

image

For those who want my esphome yaml file:

esphome:
  name: keyestudiosmarthouse
  friendly_name: "DIY Huis"

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "*************"
  #Used for buzzer music
  services:
    - service: play_rtttl
      variables:
        song_str: string
      then:
        - rtttl.play:
            rtttl: !lambda 'return song_str;'

ota:
  - platform: esphome
    password: "*************"

wifi:
  ssid: *************
  password: *************

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Keyestudiosmarthouse"
    password: "*************"

captive_portal:


i2c:
  - frequency: 800kHz

rc522_i2c:
  #RF-Reader
  address: 0x28

display:
  # LCD Screen
  - platform: lcd_pcf8574
    update_interval: 10s
    id: lcd_display
    dimensions: 16x2
    address: 0x27
    lambda: |-
      it.printf(0, 0, "Temp: %.1f C", id(temperature_dht).state);
      it.printf(0, 1, "Vocht: %.1f %%", id(humidity_dht).state);

  
binary_sensor:
  # Reports if this device is Connected or not
  - platform: status
    name: "Status"

  # Left push button
  - platform: gpio
    pin: 
      number: 16
      inverted: true
    name: "Linkerknop"

  # Right push button
  - platform: gpio
    name: "Rechterknop"
    pin:
      number: 27
      inverted: true
      
  # GAS Sensor
  - platform: gpio
    pin: 
      number: 23
      inverted: true
    name: "Gas sensor"
    device_class: gas
  
  # PIR Sensor
  - platform: gpio
    pin: 14
    name: "Bewegingsmelder"
    device_class: motion

  # Blue NFC tag - keyholder
  - platform: rc522
    uid: **-**-**-**
    name: "Blauwe Sleutel Tag"

  # White NFC tag - credit card
  - platform: rc522
    uid: **-**-**-**
    name: "Kredietkaart Tag"


light:
  # Status LED
  - platform: status_led
    name: "LED"
    pin: 12
  
  # 6812RGB Led
  - platform: neopixelbus
    type: GRB
    variant: SK6812
    pin: 26
    num_leds: 4
    name: "RGB Leds"
    effects:
      - pulse:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_scan:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_fireworks:


servo:
  # Servo 90 Motor 1
  - id: servo_01
    output: servo_01_out

  # Servo 90 Motor 2
  - id: servo_02
    output: servo_02_out

output:
  # Roof FAN
  - platform: ledc
    pin: 18
    frequency: 100 Hz
    id: ventilation_fan_pwm_r

  # Roof FAN
  - platform: ledc
    pin: 19
    frequency: 100 Hz
    id: ventilation_fan_pwm_l

  # Servo 90 Motor 1
  - platform: ledc
    id: servo_01_out
    pin: 5
    frequency: 50 Hz

  # Servo 90 Motor 2
  - platform: ledc
    id: servo_02_out
    pin: 13
    frequency: 50 Hz

  # Buzzer config
  - platform: ledc
    id: rtttl_out
    pin: 25

# Buzzer config
rtttl:
  output: rtttl_out
  on_finished_playback:
    - logger.log: 'Song ended!'


number:
  # Servo 90 Motor 1
  - platform: template
    name: "Venster"
    min_value: 0
    initial_value: 0
    max_value: 100
    step: 1
    optimistic: true
    set_action:
      then:
        - servo.write:
            id: servo_01
            level: !lambda 'return x / 100.0;'

  # Servo 90 Motor 2
  - platform: template
    name: "Deur"
    min_value: 0
    initial_value: 0
    max_value: 100
    step: 1
    optimistic: true
    set_action:
      then:
        - servo.write:
            id: servo_02
            level: !lambda 'return x / 100.0;'

fan:
  # Roof FAN L
  - platform: speed
    output: ventilation_fan_pwm_l
    name: "Dak Ventilator L"

  # Roof FAN R
  - platform: speed
    output: ventilation_fan_pwm_r
    name: "Dak Ventilator R"

sensor:
  # Reports the WiFi signal strength
  - platform: wifi_signal
    name: "WIFI Signaal"
    update_interval: 60s

  #Temperature and Humidity
  - platform: dht
    pin: 17
    model: dht11
    temperature:
      name: "Temperatuur"
      id: temperature_dht
    humidity:
      name: "Vochtigheid"
      id: humidity_dht
    update_interval: 30s    

  # Reports how long the device has been powered (in minutes)
  - platform: uptime
    name: "Opgestart"
    filters:
      - lambda: return x / 60.0;
    unit_of_measurement: minutes


  # Steam Sensor
  - platform: adc
    pin: 34
    name: "Stoom Water sensor"
    update_interval: 30s    


switch:
  # Helps to restart the device at distance
  - platform: restart
    name: "Herstart"


text_sensor:
  # Reports the ESPHome Version with compile date
  - platform: version
    name: "ESPHome Versie"

  # Reports WiFi name
  - platform: wifi_info
    ssid:
      name: "WiFi"

  # Reports current IP
  - platform: wifi_info
    ip_address:
      name: "IP-Adres"

I’m maybe just missing the LCD Display to show values from HA. But I want to keep it as ‘base’ as possible, and I’m 100% sure that a lot of improvements will come.

Data in HA

.

Next step, a dashboard?
I feel I’m going to compete with my daughter for the nicest home. :blush:

btw Maybe a nice ‘building’ kit for starters with HA? Build the hardware, and start with the software… And beside, it’s fun to have this kind of demo home on your desk to test things quickly.

Awesome for you man! I’ve tried and tried to get my daughter to build projects with me and she has 0 interest but can ramble on for 30min about skin care products… I think this is 1000% better use of time than having them staring at any screens.

Speaking of kids… I stumbled into a Boy Scout group that was starting an electronics/soldering/etc program and they needed help making lessons and sourcing all the boards, sensors, led’s, etc. I was so happy to fill boxes of extra components, Arduino’s, esp boards, etc. I hate getting rid of stuff but I was happy to for this good cause.

My point is that other people in here may have similar groups in their community and need help too. If anyone is like me and builds up a rather large “junk drawer” then maybe giving extras away to inspire a child or keep them off the street is something to keep in the back of our minds.