Velux Active (HomeKit accessory) control via Home Assistant?

I recently got a smartbridge device called Velux Active which connects as a HomeKit accessory hub and allows homekit control and status of several window binds around my house.

I would like to incorporate control and status of these blinds into Home Assistant as well, but I’m not sure how to approach this. The HomeKit controller support feature doesn’t seem to support the cover device type. Is it possible to do this with homebridge rather than the native Home Assistant HomeKit features?

Thanks for any advice!

1 Like

Hi @millercentral
I’m researching Velux Blinds and came across Velux Active, and your post.
I’m wondering, when Velux shows up in Homekit, what does it show up as?
Does it show up as an on/off device, or say a dimmer 0-100%, or is it something else?

Thanks!

I was getting ready to say it shows as a binary “opened/closed”, but then today I noticed it was showing a percentage opened (see attached). It also links up with other switches and sensors – it comes with a switch that has sensors for Temperature, Humidity, and CO readings as well.

Overall it seems to work pretty well, but I would love to find a way to interact with it from HA as well…

Looks Great!
My understanding is that you would need the HA Homekit Controller to control Homekit devices (Velux Active) from HA. I use the HomeKit native component which exports a couple of my HA devices to HomeKit for Homekit to control, but I have not used the Homekit Controller.

I don’t know how the HA HomeKit Controller component would work with Velux Active since
the current HK Controller component only supports Climate, Lights, Switch.
If Velux would at least show up as a Light (dimmer), that would go a long way.

Maybe you could try the HA Homekit Controller and see what happens?

Same here,

@millercentral, got it working on HA?

I got my Velux Active nicely controllable in HomeKit. However, since I’m not very happy with the automated control of the windows / blinds driven by the CO2/temperature/humidity sensor that came along with, also HomeKit’s automation features are very limited and I’d like to automate the behaviour in HA.

There is a HA component for Velux Hub KLF 200, however, Velux Active has a new “climate control” hub “KIX 300” (https://www.veluxusa.com/help/support/activesupport)

I tried to add it through HA Homekit Controller as described in the HomeKit controller support feature, all packages are up to date.

resetting the gateway and while setting up I skipped the add to homekit part but still it isn’t being discovered by HA. The HA discovery mode itself seems to work as I see the configurator promt for Plex Media Server

  • I don’t have any other HomeKit device to test if the HA HomeKit controller is working
  • log file doesn’t have any entry for HomeKit controller

I guess since the product is fairly new we need to wait until somebody able to develop a component for our Velux Active windows takes this up. Till then we have to live with the limited HomeKit Automation and limited automatic Velux Active climate control.

May have something to do with Home Kit Controller not yet supporting Cover??

Here is an idea, a bit of a hack though…
Instead of using HA’s HK Controller, try HA’s HomeKit component.
In HA, create an input_boolean, and export it HK using a filter like the following:

homekit:
  filter:
    include_entities:
      - input_boolean.test

(Follow the instructions for setting up HomeKit component, etc.).

You should see the input boolean show up in homekit as an on/off device and when
you toggle it in HA, you should see it also toggle in HK (and vice-versa).

If this works, then you can create an automation in HK that turns the
Velux blinds on/ff when the input boolean turns on/off.

If that works, then you can try something more elaborate like an input_number.

I haven’t had more time to experiment here, but I’ll take a shot at the approach wmaker suggests this weekend.

Ok,

thanks @wmaker for the tip. I’ve got myself back to that today and took your hint in as well as I’ve read in other cases, the homekit component may cause problems with the homekit controller.

1.a) I removed the homekit component from my configuration.yaml, reset and restarted the velux system completely. tried to find it in HomeAssistant just after connecting the gateway to the WiFi (same subnet as the Synology where I run Home Assistant on docker) when it allows to create a new home. it didn’t show up.

1.b) I’ve readded HomeKit component to the config file with the input_boolean.test and couldn’t discover it neither.

during that time, the process kind of got lost and I had to restart with connecting the gateway to the network.

I kept going further creating the home on the Velux Active App and tried step a and b again when it was asking me for the HomeKit Setup Code.

2.a) without homekit component
2.b) with homekit component and the input_boolean.test
neither with success.

again, the process stopped and I had to restart with connecting the gateway to the network, create the home, cancelled the process of adding to homekit and added the products on the Velux Active App

3.a) without homekit component
3.b) with homekit component and input_boolean.test

still no success.

furthermore I discovered the following in my log file:

2018-08-24 14:05:44 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/homekit_controller/__init__.py", line 244, in discovery_dispatch
    config_num = int(discovery_info['properties']['c#'])
KeyError: 'c#'

@wmaker, if you have any other idea how to solve that, let us know. I’m in to try.

Here would be my suggestion… try the following (if you haven’t tried already):

  1. Get Velux Active to show up in Apple HomeKit like millercentral just to make sure
    that part works correctly; In otherwords make sure Apple Homekit can control
    the Velux blinds without Home Assistant participating.
  2. HA remove Homekit controller component and Homekit component from config and restart HA.
  3. Create the input_boolean in HA and make sure it shows up in the state tab and you
    can toggle it on/off and the state changes in HA.
  4. Add Homekit component (not controller) and the input_boolean filter into HA config (as suggested earlier) and restart HA.
    (Hopefully) follow the instructions from https://www.home-assistant.io/components/homekit/#setup
    and you’ll get an “HA bridge” showing up in Apple HomeKit. Tap on the HA bridge in Apple HomeKit…
    when I tapped, it failed for me a couple of times before it finally worked. You should then see the input_boolean show up.

@wmaker!!! This is awesome!!! You’re my hero! But my wife won’t be happy that I’m not coming to bed :wink:
Worked like a charm, now I have one automation that I can toggle with one button on HomeKit and my apartment gets aired 4 times a day…

I already had Velux Active in Homekit, created an input_boolean in HA, added it to the HomeKit Component entry and it showed up in HomeKit. Then I created an Automation in HomeKit to open all Velux Active windows when I toggle the input_boolean toggles on - respectively closes them when it toggles off.

HomeKit controller component doesn’t have to be deactivated, I skipped step 2 and had no issues.

Here’s the HomeKit configuration, sharing an input_boolean to control all velux windows together and an automation that airs the apartment 4 times a day.

# HomeKit configuration
homekit:
  auto_start: False
  filter:
    include_entities:
      - automation.air_apartment
      - input_boolean.velux_windows

Here’s the input_boolean

# Created input_boolean to automate Velux Active
input_boolean:
  velux_windows:
    name: Velux Windows
    initial: off
    icon: mdi:window-closed

Here’s the automation:

# Open Velux Windows 4 times a day for 15 minutes
- id: Air_Apartment
  alias: Air Apartment
  trigger:
  - at: 08:00
    platform: time
  - at: '12:00'
    platform: time
  - at: '16:00'
    platform: time
  - at: '20:00'
    platform: time
  action:
  - service: homeassistant.turn_on
    entity_id:
    - input_boolean.velux_windows
  - delay: 00:15:00
  - service: homeassistant.turn_off
    entity_id:
    - input_boolean.velux_windows

I’ll play a bit more around with that, meaning that I want the blinds to be controlled based on weather (DarkSky component) and sun azimuth / elevation as we’re north facing slope and the windows are all east-oriented… I’ll update once I get somewhere next week.

@wmaker Sorry for my brain fart, not reading your suggestion properly at first / respectively not having a clue in IT / HA and not getting it.

Thanks a lot!!

tried to get input_number to work, isn’t being shared with HomeKit.

Great!!..
btw, I looked up in https://www.home-assistant.io/components/homekit/#supported-components
and see that input_number is not supported, so my mistake.

Ok, spent a bit more time on the blinds and came up with a solution to use the HA’s automation capability for the velux windows and blinds.

  • I can fully open / fully close with one button in HA / HK all velux windows respectively all velux blinds
  • I have a simple automation in HA opening the windows 4 times a day that I can activate / deactivate in HK
  • I use the Dark Sky weather sensor and Sun component to automate the velux blinds based on weather and sun elevation. opening and closing with all together 3 HA automations.
  • I had to create another input_boolean to be able to activate / deactivate the automations for the blinds and share it with HK

What this solution is lacking:

  • Individual control of the blinds would become even more complex and at this time doesn’t add value for me
  • I obviously don’t get the Velux Active climate sensor’s information into Home Assistant

I also did a bit more research and the interest for integration of Velux Active into different home automation systems is massive. However, there is no API and Velux seems to be reluctant to respond / show any plans to provide an API. So I guess we have to live with the solution proposed by @wmaker for long.

Here are the updates:
Updated homekit configuration with added input_boolean for the velux blinds, and since I need multiple automations to open / close the blinds due to weather or sun elevation and did not want to have three different automations in HomeKit I created another input_boolean.velux_blinds_automation that I share with HomeKit and lets me activate / deactivate all velux blind related automations in HA.

# HomeKit configuration
homekit:
  auto_start: False
  filter:
    include_entities:
      - automation.air_apartment
      - input_boolean.velux_blinds_automation
      - input_boolean.velux_windows
      - input_boolean.velux_blinds

Here are all the input_boolean:

# Created input_boolean to automate Velux Active
input_boolean:
  velux_windows:
    name: Velux Windows
    initial: off
    icon: mdi:window-closed
  velux_blinds:
    name: Velux Blinds
    initial: off
    icon: mdi:blinds
  velux_blinds_automation:
    name: Velux Blinds Automation
    initial: on
    icon: mdi:blinds

Now the automation part in HomeKit got a bit more complex:

# Automate Velux Blinds according to sun / weather
  # Activate / Deactivate automation through input_boolean on HomeKit
- id: velux_blinds_automation
  alias: Velux Blinds Automation
  trigger:
  - platform: state
    entity_id: input_boolean.velux_blinds_automation
    to: 'on'
  action:
  - service: homeassistant.turn_on
    entity_id: group.velux_blinds_automation
- id: velux_blinds_automation
  alias: Velux Blinds Automation
  trigger:
  - platform: state
    entity_id: input_boolean.velux_blinds_automation
    to: 'off'
  action:
  - service: homeassistant.turn_off
    entity_id: group.velux_blinds_automation
  # Velux Blinds Automations
- id: velux_blinds_close
  alias: Velux Blinds Close
  trigger:
  - platform: numeric_state
    entity_id: sun.sun
    value_template: '{{ state.attributes.elevation }}'
    above: 10
  - platform: numeric_state
    entity_id: sensor.dark_sky_cloud_coverage
    below: 50
  - platform: numeric_state
    entity_id: sensor.dark_sky_temperature
    above: 15
  condition:
  - condition: numeric_state
    entity_id: sun.sun
    value_template: '{{ state.attributes.elevation }}'
    above: 10
  - condition: numeric_state
    entity_id: sensor.dark_sky_cloud_coverage
    below: 50
  - condition: numeric_state
    entity_id: sensor.dark_sky_temperature
    above: 15
  action:
  - service: homeassistant.turn_on
    entity_id: input_boolean.velux_blinds
- id: velux_blinds_open_weather
  alias: Velux Blinds Open Weather
  trigger:
  - platform: numeric_state
    entity_id: sensor.dark_sky_cloud_coverage
    above: 70
  - platform: numeric_state
    entity_id: sensor.dark_sky_temperature
    below: 13
  action:
  - service: homeassistant.turn_off
    entity_id: input_boolean.velux_blinds
- id: velux_blinds_open_evening
  alias: Velux Blinds Open Evening
  trigger:
  - platform: numeric_state
    entity_id: sun.sun
    value_template: '{{ state.attributes.elevation }}'
    below: 20
  condition:
  - condition: time
    after: '12:00:00'
  action:
  - service: homeassistant.turn_off
    entity_id: input_boolean.velux_blinds

And the automations in HK:

A capable outdoor lux sensor placed at the right spot would simplify that whole blind automation but I’m ok for now. Though looking into mounting the sensative stripe onto the roof.

Doesn’t the velux active work with this: https://www.home-assistant.io/components/velux/

I think the HA Velux component makes use of some undocumented API using the KLF200.
I don’t think Velux Active uses the KLF200

No, it’s the KIX 300, which refuses to connect through browser and terminal.

https://www.veluxusa.com/help/support/activesupport

Hi Guys,

Is everyone going electric? There is a solar option and I was wondering if there is any functionality differences in the KIX 300. Velux says no but it would be great to get someone with hands-on experience.

Thanks

I’m not sure I understand your question regarding solar option but let me try to respond:
The Velux Active set doesn’t come with a lux sensor that can be used to control the velux blinds / shutters. It works based on online weather information - I guess they worked that out with Netatmo. And the automatic climate control that velux active offers based on indoor measurement and weather forecast is rather disappointing. The opening of the window works nicely based on regular airing, humidity and CO2 and I still have it running. However, at 30 degrees outside temperature and bright sunlight throughout the day it did not close the blinds.

So at first, I automated the blinds through HA based on the dark sky sensor (cloud coverage and rain) needs a lot of observation and adjustments and was not working very well. By now I am controlling them with an indoor mounted Aeotec multisensor 6 facing a window that never gets covered and it’s reported lux values. That works pretty well. I already ordered a sensative comfort strip that I’ll try to mount on the roof or any other convenient location to better reflect direct sun and temperature to automate the blinds and windows.

Hi Juschk,

Can you please tell me more about the sensitive comfort strip you ordered?

It’s the one in the link below but I haven’t received it yet. The store I ordered is still waiting to fill their stock with it, expecting it next week. I’ll update once I received and integrated it. Very promising as it doesn’t take much space, should be ok to have it exposed to the elements, runs up to 10 years with it’s integrated battery and does everything I need:

  • provides me the rooftop temperature (in winter we regularly have snow on the roof and I shouldn’t open windows or close the blinds)
  • provides me luminance to assess direct sunlight to control the blinds.

A bit worried about the connection as the place on the roof I’m planning to mount it is chrome and the signal has to go through the window/roof and a massive, roof-carrying wall that contains loads of electricity cables and sanitary elements. Distance is only 2 meters to the z-wave stick though. So I may have to play around a bit and if impossible to mount on the rooftop, I will order a couple more to mount on the outside walls - though the automation will get much more complex as I can see now withe the multisensor mentioned.

I hope I get it before the sun hides behind the mountains early November :wink: