LukasGrebe / ha-addons

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

[mqtt error] received unmatchable topic ebusd/hwc/mode/temp0/set #74

Closed Babixa closed 6 days ago

Babixa commented 9 months ago

Hallo, I installed the addons and get the parameters of my Pump displayed in HA and it works fine. When I try to change a parameter through the following script:

alias: Test sequence:

I get: [mqtt error] received unmatchable topic ebusd/hwc/StorageTempDesiredStart/temp/set

it seems that the add-on (scan) identified or set up all parameters as sensors but some of them should be inputs

any idea ?

Thank you Xavier

LukasGrebe commented 9 months ago

hi, thanks for your ticket. it appears the addon is running correctly as MQTT and Config setup are done entirely by the ebusd code. please see that repository. it might be that writing is not enabled for these values? this is setup in the config.

GrumpyMeow commented 8 months ago

Correct. By default the auto-discovery will create readonly entities. You can override this by providing in the ebusd-addon-configuration for the field "Add variable(s) to the read MQTT integration settings." (optional fields) the value: filter-direction=r\|u\|^w. This should make some of your entities writable although this depends on the definition-file of your ebus-device. I placed a comment about on this GitHub-issue: https://github.com/john30/ebusd/issues/1038

My ebus-device also has the same field. In mqtt-explorer i can see the auto-discovery definition:

{
  "unique_id": "ebusd_bai_StorageTempDesired_temp",
  "name": "ebusd bai StorageTempDesired temp",
  "device": {
    "identifiers": "ebusd_bai",
    "manufacturer": "ebusd.eu",
    "name": "ebusd bai",
    "via_device": "ebusd",
    "sw_version": "23.2",
    "suggested_area": "CV-Hok"
  },
  "value_template": "{{value_json[\"temp\"].value}}",
  "state_topic": "ebusd/bai/StorageTempDesired",
  "unit_of_measurement": "°C",
  "state_class": "measurement",
  "device_class": "temperature"
}

Looking at this i suspect that you should be using:

service: mqtt.publish
data:
  topic: ebusd/hwc/StorageTempDesired/set
  payload: { "temp": { "value" : 45 } }

Minor update.. I just saw this field was pushed in mqtt-explorer with payload:

{
     "temp": {"value": 47.00}
}

Hope it helps! Be careful with changing random parameters of your ebus-device. This as you might cause things to get out-of-spec and cause issues like over-pressure, legionella, etc.

citoki commented 3 months ago

@GrumpyMeow thanks for the information, highly recommended!! For the ebusd variable, filter-direction=r|u|w worked well for me (entered it via the plugin config UI). After that, MQTT got new entities, which starts now with number instead of sensor which makes sense of course, e.g.:

image

This can be changed with mqtt.publish service, as you've showed above. In addition after adding these number.* entities as a tile, most of it works nicely.

image

Only the hc1heatcurve and z1actualroomtempdesired entities doesn't change the properties and are switched to the previous value which is configured in the heat configuration. Any ideas?

r;w,,Hc1heatCurve,Heat Curve for Heat Cycle 1,,,,0F00,,,EXP,,,heating curve of HC1
r;w,,z1ActualRoomTempDesired,RoomSetpoint Zone 1,,,,1400,,,tempv,,,curren room setpoint 
vbueschken commented 3 months ago

@citoki could you post the YAML for your ebusd integration via the addon ? Thanks

citoki commented 3 months ago

@vbueschken here you go: I'm currently using the config from PR370

scanconfig: true
loglevel_all: notice
mqtttopic: ebusd
mqttint: /etc/ebusd/mqtt-hassio.cfg
mqttjson: true
network_device: enh:192.168.1.53:9999
accesslevel: "\"*\""
configpath: /config/ebusd-custom-configs/rmalbrecht-ebusd-configuration/ebusd-2.1.x/de
mqttvar: filter-direction=r|u|w
vbueschken commented 3 months ago

Thanks @citoki I'm a bit confused about the value for filter-direction

so I'm not sure, what is the right configuration

citoki commented 3 months ago

@vbueschken during my short tests, I couldn't get it working with the ^ sign. Maybe the version by @john30 is working as well, as I think the escape backslashes aren't needed within this add-on here. Maybe the filter-direction string is being parsed as regex, but couldn't see it actually in the code: https://github.com/john30/ebusd/blob/38a6b7bae9237d02c6c82b55aa377a17090dc421/src/ebusd/mqtthandler.cpp#L734

If it's being parsed as a regex string, then the ^ doesn't makes sense to me, as it refers to the very first char in an CSV config file (when multiline isn't active). Usually, the config files have r;w,, as a starting line, which then wouldn't be fetched:

image

Thus, to anser your question try Johns or my value ¯_(ツ)_/¯

LukasGrebe commented 6 days ago

closed as ebusd config & command line option error.