Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.8k stars 1.64k forks source link

Impossible change preset mode in Moes BHT-002-GCLZB device #20619

Closed PacmanForever closed 2 weeks ago

PacmanForever commented 8 months ago

What happened?

Impossible change preset mode from "program" to "hold" (and viceversa).

A few weeks ago this worked.

I tried with HA and Z2M UI.

You can change the value from any UI but when refresh it the value return to "program" again.

Device: https://www.zigbee2mqtt.io/devices/BHT-002-GCLZB.html#moes-bht-002-gclzb

What did you expect to happen?

I want to change preset mode from "program" to "hold".

How to reproduce it (minimal and precise)

Configuring this device from Z2M UI.

Zigbee2MQTT version

1.35.0-dev

Adapter firmware version

20211210

Adapter

zzh

Debug log

no error in traces

luism2p commented 8 months ago

.... same with BHT-006... Un saludo

PacmanForever commented 8 months ago

@Koenkk Could you help us when you have a moment? Thanks

Koenkk commented 8 months ago

What's the last known working z2m version?

PacmanForever commented 8 months ago

I think 1.34, 1.33 sure

richsimpson commented 8 months ago

Yes noticed the same, sorry can;t confirm when it last worked but recently I would say within last couple of weeks. I tend to have latest z2m updates always if that is any help for time line.

Electric floor heating BHT-002-GCLZB

Click Program and it ignores the command and stays in Hold. On Z2M the option turns grey but makes no change and leave the page and return shows Hold again.

Note setting on the device to Program mode, does make the device show in z2m as correct state. Obviously that also pushes through to HASS

Koenkk commented 8 months ago

@jvcsw could you provide the debug log of setting this with both 1.35.1 and 1.33.0?

See this on how to enable debug logging.

PacmanForever commented 8 months ago

I attach logs filtered by device while I tried to change preset mode.

Log 1.33.0 .txt Log 1.35.1 .txt

Koenkk commented 8 months ago

@a2nt this is due to https://github.com/Koenkk/zigbee-herdsman-converters/pull/6654, dataPoints.tvMode and dataPoints.moesHold are both 2, meaning that https://github.com/Koenkk/zigbee-herdsman-converters/blob/8ff72e77e2d09bb217f2b8bf16a95d99d17a92fb/src/lib/legacy.ts#L3899 is never executed anymore and thus preset is never set anymore, could you take a look at this?

PacmanForever commented 7 months ago

Hi again,

Is there any news on this topic?

Thanks

a2nt commented 7 months ago

@jvcsw Hey there, I was the developer of changing heat-fan-cold modes. Can you tell me how do you change mode to hold manually at the device?

PacmanForever commented 7 months ago

Hi,

in my case, this button change from hold to program and viceversa. The button works fine and HA show the changes, but it's impossible change it from HA/Z2M.

imagen

I found this error but I don't know if can help you.

Logger: homeassistant.components.mqtt.climate Source: components/mqtt/climate.py:828 Integration: MQTT (documentation, issues) First occurred: 17:30:11 (14 occurrences) Last logged: 17:31:15 Invalid modes mode: cool

a2nt commented 7 months ago

Hi,

in my case, this button change from hold to program and viceversa. The button works fine and HA show the changes, but it's impossible change it from HA/Z2M.

imagen

I found this error but I don't know if can help you.

Logger: homeassistant.components.mqtt.climate Source: components/mqtt/climate.py:828 Integration: MQTT (documentation, issues) First occurred: 17:30:11 (14 occurrences) Last logged: 17:31:15 Invalid modes mode: cool

Hmm it works different for me. I can see that there's Sun icon under the temperature it's heating mode Can u switch this icon? When I click to the same button as you do it switch modes: cool, heat, fan-only

IMG_20240204_173159

I suppose that there's 2 different devices that looks close, but with slightly different functionality so need to find out device ID differences.

Are you able to control Fan and Fan speed or it's floor heating only? I have 2 speed fan outside my house that blows fresh air into rooms. I turn on fan once per day to refresh the air by schedule or by air quality sensors.

My model is BAC-002-ALZB What's you model exactly, you can see it at zigbee http interface?

richsimpson commented 7 months ago

Hi. My model is https://www.zigbee2mqtt.io/devices/BHT-002-GCLZB.html#moes-bht-002-gclzb

GCLZB. 16amp electric heating.

My options. Are hold or preset. I have the option to heat or off

Same issue. Main button on device works. The off/heat commands work but not the hold/preset.

Warning refers to cold and no applicable state.

IMG_0026

a2nt commented 7 months ago

Ok made a fix, looks like BAC-002-ALZB only has cold and fan controls

richsimpson commented 7 months ago

Ok made a fix, looks like BAC-002-ALZB only has cold and fan controls

Hi, Does that fix mean the change will impact the GCLZB version? to avoid the constant reminders on a HASS restart

Logger: homeassistant.helpers.entity Source: helpers/entity.py:1129 First occurred: 13:21:57 (1 occurrences) Last logged: 13:21:57

Failed to set state for sensor.underfloor_heating_program, fall back to unknown Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1129, in _async_write_ha_state hass.states.async_set( File "/usr/src/homeassistant/homeassistant/core.py", line 1807, in async_set state = State( ^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 1384, in init validate_state(state) File "/usr/src/homeassistant/homeassistant/core.py", line 204, in validate_state raise InvalidStateError( homeassistant.exceptions.InvalidStateError: Invalid state with length 933. State max length is 255 characters.

PacmanForever commented 7 months ago

Ok made a fix, looks like BAC-002-ALZB only has cold and fan controls

With this change it seems to work. I will check it in a few days.

Thanks.

richsimpson commented 7 months ago

I have switched to the edge addon of z2m and once I have initially set to hold or preset from the z2m edge addon, (device, exposed tab) I am indeed able to control again from Home Assistant using the climate card options etc.

I still get some random errors. Fall back to UNKNOWN state, which then triggers an error on the homekit bridge that Unknown is and invalid state.

I think connected to the message length as it is sending over mqtt the full schedule list, which is long. So unconnected? Not sure image

richsimpson commented 7 months ago

Actually scrap that, on a hass restart, the change from hold to preset is ignored.

Have to go back into z2m and change there for it to take effect. Then it seems to work sometimes. Not always.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days