Page 1 of 1

Ikea Starkwind air filter stops working with new stable

Posted: Tuesday 03 June 2025 20:03
by solarboy
As per title, after updating Domoticz to the latest stable from the previous I started getting these errors when I tried to change speed on the filter

Code: Select all

Error: Zigbee MQTT: Climate device invalid/unknown preset_mode received! (0x2c1165fffea5bcac_fan_zigbee2mqtt: [object object])
I had kept on an earlier zigbee2mqtt (1.37.1) due to issues with RGB bulbs but as recommended I updated zigbee2mqtt to the latest version but still got these errors

Code: Select all

Error: Zigbee MQTT: Climate device invalid/unknown preset_mode received! (0x2c1165fffea5bcac_fan_zigbee2mqtt: [object object])
I then deleted the device from zigbee2mqtt and let it be recreated and discovered but am now getting these errors. No new devices were created

Code: Select all

Error: Zigbee MQTT: Climate device invalid/unknown preset_mode received! (0x2c1165fffea5bcac_fan_zigbee2mqtt: [object object])
No idea how to proceed.

Re: Ikea Starkwind air filter stops working with new stable

Posted: Tuesday 03 June 2025 20:09
by solarboy
If I manually on the device change speed this change is reflected in domoticz on the old original device, but if I try to effect a change from within domoticz the device turns off, no matter which speed setting I use, with the same error.

Code: Select all

Error: Zigbee MQTT: Climate device invalid/unknown preset_mode received! (0x2c1165fffea5bcac_fan_zigbee2mqtt: [object object])

Re: Ikea Starkwind air filter stops working with new stable

Posted: Tuesday 03 June 2025 21:49
by waltervl
Perhaps remove the retained topics from your mqtt server for this device.

Re: Ikea Starkwind air filter stops working with new stable

Posted: Tuesday 03 June 2025 23:48
by solarboy
waltervl wrote: Tuesday 03 June 2025 21:49 Perhaps remove the retained topics from your mqtt server for this device.
Thanks for your reply. I completely deleted all topics and discovery topics, still the same. Strange that setting any speed (in Domoticz) turns off the fan speed. In the zigbee2mqtt interface all is fine. Good idea though. I then deleted the original device and let Domoticz recreate it (a selector switch) by disabling then enabling the hardware in Domoticz. The very same issue with the newly created device.

Re: Ikea Starkwind air filter stops working with new stable

Posted: Tuesday 03 June 2025 23:52
by solarboy
I did notice that when I change the fan speed in Domoticz, as well as turning off the fan in z2m , it also sets the mode to "--" which perhaps indicates it is sending the wrong message and the domoticz.log message is in fact from z2m.

Code: Select all

Zigbee MQTT: Climate device invalid/unknown preset_mode received! (0x2c1165fffea5bcac_fan_zigbee2mqtt: [object object])

Re: Ikea Starkwind air filter stops working with new stable

Posted: Tuesday 03 June 2025 23:55
by solarboy
In the z2m logs is this

Code: Select all

2025-06-03 22:54:04z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/starkwind airfilter', payload '{"air_quality":"unknown","child_lock":"UNLOCK","device_age":799097,[b]"fan_mode":"[object object]"[/b],"fan_speed":0,"fan_state":"ON","filter_age":348328,"identify":null,"led_enable":false,"linkquality":12,"pm25":-1,"replace_filter":true,"update":
Note the same "object object" entry.

Re: Ikea Starkwind air filter stops working with new stable

Posted: Wednesday 04 June 2025 0:12
by solarboy
Here is the mqtt payload from mqtt explorer when i set level 5 fan speed in z2m

Code: Select all

{"air_quality":"unknown","child_lock":"UNLOCK","device_age":799097,"fan_mode":"5","fan_speed":5,"fan_state":"ON","filter_age":348328,"identify":null,"led_enable":false,"linkquality":27,"pm25":-1,"replace_filter":true,"update":{"installed_version":69633,"latest_version":69633,"state":"idle"}}
And here if I do the same via domoticz

Code: Select all

{"air_quality":"hazardous","child_lock":"UNLOCK","device_age":799097,"fan_mode":"[object object]","fan_speed":0,"fan_state":"ON","filter_age":348328,"identify":null,"led_enable":false,"linkquality":15,"pm25":127,"replace_filter":true,"update":{"installed_version":69633,"latest_version":69633,"state":"idle"}}

Re: Ikea Starkwind air filter stops working with new stable

Posted: Wednesday 04 June 2025 13:57
by waltervl
Are you now on zigbee2MQTT 2.x?

Re: Ikea Starkwind air filter stops working with new stable

Posted: Wednesday 04 June 2025 14:40
by solarboy
Yes on 2.4.0. I just repeated this all again, stopped z2m docker, disabled the MQTT Auto Discovery hardware item in Dz, deleted all discovery topics and base topics from the broker using Mqtt Explorer. I also deleted all devices relating to the airfilter in the Dz device list.

Then I restarted the z2m container and let it create all the discovery and base topics. I then enabled the MQTT Auto Discovery hardware item in Dz and let the device be re-discovered. The new Starkwind devices were created, including a selector switch for the fan speed and a custom sensor also for the fan speed.

These topics were created on the broker...
zigbee2mqtt/starkwind airfilter
{"air_quality":"hazardous","child_lock":"UNLOCK","device_age":799097,"fan_mode":"7","fan_speed":7,"fan_state":"ON","filter_age":348351,"identify":null,"led_enable":true,"linkquality":15,"pm25":152,"replace_filter":true,"update":{"installed_version":69633,"latest_version":69633,"state":"idle"}}
and
z2m/fan/0x2c1165fffea5bcac/fan/config
{"availability":[{"topic":"zigbee2mqtt/bridge/state","value_template":"{{ value_json.state }}"}],"command_topic":"zigbee2mqtt/starkwind airfilter/set/fan_state","device":{"hw_version":1,"identifiers":["zigbee2mqtt_0x2c1165fffea5bcac"],"manufacturer":"IKEA","model":"STARKVIND air purifier","model_id":"E2007","name":"starkwind airfilter","sw_version":"1.1.001","via_device":"zigbee2mqtt_bridge_0x00124b002298908f"},"name":null,"object_id":"starkwind_airfilter","origin":{"name":"Zigbee2MQTT","sw":"2.4.0","url":"https://www.zigbee2mqtt.io"},"percentage_command_template":"{{ {0:'off', 1:'1', 2:'2', 3:'3', 4:'4', 5:'5', 6:'6', 7:'7', 8:'8', 9:'9'}[value] | default('') }}","percentage_command_topic":"zigbee2mqtt/starkwind airfilter/set/fan_mode","percentage_state_topic":"zigbee2mqtt/starkwind airfilter","percentage_value_template":"{{ {'off':0, '1':1, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9}[value_json.fan_mode] | default('None') }}","preset_mode_command_topic":"zigbee2mqtt/starkwind airfilter/set/fan_mode","preset_mode_state_topic":"zigbee2mqtt/starkwind airfilter","preset_mode_value_template":"{{ value_json.fan_mode if value_json.fan_mode in ['auto'] else 'None' | default('None') }}","preset_modes":["auto"],"speed_range_max":9,"speed_range_min":1,"state_topic":"zigbee2mqtt/starkwind airfilter","state_value_template":"{{ value_json.fan_state }}","unique_id":"0x2c1165fffea5bcac_fan_zigbee2mqtt"}
I changed the speed directly on the fan hardware and this change was reflected in z2m, mosquitto and Dz. Then I went to change the fan to level 4 and instead it turned "off" with the error again ...

Code: Select all

Zigbee MQTT: Climate device invalid/unknown preset_mode received! (0x2c1165fffea5bcac_fan_zigbee2mqtt: [object object])
On the broker after this appeared..
zigbee2mqtt/starkwind airfilter/set/fan_mode
{"fan_mode":4}
But the fan switched off and in Dz it changed to off and in z2m it changed to off. Curiously there is an extra "On/Off" switch endpoint in z2m which doesn't appear in Dz. If I switch this (and not the "fan mode" endpoint) in the z2m GUI the fan will turn on. It will also turn on in z2m using the fan speed selector.

Re: Ikea Starkwind air filter stops working with new stable

Posted: Thursday 05 June 2025 7:44
by gizmocuz
You don't have to delete all endpoints... You could just delete the Starkvind one, but this is not needed in this case.

I think this issue comes from the preset_mode_value_template

As we don't support these funky 'if then else default' stuff, this

Code: Select all

"{{ value_json.fan_mode if value_json.fan_mode in ['auto'] else 'None' | default('None') }}"
gets translated to

Code: Select all

"value_json.fan_mode"
So when sending a fan state, it will send it to

preset_mode_command_topic (zigbee2mqtt/starkwind airfilter/set/fan_mode)

and the value will be

{ "fan_mode": 4 }

And (i think) it should just be '4'

When using MQTT Explorer, what happens when you publish the number 5 to

zigbee2mqtt/starkwind airfilter/set/fan_mode

Does it turn the fan on to 5? (Does this also work for 4,3, auto)

If not, could you test if it works when you send "5", or "4", or "auto"

Re: Ikea Starkwind air filter stops working with new stable

Posted: Thursday 05 June 2025 14:34
by solarboy
Yes I guess I was trying to be overly thorough.

However, that worked, just the number on it's own.

"auto" and "off" also worked.

Re: Ikea Starkwind air filter stops working with new stable

Posted: Friday 06 June 2025 8:08
by gizmocuz
Could you check beta 16720 if that solves the issue?