Guide: Vallox Digit Ventilation to Home Assistant (Part 2/2 – Home Assistant)

In previous post I wrote a guide, how to create hardware to control Vallox Ventilation Machines (the dumb ones) through wifi. In this second part, we are going to integrate the newly created hardware into Home Assistant.

Requirements

Since our hardware sends all the events to the MQTT pipe, of course we should have MQTT installed into our system. Check this post out if this is a new thing for you. You should already have MQTT installed though, since you were able to complete the 1/2 part of this guide 🙂

Another thing we need is a SSH in home assistant. We need to be able to install custom components to the system (there might be other ways as well, but this guide uses SSH connection). SSH add-on can be installed from supervisor -> “Add-on store”.

Custom component installation (UPDATED 3/2021)

Next thing is the actual component installation.

SSH into the home assistant system (either with web ui or native ssh) and enter following commands:

cd /config/custom_components 
wget -O - https://raw.githubusercontent.com/kotope/valloxesp/master/install_to_home_assistant.sh | bash

First row changes our directory to custom_components folder inside home assistant. Custom components are third party components that are not integrated into home assistant by default.

Second row downloads the software from GitHub repository and runs installation right through into the custom_components folder. No need to do any other commands anymore.

Now restart the home assistant and our new component should be loaded in the system.

(Coming later: HACS installation)

Configuration (UPDATED 3/2021)

Latest version of integration is done via Home Assistant integrations page direclty from UI and differs a lot from older version. If you have the old version still installed, remove the configuration related to vallox2mqtt from configurations.yaml. Also you can now safely remove templated sensors since they are provided through configuration procedure automatically now.

Our platform currenty offers three components: thermostat (climate) control, binary sensor and swuich. Climate control has heating, fan support and target temperature setters.

Binary sensor is just a status on/off, but has rest of the values as attributes that can be used as template sensors if needed.

Switch is either boost or fireplace switch as selected from Vallox Ventilation machine. Note that once either boost or fireplace mode is activated, it cannot be turned off until the timer expires in vallox (boost 60min, fireplace 15min). This is restriction in the interface and “can’t” be implemented. Also please note that at the moment you cannot switch fireplace/boost mode from HA, only in the device itself (something I still need to implement).

Latest version (0.8.1+) also provides other sensors straight through device now.

So let’s setup the platform.

Go Home Assistant configurations tab -> integrations and press ‘+ Add Integration’ in down right.

Search for vallox2mqtt and click it.

Configuration dialog should pop up and you can leave the values default unless you have changed your valloxesp mqtt topics to something else. You can also change the friendly name as you like (e.g. in your localized language).

After pressing the ‘submit’ button you are asked the area of the device. When finishing the setup you should see 1 device with 15 entities in the integrations view. You can now start adding those in your Lovelace UI.

RH1 and RH2 are only available if your Vallox ventilation machine has those. Otherwise those statuses will be unavailable.

Testing

Enter some of your views and try to add thermostat entity into it. You should find your “Ventilation” item.

Just experiment a bit and do anything you would like to see with those 🙂

In images below is an example how I’ve configured of those Lovelace cards (sensors, history graph of all four temperature sensors and ventilation control)

Again, if problems, feel free to drop a comment below and I’ll try to help as much as I can.

29 Replies to “Guide: Vallox Digit Ventilation to Home Assistant (Part 2/2 – Home Assistant)”

  1. Thank you so much for fun and great step-by-step guide for this home automation project! Yesterday I successfully got it working with Vallox Digit SE without any problems. You could add it to Github -page for other users if they are unsure if this is working or not.

    I did only one change to setup, and installed the system besides the ventilation machine. This way I was able to leave the boxing for a later date, and my wife is happier when she doesn’t see my tunings on the walls.

    I’d love to have option for fireplace switch, which turns exhaust fan off for 15minutes. I think there is “build-in switch” in protocol for that, I can see that the control panel (Digit SED) has option for it in menu.

    Big thanks again for your kind sharing this guide!

    1. Thanks for your nice comments 🙂
      I added your Vallox Digit SE as verified device aswell.

      By the way, updated software with some read only variables added to github.
      Mostly implemented because of motor_in to see when heat cell is being unfrozen.

      1. Already did OTA -update, so convenient! Also added configurations initially for motor_in, motor_out and extra_func. Working great!

        Didn’t quite understand what’s the relationship between motor_in and heat cell being frozen?

        1. At least my machine stops the incoming motor when defrosting starts. That way no more cold air is being pushed from outside and heat cell uses indoor warm air to defrost the cell.

          Some models uses front heating also on defrosting.

          I just wanted to analyse how often and how long periods there are for defrosting 🙂 Not tested fully yet though, since it’s still warm outside.

          Next task is the 15min fireplace/boost startup, hopefully I’ll have some time to implement it in this week.

    1. Great success 🙂

      Actually humidity should work already, try to add new template sensor with attribute “rh”. Never tested though, since I don’t have humidity sensor my self.
      Also fireplace switch is in progress, should be ready this week hopefully.

      1. Hi!

        First of all, thanks for the great project.

        Tested the rh attribute, it’s giving me -999% with two humidity sensors on my Vallox Digit SE. The humidity control and display work correctly on the LCD controller.

        I tried adding:

        vallox_rh:
        value_template: “{{ states.binary_sensor.ventilation_status.attributes.rh }}”
        friendly_name: Ventilation humidity sensor
        unit_of_measurement: “% rh”

        to my config.

        1. Hi and thanks for the feedback!

          RH feature might not be working, since I don’t have RH sensor(s) at all so it’s untested code completely. It’s implemented according specifications, but there might be some special cases, since you have two RH sensors connected.
          I can try to fix it, if you are able send me some packet logs from your machine?

          To get the logs you need to send ‘{ “DEBUG” : true }’ message to ‘vallox/set’ topic and then subscribe to ‘vallox/#’ topics with some client.
          If you are able to do that and get the logs (about 20-30 lines should be enough), please send and I’ll check if I can make RH feature working properly 🙂

  2. Could you have any suggestions what might be wrong: my MQTT packets have “freezed”, so I only get exactly same values every time I subscribe for a topic. I have flashed the software couple of times, no luck with that. I doubt the problem is with rs485-ttl -module, but it seems to be the only option. ESP01 might be bricked too, but it lets me flash it with ftdi-programmer, but not with OTA. I checked voltages and setups, and Vallox Control Panel is working as it should. I can’t say when this problem occured, but I’ve hazzled a lot with Home Assistant lately.

    I ordered ESP01 for other reasons couple weeks ago, so it should arrive soon, making troubleshooting easier.

    1. Mqtt messages on that code are retain, so old messages are received if no newer ones are not available. I should change that someday not to be retain..

      My guess would be somehow messed rs485 converter that it cant read all required messages and won’t get the initialization done. However, OTA flash should still work …

      Try to send “{ ‘DEBUG’: true }” message to vallox/set topic. It then should send all raw data through mqtt aswell. If no messages are received, something must be wrong on modus (RS485).

    2. And one more thing. If you have flashed esp8266 again, ensure wifi/mqtt values at valloxesp.h. File might be overridden when updated from github. Happened me once and I wondered why OTA won’t work anymore (was not even on wifi because of wrong credentials)

  3. Hi,

    It took some time to receive missing components and find the time to tinker this to be finished, but now the HW side is ready and works great with my Digit SE. The MQTT communications works bidirectionally, and everything seems to be OK.

    However, I’m experiencing problems with the HA configuration. The thermostat card works great with “climate.ilmanvaihto” as set entity. I can see the set and actual temperature and e.g. change the fan speed. However, the sensors defined under platform: template are not working.

    Sensors, defined in configuration.yaml are listed under “Entities” of HA Configuration view, but each sensor has a red exclamation mark with comment “Unavailable” . The sensors are of course not showing any data either.

    Installation (Custom component cloning from git + two sections of configuration.yaml-file) are done as explained above.

    As I’m bit unfamiliar with the template concept of HA, I would appreciate if you could point me a starting point for debugging.

    Many thanks in advance!

    1. Hi!

      Those templated sensors are fetched from Vallox binary_sensor attributes (I did not want to make too many (possibly not needed) entities in the integration so I decided to add them as attributes).

      I see you’re using ‘ilmanvaihto’ as a name so the binary sensor should be found in your system as “binary_sensor.ilmanvaihto”.
      Most probably your templated sensor name is just wrong, so double check that your templated sensor configuration is something like this:
      ventilation_outside_temp:
      value_template: “{{ states.binary_sensor.ilmanvaihto.attributes.temp_outside }}”
      friendly_name: Ventilation outside temperature

      If still not working, check that you see the ‘binary_sensor.ilmanvaihto’ in your Home Assistant and check the attributes from that entity.

      1. What a moment of embarrassment =:-o.

        I had configured the Vallox2mqtt custom component to configuration.yaml already last year, and didn’t recall/realize I had changed the name back then.

        I changed the name of the component to the same which is used in the example above, and now everything works like a charm!

        Thanks for your quick support and great work!

        1. Glad to hear it was just a naming issue. 🙂

          Have a nice day and feel free to drop a message in any situation and I’ll help as much as I can.

  4. Thanks to the great integration, it works with Vallox digit SE 2. Is it possible to set the fan speed (1-8) with the Home Assistant? for example, create automation that sets the fan speed to the fastest setting as the humidity in the washroom increases?

    1. Hi,

      Yes, of course it is possible to automatically set fan speed based on humidity (as long as you have humidity sensor in the washroom).

      You could either use the Vallox boost/fireplace switch as an action, if you have configured your vallox switch as a boost rather than fireplace switch.
      ..or you could manually automate speed change and a timer for it in Home Assistant. All the required components should be in place already (in HA and in Vallox ESP8266 module).

      Unfortunately I don’t have an example of that yet. I’ve been planning to create a similar automation for myself as well, but haven’t had time to do it yet.
      I’ll write a new post about it when I got time to do it 🙂

      1. ..one more thing, the event action for the automation is “climate.set_fan_mode” that can be used for entity “climate.ventilation”, if you wish to try it out already.

        1. Thanks. It worked.
          For automations:
          Action type: Call service
          Service: climate.set_fan_mode
          Name of entitie to change: climate.ventilation
          Service data:

          entity_id: climate.ventilation
          fan_mode: 4

  5. Hi, Thanks for all the work you have put into the project and also keeping it up to date. Today I updated to latest version that you can setup trough the Home Assistant integrations and it is working well. One small thing I would like to point out though. I noticed that fan speed display attribute from climate component is not present in the default list of entities and I had to enable it old fashioned way from configuration.yaml template sensor. Maybe it is worth displaying as default because it is quite essential information.

  6. Hi, i had vallox working via old tutorial (costum component), but today i updated HASS and vallox failed to load.
    If i follow new guideline for installing: Go Home Assistant configurations tab -> integrations and press ‘+ Add Integration’ in down right.

    Search for vallox2mqtt and click it.

    It doesn’t find it. What i’m doing wrong?

    1. Hi,

      Sorry for the late reply, I’ve somehow missed this comment totally.
      Have you updated the latest version of vallox2mqtt component from GitHub https://github.com/kotope/valloxesp in your custom_components folder?

      Double check that everything is there. I’d recommend to delete old folder and re-download it to be sure that you don’t get any conflicts with the old one 🙂

      You could also delete the old version from custom_components folder and go through installation again according this guide:
      https://www.creatingsmarthome.com/index.php/2020/08/31/guide-vallox-digit-ventilation-to-home-assistant-part-2-2-home-assistant/

  7. Went over it again and got it to work 🙂
    Must have one smth wrong first time (not very experienced with HASS).

  8. Hi Toni, Been using this integration now several months, and all fine!

    Now, when colder days are here, i noticed that entity “Ventilation front heating” stays off, even front heater is ON on a Vallox. Have you experienced this one by your self?

    Thanks!

    1. Hi,

      I don’t have the front heating on my machine, but will ask from a friend of mine that has front heating and is also using this DIY module.
      It worked ok last year, but the code has changed a bit since then.

      I will get back to you when I get the result from him 🙂

    2. Just to be sure:
      Front heating is for keeping the cell non-frozen, not to heat the incoming air so if your cell is not frozen (or the setting in Vallox is set to bypass the cell) then the front heating should stay off.
      The heating itself is done in “back heating” (jälkilämmitys) and as far as I remember Vallox does not pass that status in modbus.

      And now the question, are you sure you are not mixing up front and back heating (etulämmitys / jälkilämmitys) ? 🙂

      1. Hi Toni,

        Ok that must be the case then of course! I am talking about the back heating/jälkilämmitys, which heats the incoming air to certain temperature. So all clear now, thank you for fast support!

        1. Good to hear 🙂
          I will re-check if actual state of heating could be somehow retrieved at some point.
          Would be a good feature to see when the heating is actually heating or idle.

Leave a Reply

Your email address will not be published. Required fields are marked *