zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

New device: Moes (Tuya?) ZigBee Thermostat Programmable Temp Controller BHT-002-GCLZBW

Open insipiens opened this issue 6 years ago • 162 comments

What happened: Device is not supported

What did you expect to happen: Expected to follow the procedure to add the device and review debug level logs - logs are empty. wireshark output included but outside my experience level to resolve

How to reproduce it (minimal and precise): pair this new device?

Debug Info

Zigbee2MQTT version: 1.14.3 Adapter hardware: CC2531 Adapter firmware version: current (last month)

Moes ZigBee Smart Thermostat Programmable Temperature Controller for Water/Gas Boiler BHT-002-GCLZBW

Device website: https://www.moeshouse.com/collections/smart-thermostat/products/white-zigbee-smart-thermostat-programmable-temperature-controller-zigbee-hub-required-for-water-gas-boiler

User manual: https://support.gw-ec.com/upload/qa/2018/11/19/3019d10504894c7327d18fc07389bbe6.pdf

I've attached the work[?] I did in the attached text file: proforma device.js and resulting outputs etc.

Moes Zigbee Thermostat.txt

Any advice on progressing from here appreciated

insipiens avatar Aug 26 '20 00:08 insipiens

Try editing your devices.js like so:

    {
        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aoclfnxz'}],
        model: 'TS0601_thermostat',
        vendor: 'Moes',
        description: 'Room thermostat Water/Gas Boiler',
        supports: 'thermostat, temperature',
        meta: {tuyaThermostatSystemMode: common.TuyaThermostatSystemModes},
        fromZigbee: [fz.tuya_thermostat, fz.tuya_thermostat_on_set_data, fz.ignore_basic_report],
        toZigbee: [
            tz.tuya_thermostat_child_lock, tz.tuya_thermostat_window_detection, tz.tuya_thermostat_valve_detection,
            tz.tuya_thermostat_current_heating_setpoint, tz.tuya_thermostat_system_mode, tz.tuya_thermostat_auto_lock,
            tz.tuya_thermostat_calibration, tz.tuya_thermostat_min_temp, tz.tuya_thermostat_max_temp,
            tz.tuya_thermostat_boost_time, tz.tuya_thermostat_comfort_temp, tz.tuya_thermostat_eco_temp,
            tz.tuya_thermostat_force,
        ],
    },

then re-pair your device.

ginkage avatar Aug 26 '20 19:08 ginkage

Try editing your devices.js like so:

    {
        fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_aoclfnxz'}],
        model: 'BHT-002-GCLZB',
        vendor: 'Moes',
        description: 'Room thermostat Water/Gas Boiler',
        supports: 'thermostat, temperature',
        meta: {tuyaThermostatSystemMode: common.TuyaThermostatSystemModes},
        fromZigbee: [fz.tuya_thermostat, fz.tuya_thermostat_on_set_data, fz.ignore_basic_report],
        toZigbee: [
            tz.tuya_thermostat_child_lock, tz.tuya_thermostat_window_detection, tz.tuya_thermostat_valve_detection,
            tz.tuya_thermostat_current_heating_setpoint, tz.tuya_thermostat_system_mode, tz.tuya_thermostat_auto_lock,
            tz.tuya_thermostat_calibration, tz.tuya_thermostat_min_temp, tz.tuya_thermostat_max_temp,
            tz.tuya_thermostat_boost_time, tz.tuya_thermostat_comfort_temp, tz.tuya_thermostat_eco_temp,
            tz.tuya_thermostat_force,
        ],
    },

then re-pair your device. ============================================= Zigbee2MQTT:info 2020-08-26 21:35:58: Successfully interviewed '0xbc33acfffe62f313', device has successfully been paired Zigbee2MQTT:info 2020-08-26 21:35:58: Device '0xbc33acfffe62f313' is supported, identified as: Moes Room thermostat Water/Gas Boiler (BHT-002-GCLZB_thermostat) Zigbee2MQTT:info 2020-08-26 21:35:58: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0xbc33acfffe62f313","model":"BHT-002-GCLZB_thermostat","vendor":"Moes","description":"Room thermostat Water/Gas Boiler","supported":true}}'

Results in Z2M, how to test?

ghost avatar Aug 26 '20 19:08 ghost

Thanks @ginkage That certainly produced some results in the log

Aug 26 21:14:26 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:26: Device '0xbc33acfffe62f32a' joined Aug 26 21:14:26 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:26: Starting interview of '0xbc33acfffe62f32a' Aug 26 21:14:26 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:26: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0xbc33acfffe62f32a"}}' Aug 26 21:14:26 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:26: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"0xbc33acfffe62f32a"}}' Aug 26 21:14:26 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:26: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_announced","message":"announce","meta":{"friendly_name":"0xbc33acfffe62f32a"}}' Aug 26 21:14:41 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:41: Successfully interviewed '0xbc33acfffe62f32a', device has successfully been paired Aug 26 21:14:41 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:41: Device '0xbc33acfffe62f32a' is supported, identified as: Moes Room thermostat Water/Gas Boiler (BHT-002-GCLZB) Aug 26 21:14:41 raspberrypi bash[17181]: Zigbee2MQTT:info 2020-08-26 21:14:41: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0xbc33acfffe62f32a","model":"BHT-002-GCLZB","vendor":"Moes","description":"Room thermostat Water/Gas Boiler","supported":true}}' Aug 26 21:15:15 raspberrypi bash[17181]: zigbee-herdsman-converters:siterwell_gs361: NOT RECOGNIZED DP #536 with data {"type":"Buffer","data":[0,0,0,225]} Aug 26 21:16:15 raspberrypi bash[17181]: zigbee-herdsman-converters:siterwell_gs361: NOT RECOGNIZED DP #536 with data {"type":"Buffer","data":[0,0,0,225]} Aug 26 21:16:20 raspberrypi bash[17181]: zigbee-herdsman-converters:siterwell_gs361: NOT RECOGNIZED DP #528 with data {"type":"Buffer","data":[0,0,0,30]} Aug 26 21:16:20 raspberrypi bash[17181]: zigbee-herdsman-converters:siterwell_gs361: NOT RECOGNIZED DP #528 with d.............................................. Aug 26 21:16:26 raspberrypi bash[17181]: zigbee-herdsman-converters:siterwell_gs361: NOT RECOGNIZED DP #1060 with data {"type":"Buffer","data":[1]} *edited for brevity*

So that is the default (unrecognised) for TuYa convertors, so maybe not Tuya at all.

I got my hands on a Moes zigbee gateway this morning, so also linked it there. Despite getting the transport (network) key It's very,very chatty and its difficult to gather the codes [without experience?]

Appreciate the help

insipiens avatar Aug 26 '20 20:08 insipiens

Hm... Judging by the modelID, it should've been TuYa, but then again, maybe it does need a special converter to implement. Oh well, at least we tried.

ginkage avatar Aug 26 '20 22:08 ginkage

Hi @ginkage, I tried your devices.js update. Device successfully joined and interviewed but converters are not working and no one parameters added to device. Could you help with converters?

Here short log after join device debug 2020-08-27 03:19:13: Received Zigbee message from '0xbc33acfffe5ec839', type 'commandGetData', cluster 'manuSpecificTuyaDimmer', data '{"status":0,"transid":22,"dp":101,"fn":0,"data":{"type":"Buffer","data":[6,0,40,11,30,42,13,30,44,17,30,46,6,0,48,12,0,46,14,30,44,17,30,42,6,0,38,12,30,40,14,30,42,18,30,40]}}' from endpoint 1 with groupID 0 debug 2020-08-27 03:19:19: Received Zigbee message from '0xbc33acfffe5ec839', type 'read', cluster 'genTime', data '["localTime"]' from endpoint 1 with groupID 0 debug 2020-08-27 03:19:22: Received Zigbee message from '0xbc33acfffe5ec839', type 'raw', cluster 'manuSpecificTuyaDimmer', data '{"type":"Buffer","data":[25,14,36,0,10]}' from endpoint 1 with groupID 0 debug 2020-08-27 03:19:22: No converter available for 'TS0601_thermostat' with cluster 'manuSpecificTuyaDimmer' and type 'raw' and data '{"type":"Buffer","data":[25,14,36,0,10]}'

Full log here: https://cloud.mail.ru/public/Ajwb/4SvBqiXFK

Utyff avatar Aug 27 '20 00:08 Utyff

@Utyff I've done some further testing, the default log (on failed conversion has been really useful) and have found the following message (DP/data). These are all messages from the Thermostat in response to pressing buttons.

Green shaded entries I am certain of, the others I need to confirm further.

MoesRoomThermostatMessages

insipiens avatar Aug 27 '20 18:08 insipiens

Zigbee2MQTT:info 2020-08-30 00:03:19: MQTT publish: topic 'zigbee2mqtt/0xbc33acfffe62f32a', payload '{"standby":"YES","linkquality":31,"local_temperature":"18.5","activated":"ON","set_temperature":"17.0","target_temperature":"15.0","Manual_set_temperature":"10.0","child_lock":"UNLOCKED"}' Progress, of sorts - just amending my local installation. The codes are all different to Tuya codes currently provided. I've added them to the Tuya converter as extra codes for now.

Will look at the toZigbee.js converter next.

attached the analysis of tozigbee message content Moes_thermostat toZigbee commands

insipiens avatar Aug 29 '20 23:08 insipiens

Hi, @insipiens. I am trying to make some protocol analysis too, but it's my first experience and i have some troubles. I can't catch transport key for decrypting payloads. I've tried many times to pair device with hub, but 'transport key' frame doesn't occur. I ask for advice

Illivion avatar Sep 04 '20 12:09 Illivion

@Illivion

You want to search for the "Transport key" identifier in the Info column in wireshark, you can reorder it by clicking the info column header.

Attached a screenshot of the process , locating the Transport key in the Info column and then locate the data for the key in the Zigbee security header.

You'll need to enter this in the preferences for the zigbee protocol - AES-128 encryption.

I would recommend putting "zbee_aps" in the display filter once set up so you see relevant messages for Zigbee Home automation.

NWkey

insipiens avatar Sep 04 '20 22:09 insipiens

Assuming this can be closed now because changes have been added.

Changes will be available in the latest dev branch in a few hours (https://www.zigbee2mqtt.io/how_tos/how-to-switch-to-dev-branch.html)

Koenkk avatar Sep 07 '20 15:09 Koenkk

Is this Opentherm? I couldn't find the information on the website.

way2many avatar Sep 08 '20 15:09 way2many

Not opentherm, uses just Tuya or Smart life app.

Zigbee2mqtt support has been added to the Dev branch and should be in the master at next update

insipiens avatar Sep 08 '20 18:09 insipiens

@Koenkk, I have a thermostat for a warm floor BHT-002-GBLZB, in the dev version it was defined as "Moes Room thermostat water / gas boiler (BHT-002-GCLZB)". The difference is that it has 2 temperature sensors: internal and external.

info  2020-09-23 15:37:05: Successfully interviewed '0xbc33acfffe62f395', device has successfully been paired
info  2020-09-23 15:37:05: Device '0xbc33acfffe62f395' is supported, identified as: Moes Room thermostat water/gas boiler (BHT-002-GCLZB)
info  2020-09-23 15:37:05: MQTT publish: topic 'homeassistant/lock/0xbc33acfffe62f395/child_lock/config', payload '{"availability_topic":"zigbee2mqtt/bridge/state","command_topic":"zigbee2mqtt/0xbc33acfffe62f395/set/child_lock","device":{"identifiers":["zigbee2mqtt_0xbc33acfffe62f395"],"manufacturer":"Moes","model":"Room thermostat water/gas boiler (BHT-002-GCLZB)","name":"0xbc33acfffe62f395","sw_version":"Zigbee2MQTT 1.14.4-dev"},"json_attributes_topic":"zigbee2mqtt/0xbc33acfffe62f395","name":"0xbc33acfffe62f395_child_lock","payload_lock":"LOCK","payload_unlock":"UNLOCK","state_locked":"LOCKED","state_topic":"zigbee2mqtt/0xbc33acfffe62f395","state_unlocked":"UNLOCKED","unique_id":"0xbc33acfffe62f395_child_lock_zigbee2mqtt","value_template":"{{ value_json.child_lock }}"}'
info  2020-09-23 15:37:05: MQTT publish: topic 'homeassistant/climate/0xbc33acfffe62f395/climate/config', payload '{"action_template":"{% set values = {'idle':'off','heat':'heating','cool':'cooling','fan only':'fan'} %}{{ values[value_json.running_state] }}","action_topic":"zigbee2mqtt/0xbc33acfffe62f395","availability_topic":"zigbee2mqtt/bridge/state","current_temperature_template":"{{ value_json.local_temperature }}","current_temperature_topic":"zigbee2mqtt/0xbc33acfffe62f395","device":{"identifiers":["zigbee2mqtt_0xbc33acfffe62f395"],"manufacturer":"Moes","model":"Room thermostat water/gas boiler (BHT-002-GCLZB)","name":"0xbc33acfffe62f395","sw_version":"Zigbee2MQTT 1.14.4-dev"},"json_attributes_topic":"zigbee2mqtt/0xbc33acfffe62f395","max_temp":"30","min_temp":"5","mode_command_topic":"zigbee2mqtt/0xbc33acfffe62f395/set/system_mode","mode_state_template":"{{ value_json.system_mode }}","mode_state_topic":"zigbee2mqtt/0xbc33acfffe62f395","modes":["off","auto","heat"],"name":"0xbc33acfffe62f395_climate","temp_step":1,"temperature_command_topic":"zigbee2mqtt/0xbc33acfffe62f395/set/current_heating_setpoint","temperature_state_template":"{{ value_json.current_heating_setpoint }}","temperature_state_topic":"zigbee2mqtt/0xbc33acfffe62f395","temperature_unit":"C","unique_id":"0xbc33acfffe62f395_climate_zigbee2mqtt"}'
info  2020-09-23 15:37:05: MQTT publish: topic 'homeassistant/sensor/0xbc33acfffe62f395/linkquality/config', payload '{"availability_topic":"zigbee2mqtt/bridge/state","device":{"identifiers":["zigbee2mqtt_0xbc33acfffe62f395"],"manufacturer":"Moes","model":"Room thermostat water/gas boiler (BHT-002-GCLZB)","name":"0xbc33acfffe62f395","sw_version":"Zigbee2MQTT 1.14.4-dev"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0xbc33acfffe62f395","name":"0xbc33acfffe62f395_linkquality","state_topic":"zigbee2mqtt/0xbc33acfffe62f395","unique_id":"0xbc33acfffe62f395_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
info  2020-09-23 15:37:05: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Room thermostat water/gas boiler","friendly_name":"0xbc33acfffe62f395","model":"BHT-002-GCLZB","supported":true,"vendor":"Moes"},"type":"pairing"}'

poisondima avatar Sep 23 '20 14:09 poisondima

@Koenkk, I have a thermostat for a warm floor BHT-002-GBLZB, in the dev version it was defined as "Moes Room thermostat water / gas boiler (BHT-002-GCLZB)". The difference is that it has 2 temperature sensors: internal and external.

info  2020-09-23 15:37:05: Successfully interviewed '0xbc33acfffe62f395', device has successfully been paired
info  2020-09-23 15:37:05: Device '0xbc33acfffe62f395' is supported, identified as: Moes Room thermostat water/gas boiler (BHT-002-GCLZB)
info  2020-09-23 15:37:05: MQTT publish: topic 'homeassistant/lock/0xbc33acfffe62f395/child_lock/config', payload '{"availability_topic":"zigbee2mqtt/bridge/state","command_topic":"zigbee2mqtt/0xbc33acfffe62f395/set/child_lock","device":{"identifiers":["zigbee2mqtt_0xbc33acfffe62f395"],"manufacturer":"Moes","model":"Room thermostat water/gas boiler (BHT-002-GCLZB)","name":"0xbc33acfffe62f395","sw_version":"Zigbee2MQTT 1.14.4-dev"},"json_attributes_topic":"zigbee2mqtt/0xbc33acfffe62f395","name":"0xbc33acfffe62f395_child_lock","payload_lock":"LOCK","payload_unlock":"UNLOCK","state_locked":"LOCKED","state_topic":"zigbee2mqtt/0xbc33acfffe62f395","state_unlocked":"UNLOCKED","unique_id":"0xbc33acfffe62f395_child_lock_zigbee2mqtt","value_template":"{{ value_json.child_lock }}"}'
info  2020-09-23 15:37:05: MQTT publish: topic 'homeassistant/climate/0xbc33acfffe62f395/climate/config', payload '{"action_template":"{% set values = {'idle':'off','heat':'heating','cool':'cooling','fan only':'fan'} %}{{ values[value_json.running_state] }}","action_topic":"zigbee2mqtt/0xbc33acfffe62f395","availability_topic":"zigbee2mqtt/bridge/state","current_temperature_template":"{{ value_json.local_temperature }}","current_temperature_topic":"zigbee2mqtt/0xbc33acfffe62f395","device":{"identifiers":["zigbee2mqtt_0xbc33acfffe62f395"],"manufacturer":"Moes","model":"Room thermostat water/gas boiler (BHT-002-GCLZB)","name":"0xbc33acfffe62f395","sw_version":"Zigbee2MQTT 1.14.4-dev"},"json_attributes_topic":"zigbee2mqtt/0xbc33acfffe62f395","max_temp":"30","min_temp":"5","mode_command_topic":"zigbee2mqtt/0xbc33acfffe62f395/set/system_mode","mode_state_template":"{{ value_json.system_mode }}","mode_state_topic":"zigbee2mqtt/0xbc33acfffe62f395","modes":["off","auto","heat"],"name":"0xbc33acfffe62f395_climate","temp_step":1,"temperature_command_topic":"zigbee2mqtt/0xbc33acfffe62f395/set/current_heating_setpoint","temperature_state_template":"{{ value_json.current_heating_setpoint }}","temperature_state_topic":"zigbee2mqtt/0xbc33acfffe62f395","temperature_unit":"C","unique_id":"0xbc33acfffe62f395_climate_zigbee2mqtt"}'
info  2020-09-23 15:37:05: MQTT publish: topic 'homeassistant/sensor/0xbc33acfffe62f395/linkquality/config', payload '{"availability_topic":"zigbee2mqtt/bridge/state","device":{"identifiers":["zigbee2mqtt_0xbc33acfffe62f395"],"manufacturer":"Moes","model":"Room thermostat water/gas boiler (BHT-002-GCLZB)","name":"0xbc33acfffe62f395","sw_version":"Zigbee2MQTT 1.14.4-dev"},"icon":"mdi:signal","json_attributes_topic":"zigbee2mqtt/0xbc33acfffe62f395","name":"0xbc33acfffe62f395_linkquality","state_topic":"zigbee2mqtt/0xbc33acfffe62f395","unique_id":"0xbc33acfffe62f395_linkquality_zigbee2mqtt","unit_of_measurement":"lqi","value_template":"{{ value_json.linkquality }}"}'
info  2020-09-23 15:37:05: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"interview_successful","meta":{"description":"Room thermostat water/gas boiler","friendly_name":"0xbc33acfffe62f395","model":"BHT-002-GCLZB","supported":true,"vendor":"Moes"},"type":"pairing"}'

@poisondima Do you know the DP of the second temperature sensor? I'm sure we can add it and amend the naming to indicate the family instead of a specific model.

Not sure how the HA configuration should be amended for a second temperature, if that is a concern...

insipiens avatar Sep 23 '20 17:09 insipiens

@insipiens I have only CC2531, I don't have "Moes zigbee gateway". Of course there are no DP codes. Floor temperature is more important than room temperature, since the room already has xiaomi temperature sensors. And the buttons in HA do not work for me, I can only set the temperature, I can’t turn the thermostat on or off. изображение Thermostat status is always unknown изображение

poisondima avatar Sep 23 '20 18:09 poisondima

There’s an error clause which should show any unknown dp codes, such as a second temperature when the log is set to debug....that should give the code.

insipiens avatar Sep 23 '20 21:09 insipiens

@insipiens I got such a log, but there are no errors. Tell me how to turn the thermostat on and off through HA? When I press a physical button on the device, the "running" ON / OFF attribute changes. Also, when the heating relay is turned on, the "heating" ON / OFF attribute changes. log.zip

poisondima avatar Sep 24 '20 08:09 poisondima

@poisondima , I can make some changes which you can copy. Just a little concerned if your thermostat has different behaviour than mine - without the hub how do you know what functions it has that can be controlled through Zigbee?

On mine it seems to have two ontrollable behaviours:

  • turn (RUNNING = OFF/ON)
  • Turn Program: ON/OFF

Which of those do you want as the buttons? and which button does what out of the permitted system modes in HS [“auto”, “off”, “cool”, “heat”, “dry”, “fan_only”]

The only other function mine has is programming the thermostat but I don't know HA has an interface to do that plus I am sure Z2M cannot handle lengths of hex required.

If you're a github guru you could then handle the PR (I'm new to Github)

Let me know.....

I have changed mine this afternoon so the buttons turn on/off RUNNING, and a preset for PROGRAM Off/ON

insipiens avatar Sep 24 '20 16:09 insipiens

Need a switch that will turn the device on and off. If "RUNNING = OFF" then "state" and hvac_modes = off If "RUNNING = ON" then "state" and hvac_modes = heat, and the attribute "heating: ON / OFF" changes itself depending on the set temperature. "State" and hvac_modes = auto, should include the schedule set on the device itself, but I see no reason to programming the thermostat there, it is much more convenient to use automations in the Home Assistant. изображение hvac_modes: auto, heat, off I am as new to github as you are. I don't know what "PR" is. I thought maybe you posted it to your repository https://github.com/insipiens/zigbee-herdsman-converters, but the last change there was 22 days ago.

poisondima avatar Sep 24 '20 17:09 poisondima

So here is how mine now looks, It's the thermostat when you click the elipse in the top right corner.

  • Operation: turn Off/On [off, heat] (on the normal thermostat view - these are the visible mode buttons) however they seem to just turn the thermostat itself off/on

  • Preset: Hold/Program (equivalent to use manual/use program )

I'll do a little more analysis tonight, if you think it looks acceptable I'll share the code changes with you so you can test it.

on your second temperature issue I don't know how to proceed without access to your model of thermostat. IMG_1516 IMG_1517

insipiens avatar Sep 24 '20 18:09 insipiens