LukasGrebe / ha-addons

Addons for Home Assistant
GNU General Public License v3.0
37 stars 42 forks source link

Can't write or change values using MQTT to ebusd #46

Closed DrDuk closed 1 year ago

DrDuk commented 1 year ago

I have the ebus Adapter 3.

Installed the ebusd supervisor addon with accesslevel: "*" readonly: false

When I send to topic: ebusd/bai/FlowTempDesired/set 67

I get back from the logs: 2022-12-14 20:11:11.894 [mqtt error] write message bai FlowTempDesired not found

Reading the same value works fine: ebusd/bai/FlowTempDesired/get

returns 2022-12-16 13:56:15.689 [update notice] sent poll-read bai FlowTempDesired QQ=31: 60.00 2022-12-16 13:56:15.689 [mqtt notice] read bai FlowTempDesired: 2022-12-16 13:56:17.261 [update notice] sent poll-read bai PrEnergyCountHc3 QQ=31: 0

Looking at the MQTT ebusd bai device and the MQTT configuration information, all of the entities are sensors and none come up as inputs, e.g.

ebusd bai FlowTempDesired temp (sensor.ebusd_bai_flowtempdesired_temp) MQTT discovery data: Topic: homeassistant/sensor/ebusd_bai_FlowTempDesired_temp/config Payload unique_id: ebusd_bai_FlowTempDesired_temp name: ebusd bai FlowTempDesired temp device: identifiers: ebusd_bai manufacturer: ebusd.eu name: ebusd bai via_device: ebusd sw_version: '22.4' suggested_area: Heating value_template: '{{value_json["temp"].value}}' state_topic: ebusd/bai/FlowTempDesired unit_of_measurement: °C state_class: measurement device_class: temperature platform: mqtt

I wonder if the supervisor addon doesn't allow write functionality or if a further configuration setting needs to be made? I haven't loaded a custom csv config file for my boiler. Do I need to edit mqtt-hassio.cfg and if so how? Thanks

LukasGrebe commented 1 year ago

Hi DrDuk Thank you for the issue. Supervisor runs this Add-on which is more or less simply the docker provided by ebusd.

All that only means that not beeing able to write is most likely not an issue of supervisor.

Most likely, writing is not supported by the loaded Config files. These depend on the ID pf your devices.

If you could send the scan results or provide the names of the config files loaded by ebusd, as to check these Files if writing the desired flow temp to the bus is supported.

DrDuk commented 1 year ago

Hi Lukas --accesslevel=* --mqttint=/etc/ebusd/mqtt-hassio.cfg is loaded. I've tried loading a custom file with the write enabled but this made no difference.

The logs show: 2022-12-16 16:58:13.448 [bus notice] scan 08: ;Vaillant;BAI00;0604;5502 2022-12-16 16:58:13.448 [update notice] store 08 ident: done 2022-12-16 16:58:13.448 [update notice] sent scan-read scan.08 QQ=31: Vaillant;BAI00;0604;5502 2022-12-16 16:58:13.448 [bus notice] scan 08: ;Vaillant;BAI00;0604;5502 2022-12-16 16:58:14.342 [main notice] read common config file vaillant/broadcast.csv 2022-12-16 16:58:14.582 [main notice] read common config file vaillant/scan.csv 2022-12-16 16:58:14.825 [main notice] read common config file vaillant/general.csv 2022-12-16 16:58:15.067 [main notice] read scan config file vaillant/08.bai.csv for ID "bai00", SW0604, HW5502

I don't know where to get the vaillant/general.csv file or how to edit it. Is this provided by John's ebusd component? Thanks

tim-devel commented 1 year ago

I suspect that FlowTempDesired is defined as a read only message. The error message is saying that you cannot write because it isn't found (i.e. defined). You will need to check which config CSV is being loaded for your boiler and see if it starts with an r (read only) or a w (write).

There is more detail here:. https://github.com/john30/ebusd/wiki/4.1.-Message-definition

You could try cloning ebusd-configuration into your config folder and changing the r for a w and see if it lets you write to that setting. If not you would need to sniff for bus messages, turn the dial on the boiler and try and spot the relevant messages in the raw data dump. You could then write a custom message to change this value.

For the record I would love to be able to change FlowTempDesired on my Valiant Ecotec Pro boiler but I gave up trying a long time ago as I couldn't get it to work.

Please do feedback if you make any progress

DrDuk commented 1 year ago

Thank you both. The mists are staring to clear! My ebusd is loading the "08" file which contains the row:

r |   | FlowTempDesired | d.05 flow/return setpoint |   |   |   | 3900 |   |   | temp |   |   | Flow temperature target value or return target value when return regulation is set

so it is read only. This is a real shame as it is the only parameter that I want to change remotely, probably for the same reasons as Tim.

I'll try to clone the folder and edit it but I also have a Valiant ecoTEC plus boiler so it might be locked out as well.

I'll let you know if I figure it out.

LukasGrebe commented 1 year ago

For room/zone heating, have you tried simply changing the desired room temp to influence the flow temp?

tim-devel commented 1 year ago

The next step is to git clone https://github.com/john30/ebusd-configuration into your /config folder and then point the ebusd add-on at this config using the configpath option.

You then trial and error changing the r to w and see if it works. (At your own risk though!)

DrDuk commented 1 year ago

OK, some progress but not there yet:

My steps so far.

  1. Download a full zip of https://github.com/john30/ebusd-configuration
  2. Copy this into the /config folder in HomeAssistant (I used SMB to remote mount the folder on my QNAP, which is hosting HomeAssistant).
  3. In the YAML config editor of the ebusd supervisor addon, I pointed the addon to my particular folder using the following:

accesslevel: "*" readonly: false configpath: /config/ebusd/config/ebusd-configuration-master/ebusd-2.1.x/en)

  1. My boiler seems to pick up the 08 config files but the 08.bai.csv doesn't contain any ebusd parameters (I'm looking for FlowTempDesired). Instead it appears to reference a load of .inc files. Many of these do have the correct parameters.
  2. I edited my local version of all of the bai.?????????.inc files to change the "r" to "r;w" for the FlowTempDesired, e.g. r;w,,FlowTempDesired,d.05 Flow/return set point
  3. I restarted the ebusd addon.
  4. I sent the following MQTT messsage using the MQTT Explorer addon (good for testing).
  5. I received from the ebusd logs: 2022-12-17 08:13:18.599 [update notice] sent write bai FlowTempDesired QQ=31: 68.00 2022-12-17 08:13:18.599 [mqtt notice] write bai FlowTempDesired: 68 rather than 2022-12-14 20:11:11.894 [mqtt error] write message bai FlowTempDesired not found

However, the actual parameter doesn't change on the boiler (ecoTEC plus 637)

Perhaps there is another entry to edit or I need to update a different parameter and FlowTempDesired is only used for reads. I might also try changing to r;wi to see if that makes a difference.

tim-devel commented 1 year ago

That is as far as I got. The next step is to follow this guide:

https://github.com/john30/ebusd/wiki/HowTos

DrDuk commented 1 year ago

How and when do you send the grab command?

tim-devel commented 1 year ago

Reading the guide, I think you would need to send a grab command, change the flow temp on the boiler to a known value and then run grab result and see if you can spot it. It might be with opening a question on the ebusd wiki below. someone with some more experience of this may be able to help.

https://github.com/john30/ebusd/discussions

DrDuk commented 1 year ago

This is getting quite hardcore

tim-devel commented 1 year ago

This is getting quite hardcore

Ha, that is why I gave up at this point 🙂

LukasGrebe commented 1 year ago

to run Grab through ebusctl, ssh into HA and then run

 docker exec -it `docker ps | grep ebusd | awk '{print $1}'` /bin/bash

to get a bash terminal in the ebusd add-on.

I'm also working on a simple homeassistant ingress page to run some of these commands directly from within ha / the browser, however I'm constraint by my free time working on this...

LukasGrebe commented 1 year ago

closing as stale