MQTT autodiscovery of fan and swing Topic is solved

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
Syndomo
Posts: 8
Joined: Sunday 21 August 2022 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

MQTT autodiscovery of fan and swing

Post by Syndomo »

I've got a Faikin module to control a Daikin airco. It's connected via MQTT to Domoticz. All works fine except that no fan or swing devices are created by the Domoticz autodiscovery (MQTT Auto Discovery Client Gateway with LAN interface).

The MQTT config message looks OK. Based on this message several devices are created: temperature, setpoint, preset (eco-boost-home), and mode (heat-cool-etc). But no fan or swing device - though the message seems to contain the required information.

Full message:

Code: Select all

{"unique_id":"983DAEF01904","dev":{"ids":["983DAEF01904"],"name":"MyRoom","mdl":"12FC","sw":"9f65e5b","mf":"RevK","cu":"http://MyRoom.local/"},"icon":"mdi:thermostat","avty_t":"state/MyRoom","avty_tpl":"{{value_json.up}}","pl_avail":true,"pl_not_avail":false,"~":"command/MyRoom","min_temp":14,"max_temp":32,"temp_unit":"C","temp_step":0.5,"temp_cmd_t":"~/temp","temp_stat_t":"state/MyRoom","temp_stat_tpl":"{{value_json.target}}","curr_temp_t":"state/MyRoom","curr_temp_tpl":"{{value_json.temp}}","mode_cmd_t":"~/mode","mode_stat_t":"state/MyRoom","mode_stat_tpl":"{{value_json.mode}}","payload_on":"1","payload_off":"0","power_command_topic":"~/power","modes":["heat_cool","off","cool","heat","dry","fan_only"],"fan_mode_cmd_t":"~/fan","fan_mode_stat_t":"state/MyRoom","fan_mode_stat_tpl":"{{value_json.fan}}","fan_modes":["auto","low","lowMedium","medium","mediumHigh","high","night"],"swing_mode_cmd_t":"~/swing","swing_mode_stat_t":"state/MyRoom","swing_mode_stat_tpl":"{{value_json.swing}}","swing_modes":["off","H","V","H+V","C"],"pr_mode_cmd_t":"~/preset","pr_mode_stat_t":"state/MyRoom","pr_mode_val_tpl":"{{value_json.preset}}","pr_modes":["eco","boost","home"]}
This is the fan part of the message:

Code: Select all

"fan_mode_cmd_t":"~/fan","fan_mode_stat_t":"state/MyRoom","fan_mode_stat_tpl":"{{value_json.fan}}","fan_modes":["auto","low","lowMedium","medium","mediumHigh","high","night"],
and this is the swing part:

Code: Select all

"swing_mode_cmd_t":"~/swing","swing_mode_stat_t":"state/MyRoom","swing_mode_stat_tpl":"{{value_json.swing}}","swing_modes":["off","H","V","H+V","C"],
What could be the cause ?

-------
Whilst we're at it: I've been searching through the MQTTAutoDiscover.cpp code. There's probably two LOG_ERROR messages for the swing discovery that have been copied over from the fan discovery code where the word fan should be replaced by swing. It concerns lines 3495 and 3543. Not that I get those errors, I just thought I'd signal it.
Reading through the code I can't see why no fan or swing are created in my configuration - but then I'm all but a C++ expert.
Last edited by Syndomo on Tuesday 07 January 2025 19:01, edited 1 time in total.
Raspberry Pi 4 4GB - Bookworm - Domoticz v2024.7
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT autodiscovery of fan and swing

Post by waltervl »

Better make a GitHub issue if you have MQTT AD issues and follow the instructions in https://wiki.domoticz.com/MQTT_AD_Report_Problems
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
waltervl
Posts: 5392
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: MQTT autodiscovery of fan and swing

Post by waltervl »

Additional: also check this issue https://github.com/domoticz/domoticz/issues/6069
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Syndomo
Posts: 8
Joined: Sunday 21 August 2022 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.7
Contact:

Re: MQTT autodiscovery of fan and swing

Post by Syndomo »

Raspberry Pi 4 4GB - Bookworm - Domoticz v2024.7
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests