revk / ESP32-Faikin

ESP32 based module to control Daikin aircon units
GNU General Public License v3.0
319 stars 45 forks source link

[FEATURE] IObroker Support #277

Closed ESDN83 closed 2 months ago

ESDN83 commented 2 months ago

The current implementation for MQTT is driving me crazy.... I must run a dedicated HA instance controlling 3 Faikin modules.

I'm running anything on my IO broker. But in the case of Faikin it's not possible properly setting that up.

At the same time, I'm using e.g. "https://github.com/jomjol/AI-on-the-edge-device" what is working immediately out of the box flawless.

The issues I'm detecting are:

  1. The Json is not interpreted into objects in IO broker. No clue why this is happening only on Faikin?
  2. I can only read/use MQTT Prefix e.g. "state/GuestAC/state".....and I cannot create Prefix as I like, which is a decision by IO broker keeping the system clean. -> sending a command is basically not possible that way.
  3. Prefix and Topics are not created during detection.... because of that usage is not possible outside the state/ and Faikin/ Topics.
  4. The Topic naming is wild... why can't I set: "GuestAC/state"; "GuestAC/commands"; "GuestAC/settings" ...... as Topic?
revk commented 2 months ago

The MQTT is what it is. it is documented. Feel free to use it, or not.

Or, if you really want, as it is open source, fork your own code, up to you.

njh commented 2 months ago

There are a number of tools out there for remapping MQTT topics. Maybe your MQTT Server even supports it?

How about mqttwarn using the mqttpub configuration option?

[config:mqttpub]
targets = {
                                  # topic            qos     retain
    'state/faikin1'             : [ 'myprefix/faikin1/state',  1,     True ],
    'state/faikin1/status'      : [ 'myprefix/faikin1/status', 1,     True ],
    'error/faikin1/whatever     : [ 'myprefix/faikin1/error',  1,     False ],

    'myprefix/faikin1/command'  : [ 'command/faikin1/command', 1,     False ],
  }

I am fairly sure you can match/substitute wildcards with it too.