logo elektroda
logo elektroda
X
logo elektroda

AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis

hkielp745 1749 53
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21265809
    hkielp745
    Level 2  
    Hello, is it possible to integrate AVATTO Tuya ZigBee3.0? Smart actuator, TRV thermostat with home assistant, using ZHA and not zigbee2mqtt?
  • ADVERTISEMENT
  • #2 21274134
    sobel23
    Level 17  
    Hi.
    And doesn't the coordinator detect directly through the ZHA?
    If not then there are two solutions:
    1. move everything to zigbee2mqtt
    2. buy a second coordinator and upload the zigbee2mqtt add-on

    What kind of coordinator do you have? Sonoff dongle P? HA on a virtual machine?
    If you choose the second point, i.e. the second coordinator (sonoff P) then in the serial in the zigbee2mqtt configuration you punch in:
    port: >-
      /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_************************** #(port twojego koordynatora na usb- adres dostępny w ustawieniach)
    adapter: zstack 
    baudrate: 115200
    .
  • #3 21274137
    hkielp745
    Level 2  
    I have a Home Assis os and a Sonoff dongle 3+. The zha detects the thermostat but there is no way to adjust the temperature and other functions and the zigbee2mqqt so average it wants to work.
  • #4 21274148
    sobel23
    Level 17  
    hkielp745 wrote:
    Zha detects thermostat but has no ability to adjust temperature and other functions
    .
    You need to enter:
    Settings > Devices and services > ZHA (devices) > you select the device > you have control and configuration > add to dashboard
    If you don't have this then apparently it doesn't work with ZHA yet.
    I personally use ZHA and zigbee2mqtt at the same time having two coordinators.
    hkielp745 wrote:
    zigbee2mqqt so moderately wants to work.
    .
    Meaning? If you have ZHA then on a single coordinator it definitely won't run zigbee2mqtt for you, even if you disable ZHA it still makes problems.
  • ADVERTISEMENT
  • #5 21274153
    hkielp745
    Level 2  
    So should I uninstall zha first and then install zigbee2mqtt?
  • #6 21274172
    sobel23
    Level 17  
    hkielp745 wrote:
    So should I uninstall zha first and then install zigbee2mqtt?
    .
    1.The first is to make a backup.
    2.First try to remove the coordinator from the device list in ZHA and disable ZHA
    3.Create a new user in HA - MQTT User
    4.Now install and configure Mosquitto broker
    5. install and configure before running Zigbee2MQTT
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis

    Added after 2 [minutes]:

    Pct 2 - physically disconnect the coordinator so it doesn't reinstall itself into ZHA
    How to do all this you have in detail on YouTube - look for videos from this year, just making sure that in the serial next to sonoff zigbee 3.0 + is entered
    adapter: zstack


    Added after 2 [minutes]:

    In para. 5 how you connect the coordinator then find it (address) in the hardware information

    Added after 3 [minutes]:

    Link .
  • #7 21274184
    hkielp745
    Level 2  
    3. create a new user in HA - MQTT User
    But this is to create a new user in HA?
  • #8 21274194
    sobel23
    Level 17  
    >>21274184 .
    Yes.
    I added a YouTube link in my post. You have step by step instructions there so it will be easier for you :) .
  • #9 21274203
    hkielp745
    Level 2  
    Take something in the logs:
    [2024-10-23 17:30:50] info: z2m: Logging to console, file (filename: log.log)
    [2024-10-23 17:30:50] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
    [2024-10-23 17:30:50] info: z2m: Starting zigbee-herdsman (2.1.3)
    [2024-10-23 17:30:52] error: zh:zstack:znp: Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00 adapter: ezsp''
    [2024-10-23 17:30:52] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00 adapter: ezsp'', "baudRate":115200, "rtscts":false, "autoOpen":false}
    [2024-10-23 17:30:52] error: z2m: Error while starting zigbee-herdsman
    [2024-10-23 17:30:52] error: z2m: Failed to start zigbee
    [2024-10-23 17:30:52] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
    [2024-10-23 17:30:52] error: z2m: Exiting...
    [2024-10-23 17:30:52] error: z2m: Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00 adapter: ezsp
    [17:30:58] INFO: Preparing to start...
    [17:31:00] INFO: Socat not enabled
    [17:31:07] INFO: Starting Zigbee2MQTT...
    Starting Zigbee2MQTT without watchdog.
  • #10 21274223
    sobel23
    Level 17  
    hkielp745 wrote:
    TEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00 adapter: ezsp", "baudRate":115200, "rtscts":false, "autoOpen":false
    .

    And what did I write above?
    In the zigbee2MQQT configuration in the add-on
    adapter: zstack

    As you can attach a screen shot of what you have in the config - obscure the password.

    Added after 5 [minutes]: .

    Have you done the configuration with the video I sent? :D .
    If you mess up too much you will have to uninstall the add-ons, delete the user and reinstall haha :P .
    Use the same passwords and usernames in the Mosquitto broker and Zigbee2MQTT configuration.
  • #11 21274227
    hkielp745
    Level 2  
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .
    This is how
  • #12 21274242
    sobel23
    Level 17  
    hkielp745 wrote:
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .
    That's right

    And for the third time haha I will write
    It is supposed to be yes zstack not ezsp
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis
  • #13 21274249
    hkielp745
    Level 2  
    Well, that didn't do anything [18:03:40] INFO: Preparing to start...
    [18:03:42] INFO: Socat not enabled
    [18:03:49] INFO: Starting Zigbee2MQTT...
    Starting Zigbee2MQTT without watchdog.
    [2024-10-23 18:04:16] info: z2m: Logging to console, file (filename: log.log)
    [2024-10-23 18:04:16] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
    [2024-10-23 18:04:16] info: z2m: Starting zigbee-herdsman (2.1.3)
    [2024-10-23 18:04:19] error: zh:zstack:znp: Failed to determine if path is valid: 'Error: ENOENT: no such file or directory, lstat '/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00 adapter: zstack'
    [2024-10-23 18:04:19] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00 adapter: zstack'', "baudRate":115200, "rtscts":false, "autoOpen":false}
    [2024-10-23 18:04:19] error: z2m: Error while starting zigbee-herdsman
    [2024-10-23 18:04:19] error: z2m: Failed to start zigbee
    [2024-10-23 18:04:19] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
    [2024-10-23 18:04:19] error: z2m: Exiting...
    [2024-10-23 18:04:19] error: z2m: Error: Error: No such file or directory, cannot open /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00 adapter: zstack
    [18:04:24] INFO: Preparing to start...
    [18:04:26] INFO: Socat not enabled
  • #14 21274257
    sobel23
    Level 17  
    Did you copy the correct path to the coordinator?

    Added after 3 [minutes]:

    https://www.zigbee2mqtt.io/guide/configuration/adapter-settings.html
    As you have HAOS and not a virtual machine the path to the coordinator should be shorter something like
    port: /dev/ttyACM0
    .

    Added after 59 [seconds]: .

    Oh and delete that space before "adapter" first
  • #15 21274260
    hkielp745
    Level 2  
    Rather so something I don't know in the end which of these to copy?
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis
  • #16 21274261
    sobel23
    Level 17  
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .

    Added after 1 [minute]:

    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .
    This path
  • ADVERTISEMENT
  • #17 21274270
    hkielp745
    Level 2  
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .
    I have this now, but there is still a problem:
    [18:15:10] INFO: Preparing to start....
    [18:15:12] INFO: Socat not enabled
    [18:15:20] INFO: Starting Zigbee2MQTT...
    Starting Zigbee2MQTT without watchdog.
    [2024-10-23 18:15:47] info: z2m: Logging to console, file (filename: log.log)
    [2024-10-23 18:15:48] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
    [2024-10-23 18:15:48] info: z2m: Starting zigbee-herdsman (2.1.3)
    [2024-10-23 18:15:50] error: zh:zstack:znp: Failed to determine if path is valid: 'Error: spawn udevadm ENOENT'.
    [2024-10-23 18:15:50] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyACM0", "baudRate":115200, "rtscts":false, "autoOpen":false}
    [2024-10-23 18:15:50] info: zh:zstack:znp: Serialport opened
    [2024-10-23 18:15:50] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
    [2024-10-23 18:15:51] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
    [2024-10-23 18:15:51] error: z2m: Error while starting zigbee-herdsman
    [2024-10-23 18:15:51] error: z2m: Failed to start zigbee
    [2024-10-23 18:15:51] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
    [2024-10-23 18:15:51] error: z2m: Exiting...
    [2024-10-23 18:15:51] error: z2m: Error: Error: Not supported, cannot set

    /app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264
    var er = new ERR_STREAM_WRITE_AFTER_END();
    ^
    Error: write after end
    at writeAfterEnd (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264:12)
    at DerivedLogger.Writable.write (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:300:21)
    at DerivedLogger.log (/app/node_modules/winston/lib/winston/logger.js:231:12)
    at Logger.log (/app/lib/util/logger.ts:198:25)
    at Logger.info (/app/lib/util/logger.ts:211:14)
    at Znp.onPortClose (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:96:16)
    at Object.onceWrapper (node:events:632:26)
    at SerialPort.emit (node:events:529:35)
    at port.close.then.closing (/app/node_modules/@serialport/stream/dist/index.js:242:18)
  • #18 21274281
    sobel23
    Level 17  
    The username cannot be mqqt-user only mqqt_user there was a problem with hyphens at least with me.
    Do the whole configuration from scratch. And I beg to God follow the steps with the video I posted :D .
    Uninstall these add-ons, reload HA and start again with mqqt_user. Remove ZHA
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .

    Added after 2 [minutes]: .

    As long as you have copies then don't worry.
    You can't run Z2MQQT before the step-by-step configuration.
    Later if you do we will worry about the coordinator path and "adpater" in the serial :) .
  • #19 21274314
    hkielp745
    Level 2  
    It is with mqtt_user and still the same:
    [18:39:10] INFO: Preparing to start....
    [18:39:12] INFO: Socat not enabled
    [18:39:19] INFO: Starting Zigbee2MQTT...
    Starting Zigbee2MQTT without watchdog.
    [2024-10-23 18:39:46] info: z2m: Logging to console, file (filename: log.log)
    [2024-10-23 18:39:46] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
    [2024-10-23 18:39:46] info: z2m: Starting zigbee-herdsman (2.1.3)
    [2024-10-23 18:39:48] error: zh:zstack:znp: Failed to determine if path is valid: 'Error: spawn udevadm ENOENT'.
    [2024-10-23 18:39:48] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyACM0", "baudRate":115200, "rtscts":false, "autoOpen":false}
    [2024-10-23 18:39:48] info: zh:zstack:znp: Serialport opened
    [2024-10-23 18:39:48] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
    [2024-10-23 18:39:50] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
    [2024-10-23 18:39:50] error: z2m: Error while starting zigbee-herdsman
    [2024-10-23 18:39:50] error: z2m: Failed to start zigbee
    [2024-10-23 18:39:50] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
    [2024-10-23 18:39:50] error: z2m: Exiting...
    [2024-10-23 18:39:50] error: z2m: Error: Error: Not supported, cannot set

    /app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264
    var er = new ERR_STREAM_WRITE_AFTER_END();
    ^
    Error: write after end
    at writeAfterEnd (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264:12)
    at DerivedLogger.Writable.write (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:300:21)
    at DerivedLogger.log (/app/node_modules/winston/lib/winston/logger.js:231:12)
    at Logger.log (/app/lib/util/logger.ts:198:25)
    at Logger.info (/app/lib/util/logger.ts:211:14)
    at Znp.onPortClose (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:96:16)
    at Object.onceWrapper (node:events:632:26)
    at SerialPort.emit (node:events:529:35)
    at port.close.then.closing (/app/node_modules/@serialport/stream/dist/index.js:242:18)
  • #20 21274327
    sobel23
    Level 17  
    Did you do everything from the beginning as I asked? :) .
    Use the ID of the one under the path I marked for you earlier and show what logs pop up for you

    Added after 2 [minutes]:

    Failed to determine if path is valid - It appears that Zigbee2MQTT cannot verify that the specified path to the device (/dev/ttyACM0) is valid. This could be a problem with the configuration of the Zigbee device you are trying to connect to.
    spawn udevadm ENOENT - This error indicates that udevadm (the command responsible for managing devices) was not found. This could be a problem with missing software or tools that are required for proper operation.
    Error while starting zigbee-herdsman - Error starting zigbee-herdsman, which means that something in the Zigbee hardware control has gone wrong.
    write after end - Attempting to write to a stream after it has been closed, which is an error in the code.
  • #21 21274335
    hkielp745
    Level 2  
    Then what about reinstalling HA?
  • #22 21274350
    sobel23
    Level 17  
    hkielp745 wrote:
    That's what reinstalling HA?
    .
    No not yet hehe. AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .
    Use this path highlighted in blue
  • #23 21274355
    hkielp745
    Level 2  
    Same:
    [19:05:51] INFO: Preparing to start....
    [19:05:54] INFO: Socat not enabled
    [19:06:02] INFO: Starting Zigbee2MQTT...
    Starting Zigbee2MQTT without watchdog.
    [2024-10-23 19:06:28] info: z2m: Logging to console, file (filename: log.log)
    [2024-10-23 19:06:28] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
    [2024-10-23 19:06:28] info: z2m: Starting zigbee-herdsman (2.1.3)
    [2024-10-23 19:06:30] error: zh:zstack:znp: Failed to determine if path is valid: 'Error: spawn udevadm ENOENT'.
    [2024-10-23 19:06:30] info: zh:zstack:znp: Opening SerialPort with {"path":"/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220134520-if00","baudRate":115200,"rtscts":false,"autoOpen":false}
    [2024-10-23 19:06:30] info: zh:zstack:znp: Serialport opened
    [2024-10-23 19:06:31] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
    [2024-10-23 19:06:32] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
    [2024-10-23 19:06:32] error: z2m: Error while starting zigbee-herdsman
    [2024-10-23 19:06:32] error: z2m: Failed to start zigbee
    [2024-10-23 19:06:32] error: z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
    [2024-10-23 19:06:32] error: z2m: Exiting...
    [2024-10-23 19:06:32] error: z2m: Error: Error: Not supported, cannot set

    /app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264
    var er = new ERR_STREAM_WRITE_AFTER_END();
    ^
    Error: write after end
    at writeAfterEnd (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264:12)
    at DerivedLogger.Writable.write (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:300:21)
    at DerivedLogger.log (/app/node_modules/winston/lib/winston/logger.js:231:12)
    at Logger.log (/app/lib/util/logger.ts:198:25)
    at Logger.info (/app/lib/util/logger.ts:211:14)
    at Znp.onPortClose (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:96:16)
    at Object.onceWrapper (node:events:632:26)
    at SerialPort.emit (node:events:529:35)
    at port.close.then.closing (/app/node_modules/@serialport/stream/dist/index.js:242:18)
    Without a reboot it will not happen
  • #24 21274362
    sobel23
    Level 17  
    Are you sure you have ZHA disabled and removed?
  • #25 21274367
    hkielp745
    Level 2  
    Rather yes AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .
  • #26 21274379
    sobel23
    Level 17  
    You know what, try using any address from the coordinator in the configuration, by the way if it was throwing up logs then use ezsp with zstack interchangeably.

    Added after 3 [minutes]: .

    Connect to usb 2.0 not 3.0.
    Turn the whole machine off and on.
    20-30 minutes of play.
  • ADVERTISEMENT
  • #27 21274388
    hkielp745
    Level 2  
    It didn't do anything
  • #28 21274393
    sobel23
    Level 17  
    In my case, it is this string in the "identifier" box as running in Z2MQQT

    Added after 3 [minutes]:

    I HAVE!
    This is NOT a "dongle plus" ONLY a "dongle plus v2" and has completely different hardware inside!!!

    you have to specify the driver in the serial section

    adapter: ezsp

    or if you have sufficiently modern firmware

    adapter: ember
  • #29 21274398
    hkielp745
    Level 2  
    Well, a reboot of the HA is all that remains.
  • #30 21274402
    sobel23
    Level 17  
    Do not do as above.
    AVATTO Tuya ZigBee3.0 thermostat integration ZigBee3.0 actuator smart thermostat TRV with home assis .
    adapter: ezsp

    or if you have sufficiently modern firmware

    adapter: ember

    Added after 34 [seconds]: .

    change path to what is above and use ezsp, if it doesn't start then ember

    Added after 44 [seconds]: .

    don't forget to save to the Z2MQQT configuration page after a change in the code

    Added after 3 [minutes]: .

    Reload configurations after every change you make.
    What hardware are you running HAOS on?

Topic summary

The discussion addresses the integration of the AVATTO Tuya ZigBee 3.0 smart actuator and TRV thermostat with Home Assistant (HA) using the ZHA integration versus Zigbee2MQTT. The thermostat is detected by ZHA but lacks full control functionality, prompting recommendations to switch to Zigbee2MQTT for better device support. Users suggest running both ZHA and Zigbee2MQTT simultaneously with separate coordinators, preferably Sonoff Zigbee 3.0 USB Dongle Plus (non-V2) for compatibility. Detailed guidance is provided on configuring Zigbee2MQTT, including disabling ZHA, creating a dedicated MQTT user in HA, installing and configuring the Mosquitto broker, and correctly setting the serial port path and adapter type in Zigbee2MQTT configuration. The importance of matching MQTT credentials and avoiding special characters in passwords is emphasized to resolve authorization errors. Troubleshooting logs reveal common errors such as invalid serial port paths, missing udevadm utility, and adapter driver mismatches (zstack vs. ezsp vs. ember). The Sonoff Dongle Plus V2 requires specifying the 'ezsp' or 'ember' adapter due to different hardware. Users report persistent issues with Zigbee2MQTT startup and MQTT connection refusals, despite following step-by-step video tutorials and configuration advice. The discussion concludes with encouragement to persist, consider a second coordinator for stability, and verify all configuration steps carefully to achieve successful integration.
Summary generated by the language model.
ADVERTISEMENT