Controlling Velux Remote with ESP8266 and ESPHome

Hello Everyone,

I want to automate my Velux roof blinds and I didn’t want to invest to Velux bridge over 100ish euros.

So I googled a bit and I saw a couple of posts (first_one, second and third(German) )
So I thought I can do this too, but it doesn’t work indeed.
My YAML file looks as follows(see below), and I think my problem is my momentary switch configuration but I can’t find the problem. Beside that controlling the switch is also a bit laggy. If anyone have any ideas I will be glad. Thank you!

esphome:
  name: veluxremote
  friendly_name: VeluxRemote

esp8266:
  board: nodemcuv2

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "key"

ota:
  password: "passw"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Veluxremote Fallback Hotspot"
    password: "rpassw"

captive_portal:

switch:
  - platform: gpio
    id: velux_down
    pin: D5
    inverted: yes

  - platform: gpio
    id: velux_stop
    pin: D6
    inverted: yes

  - platform: gpio
    id: velux_up
    pin: D7
    inverted: yes

cover:
  - platform: template
    name: Fernbedienung
    open_action:
      # Cancel any previous action
      - switch.turn_off: velux_down
      # Turn the OPEN switch on briefly
      - switch.turn_on: velux_up
      - delay: 0.1s
      - switch.turn_off: velux_up
    close_action:
      - switch.turn_off: velux_up
      - switch.turn_on: velux_down
      - delay: 0.1s
      - switch.turn_off: velux_down
    stop_action:
      - switch.turn_off: velux_down
      - switch.turn_off: velux_up
      - switch.turn_on: velux_stop
      - delay: 0.1s
      - switch.turn_off: velux_stop
    optimistic: true
    assumed_state: true    

I’m using this ESP8266:


This is what I did to make it work:

1 Like

Thanks for that, Ive just replicated it to operate my Velux window (Not blind). Works perfectly. I’m just 3d printing a box for the Esp32. I routed the cables slightly differently, but still exiting at the rear.

1 Like

Glad it worked! I’m 3D printing a box that houses the two remotes and the esp32

I was looking at this:

as a case extension, not convinced the idea to connect would be reliable.
I have had a few issues where my USB doesnt seem to deliver enough power and the esp32 doesnt work, that caught me out and made me suspect dodgy soldering!

That’s neat. I already did all of my wiring, so I’m going to make a box that houses two of those remotes and has a space for the ESP + wiring too.

I made mine to replace the back panel entirely, put it on a pcb and also added sense wires so the ESP can report state back when you press the physical buttons.

Using the time_based cover also lets me control the position with surprising accuracy.

esphome yml, kicad and fusion360 files here

STL and gerbers here

Nice project @thorou, will have to add to my to do list. Means ordering a PCB and brushing up on my SMD skills.

Thanks!

The gerbers in the Github release are ready to order; you can get them incredibly cheap at JLCPCB (6€ shipped for 5 pcs) with really nice finish.

Do shoot me a message or open a Github issue if you need a bill of materials.

Ordered 5 the other day, hopefully on a slow boat from China :grinning:

Hi,
Thank you for sharing it @thorou this looks neat!

I have a question is there a way to get this PCB wit all the the components already soldered except the ESP?

I have 2 ESP12F at home but there is no way that I can solder the other components to the PCB and I never designed or ordered a PCB before.