Ebus integration?

well, then I would suggest the following exercise:

  1. Run tail -f /var/log/ebusd.log | grep Hc1DayTemp in one of the terminals/consoles
  2. Subscribe with mosquitto_sub to ebusd/350/Hc1DayTemp in the other, so we can see both logs
  3. Change the temperature using the wall thermostat

If there is NO message published and we see that Hc1DayTemp has changed and captured by ebusd then we have a bug in ebusd and this use-case and the issue should be reported to john30

BTW, I would strongly recommend setting the following:
availability_topic
payload_available
payload_not_available

If I read the code correctly then publishing something like

ebusd/350/Hc1NightTemp/get?1

will enable polling of Hc1NightTemp with priority 1… Need to test and confirm

UPD. The poll and MQTT IS documented here:

For /get and /set suffixes, the optional message payload can be used to transfer additional input data, e.g. the values to be set for a write message or the needed input for a read message, separated by semicolon.

In addition to that, appending a question mark and a poll priority digit allows adjusting the poll priority for read messages. For example, using mosquitto_pub -m '?3' -t 'ebusd/uih/YieldSum/get' would set the uih/YieldSum message to be polled with priority 3 and is equivalent to issuing ebusctl -c uih -p 3 YieldSum .

you mean to have this in HA YAML config ?

at the moment I do have it like this:

climate vaillantThermostat:
  - platform: mqtt
    name: "Hc1DayTemp"
    temperature_state_topic: "ebusd/350/Hc1DayTemp"
    temperature_command_topic: "ebusd/350/Hc1DayTemp/set"
  - platform: mqtt
    name: "Hc1NightTemp"
    temperature_state_topic: "ebusd/350/Hc1NightTemp"
    temperature_command_topic: "ebusd/350/Hc1NightTemp/set"
  - platform: mqtt
    name: "Thermostat Mode"
    mode_state_topic: "ebusd/350/Hc1OPMode"
    mode_command_topic: "ebusd/350/Hc1OPMode/set"
    modes:
      - auto
      - summer
      - night
      - on
      - off
    current_temperature_topic: "ebusd/350/DisplayedRoomTemp"
    temperature_state_topic: "ebusd/350/Hc1DayTemp"
    temperature_command_topic: "ebusd/350/Hc1DayTemp/set"
    retain: true
    initial: 23
    min_temp: 10
    max_temp: 30

With this:
$ docker exec -i mosquitto mosquitto_pub -n -t ebusd/350/Hc1NightTemp/get?1

I only get this back via MQTT:

ebusd/350/Hc1NightTemp/get?1 (null)
ebusd/350/Hc1NightTemp/get?1 (null)

So no response actually :frowning:

No, this needs to be done once for every parameter you want to be polled at the very startup, right after there is a connection with ebusd.
In the YAML I would recommend adding availability_topic, payload_available, payload_not_available, so when connection to ebusd dies you don’t have uncontrolled stalled data

Modify the below example from the ebusd’ documentation:

yes, that gives me the result once per mqtt:
$ mosquitto_pub -m '?3' -t 'ebusd/350/Hc1NightTemp/get'

I get in mqtt:

ebusd/350/Hc1NightTemp/get ?3
ebusd/350/Hc1NightTemp 21.0

like that with /get?1:
mosquitto_pub -m '?3' -t 'ebusd/350/Hc1NightTemp/get?1'

I get nothing back…

So I’m afraid the only option is to run my dummy script:

 cat ebusdMqttRefresh.sh
#!/bin/bash
mosquitto_pub -n -t ebusd/350/Hc1OPMode/get
mosquitto_pub -n -t ebusd/350/Hc1DayTemp/get
mosquitto_pub -n -t ebusd/350/Hc1NightTemp/get
mosquitto_pub -n -t ebusd/350/DisplayedRoomTemp/get
mosquitto_pub -n -t ebusd/350/BMUB51101BoilerFlowTemp/get

mosquitto_pub -n -t ebusd/bai/Flame/get

This should enable polling with priority 3, so you should see ebusd queries this parameters once in 3 * polling_interval seconds - please confirm you see this happening in ebusd logs

This is not correct, I didn’t read the documentation carefully, sorry. But this will set polling priority t 1*pollin_interval:
mosquitto_pub -m '?1' -t 'ebusd/350/Hc1NightTemp/get'
and you should see this happening in ebusd logs

I still believe we can avoid that

Was there ever a new batch of the boards made? I can’t quite work out the german on the forum, but I’d really like to get hold of one :slight_smile:

Here how I set up the polling:

################################################################################
# Setup ebusd messages to poll
################################################################################
- alias: 'ebusd setup VRC700f/4 polling priorities'
  trigger:
    platform: state
    entity_id: binary_sensor.ebusd_vrc700f_4_connected
    to: 'on'
  action:
    # Set priority to 1 polling interval: ebusd will add all the below
    # into its message queue and will query one of the parameters per
    # polling interval
    - service: mqtt.publish
      data_template:
        topic: ebusd/b7v/z1RoomTemp/get
        payload: '?1'
    # set priority to 2 polling intervals
    - service: mqtt.publish
      data_template:
        topic: ebusd/b7v/z1DayTemp/get
        payload: '?2'

Please pay attention on the trigger: this automation runs when my VRC700 has been scanned. To force scanning (as ebusd may have already scanned the devices before HA start):

- alias: 'ebusd force ebusd scanning'
  trigger:
    - platform: mqtt
      topic: "ebusd/global/signal"
      payload: 'true'
  action:
    - service: mqtt.publish
      data_template:
        topic: ebusd/scan.08/id/get
        payload: '?'
    - service: mqtt.publish
      data_template:
        topic: ebusd/scan.15/id/get
        payload: '?'

and

- platform: mqtt
  name: "ebusd BAI connected"
  device_class: connectivity
  state_topic: "ebusd/scan.08/id"
  availability_topic: "ebusd/global/signal"
  payload_available: "true"
  payload_not_available: "false"
  qos: 2
  value_template: >
    {% if "0010021961" in value %}
      ON
    {% else %}
      OFF
    {% endif %}

- platform: mqtt
  name: "ebusd VRC700f/4 connected"
  device_class: connectivity
  state_topic: "ebusd/scan.15/id"
  availability_topic: "ebusd/global/signal"
  payload_available: "true"
  payload_not_available: "false"
  qos: 2
  value_template: >
    {% if "0020197207" in value %}
      ON
    {% else %}
      OFF
    {% endif %}

I don’t like the hardcodes inside, but don’t know how those can be avoided, e.g. read from configuration or so

1 Like

First of all, I’m really sorry for the delayed answer, I was quite busy at home with other stuff …

Interesting approach, but for some of the config I do need some clarifications:
How did you came up with these values templates:

This is for the boiler (bai), right ?
Are those values valid for my boiler or I need to figure that out in some way ?

This is for the wall thermostat I guess.
But again are the values valid for me too or how should I get them ?

Just for my understanding: you are pulling the values via MQTT via an automation in HA, right?
How oft will this happen and in which conditions ? e.g. HA restart, value change in ebusd?

The values in the templates come from ebusctl scan result:

08;Vaillant;BAI00;0104;7803;21;18;23;0010021961;0001;005167;N4
15;Vaillant;B7V00;0422;5503;21;18;36;0020197207;0082;013759;N6

So, 0010021961 and 0020197207 are those numbers you have to replace in your setup to the corresponding values of your equipment. In my case I can also use BAI00 and B7V00 as unique identifiers as well: basically any value which allows you to uniquely identify the HW can be used here.

No, for that I have an automation which sets up ebusd to poll for me, e.g. for BAI:

    - service: mqtt.publish
      data_template:
        topic: ebusd/bai/FlowTemp/get
        payload: '?1'

This piece will run once we have scan result from ebusd meaning that ebusd can now send/receive commands to/from BAI. By this automation I instruct ebusd to set polling priority to 1 for BAI’s FlowTemp. Sending this before ebusd has scanned BAI will do nothing as bai/FlowTemp is not yet known to ebusd. This can happen when HA starts before ebusd or if ebusd restarts - for that reason we have to maintain ebusd connection/signal status changes at run time.

Well, we can have number of states here to define our state machine:

  1. ebusd started before HA and has scanned the equipment
  2. ebusd and HA started, but ebusd has not yet scanned the HW
  3. ebusd has restarted, but HA not
  4. etc.
    I have this trigger to start scanning:
- alias: 'ebusd force ebusd scanning'
  trigger:
    - platform: mqtt
      topic: "ebusd/global/signal"
      payload: 'true'
  action:
    - service: mqtt.publish
      data_template:
        topic: ebusd/scan.08/id/get
        payload: '?'
    - service: mqtt.publish
      data_template:
        topic: ebusd/scan.15/id/get
        payload: '?'

but it is not immediately correct as per my understanding ebusd/global/signal just shows that it has acquired the signal on the bus and it doesn’t mean it has scanned the equipment. So, the best is to have yet another trigger to start generic scanning, but for that there is no means at ebusd MQTT, e.g. you cannot request ebusd/scan/get or something. So, this is a trade off I took, but I do realize it leads to race conditions and might not work all the time…

WRT polling intervals. In my experiments I see that ebusd does poll the values for me: those with priority 1 are placed in the corresponding message queue and are polled in round-robin fashion one parameter at --pollinginterval seconds, e.g. if you have a single FlowTemp with priority 1 then every --pollinterval seconds, if you have 2 parameters with priority 1 then every param will be polled every 2 * (–pollinterval) seconds and so on.


  # Current action/status: expects idle, cooling, heating, drying, or off.
  action_topic: "ebusd/b7v/Hc1Status"
  action_template: >
    {% set values = { '0':'idle', '1':'heating' } %}
    {{ values[value] if value in values.keys() else 'idle' }}
  # Mode control: expects auto, off, cool, heat, dry, fan_only
  # but VRC has 0=off;1=modulating;2=thermostat
  # Map off->off, auto->modulating, heat->thermostat
  mode_state_topic: "ebusd/b7v/Hc1RoomTempSwitchOn"
  mode_state_template: >
    {% set values = { 'off':'off', 'modulating':'auto', 'thermostat':'heat' } %}
    {{ values[value] if value in values.keys() else 'idle' }}
  # FIXME: mode_command_topic has no value template, so climate control
  # will send mode as a string "modes[i]" to the MQTT topic, which
  # results in "auto" instead of "modulating" and "heat" instead of termostat
  # Work this around as described https://community.home-assistant.io/t/enhanced-version-of-mqtt-hvac-climate-platform-with-proper-history-chart/75304/31
  mode_command_topic: "quirk_ebusd_b7v_Hc1RoomTempSwitchOn_set"
  # FIXME: off requires quotes for some reason to be displayed in the card
  modes:
    - 'off'
    - auto
    - heat

Hello all

Where are we with this integration?

I’m about to jump on this ship with a Vaillant EcoTec Plus boiler, so I’m gonna need all the help in the world!

Hello!

Can someone provide the Gerber files and the components for that board?

I´ve been looking into it, but all the designs I´ve found are incomplete. I’m not sure if they are open source though…

For me MQTT based integration works for now, but it has number of flaws.
I would then recommend looking at the following promising work (WIP ATM):


I do think this is what it should look like when we talk about ebusd integration into HA.
Let’s support @c0fec0de and his great work :wink:

@andr2000
@luci84tm
i try to figure how to configure ebus using your method.

automation:
################################################################################
# Setup ebusd messages to poll
################################################################################
  - alias: 'ebusd setup f47 polling priorities'
    trigger:
      platform: state
      entity_id: binary_sensor.ebusd_f47_connected
      to: 'on'
    action:
      # Set priority to 1 polling interval: ebusd will add all the below
      # into its message queue and will query one of the parameters per
      # polling interval
      - service: mqtt.publish
        data_template:
          topic: ebusd/f47/z1RoomTemp/get
          payload: '?1'
      # set priority to 2 polling intervals
      - service: mqtt.publish
        data_template:
          topic: ebusd/f47/z1DayTemp/get
          payload: '?2'

  - alias: 'ebusd force ebusd scanning'
    trigger:
      - platform: mqtt
        topic: "ebusd/global/signal"
        payload: 'true'
    action:
      - service: mqtt.publish
        data_template:
          topic: ebusd/scan.08/id/get
          payload: '?'
      - service: mqtt.publish
        data_template:
          topic: ebusd/scan.15/id/get
          payload: '?'

it must by in automation ?
how to know what value to fill in the field entity ?

i diden’t find the section where to put the following?

action_topic: "ebusd/b7v/Hc1Status"
  action_template: >
    {% set values = { '0':'idle', '1':'heating' } %}
    {{ values[value] if value in values.keys() else 'idle' }}
  # Mode control: expects auto, off, cool, heat, dry, fan_only
  # but VRC has 0=off;1=modulating;2=thermostat
  # Map off->off, auto->modulating, heat->thermostat
  mode_state_topic: "ebusd/b7v/Hc1RoomTempSwitchOn"
  mode_state_template: >
    {% set values = { 'off':'off', 'modulating':'auto', 'thermostat':'heat' } %}
    {{ values[value] if value in values.keys() else 'idle' }}
  # FIXME: mode_command_topic has no value template, so climate control
  # will send mode as a string "modes[i]" to the MQTT topic, which
  # results in "auto" instead of "modulating" and "heat" instead of termostat
  # Work this around as described https://community.home-assistant.io/t/enhanced-version-of-mqtt-hvac-climate-platform-with-proper-history-chart/75304/31
  mode_command_topic: "quirk_ebusd_b7v_Hc1RoomTempSwitchOn_set"
  # FIXME: off requires quotes for some reason to be displayed in the card
  modes:
    - 'off'
    - auto
    - heat
  - platform: mqtt
    name: "ebusd BAI connected"
    device_class: connectivity
    state_topic: "ebusd/scan.08/id"
    availability_topic: "ebusd/global/signal"
    payload_available: "true"
    payload_not_available: "false"
    qos: 2
    value_template: >
      {% if "0010003211" in value %}
        ON
      {% else %}
        OFF
      {% endif %}

  - platform: mqtt
    name: "ebusd f47 connected"
    device_class: connectivity
    state_topic: "ebusd/scan.15/id"
    availability_topic: "ebusd/global/signal"
    payload_available: "true"
    payload_not_available: "false"
    qos: 2
    value_template: >
      {% if "0020108135" in value %}
        ON
      {% else %}
        OFF
      {% endif %}

could you help?

You can see how it is implemented in my case here
Please read carefully all the above in this thread and pay attention to the way scan results are handled

Not sure what do you mean here. Could you please give an example?

I hope that my sample HA config answers the question what goes where, e.g. where and what the automations are etc.

thanks for your help i will check this tomorow