I was using this blueprint and started facing issues. I’ve created a new blueprint which should solve all the issues users are facing. Here you go: Tuya TS004F: 4 Button Wireless Switch - Zigbee2MQTT (2022)
I moved over to NodeRed which isn’t necessarily a better solution just a different one.
My scene switches had the same issue that out of multiple actions only the first action was executed. This happend after upgrading to 2022.11 from 2022.09. I think they changed something how the automation modes work. In the blueprint the mode (line 82) is set to “restart”. I changed this to “parallel” and now everthing works. I think that this is not an issue with zigbee or the scene switches, as the automation is triggered correctly, only problem is that it only executes the first action. I restarted HA after modifying the blueprint (\config\blueprints\automation)
in my case also only execute the first action.
I confirm if you change the “restart” to “parallel” and after restart the HA it’s work again
Work perfect. Thanks a lot.
I also confirm changing Restart to parallel works…
TLDR - See end for resolution
Overnight my switch has just stopped being picked up by any automations using the blueprint. (It’s listed as a device in there, but not triggering)
I can see that messages are coming through in Zigbee2MQTT addon, for example:
Zigbee2MQTT:info 2022-12-22 08:47:52: MQTT publish: topic 'zigbee2mqtt/0x70ac08fffe77d37e/action', payload '3_single'
… but nothing in my automation is being acted on.
How else can I debug? The switch is definitely online and visible in zigbee2MQTT, and I have re-paired it also.
Have also tried to recreate the automation and nothing happens
Device is
(0x70ac08fffe77d37e): TS0044 - TuYa Wireless switch with 4 buttons (EndDevice)
The only thing I can find is this in the supervisor log, but this may have been happening yesterday when it was working fine…
22-12-22 10:20:12 WARNING (MainThread) [supervisor.addons.options] Unknown option 'base_topic' for Zigbee2MQTT (45df7312_zigbee2mqtt)
---- Further updates—
Something is just not quite right with the blueprint. I can create a new automation, not using a blueprint, with YAML code below, and works fine - just for the 1_single press for example
alias: New Automation
description: ""
trigger:
- platform: state
entity_id:
- sensor.0x70ac08fffe77d37e_action
to: 1_single
condition: []
action:
- service: light.toggle
data: {}
target:
entity_id: light.office_down_light
mode: single
Here is my code that does nothing
alias: Zigbee2MQTT - Tuya 4-Button Scene Switch
description: ""
use_blueprint:
path: Stringer/zigbee2mqtt-tuya-4-button-scene-switch-ts0044.yaml
input:
switch: sensor.0x70ac08fffe77d37e_action
button_one_short_press:
- service: light.toggle
data: {}
target:
entity_id:
- light.office_down_light
button_two_short_press: []
button_three_short_press: []
button_four_short_press: []
UPDATE: resolution
I had to remove attribute: action
from the blueprint yaml
Great work Oddiwahn, this solved my issue that only the first action runs and after that the other actions are cancelled.
Can this blueprint be modified to allow for more than 1 device/entity to be added?
e.g. I’d like 2 remotes placed on either side of the room to do the exact same thing, but without having to manage and update 2 separate and identical automations.
To answer my own question, you can, and it works really well.
Change this:
selector:
entity:
integration: mqtt
domain: sensor
multiple: false
To this:
selector:
entity:
integration: mqtt
domain: sensor
multiple: true
Has anybody been able to solve this? The blueprint is working fine in latest HA2023.04.1, but it still only executes first action of a script when a button is pressed.
Are only a few models working with this blueprint or all TS0044 devices?
I have TS0044 here that looks different but is a 4 button remote scene switch
_TZ3000_mh9px7cq
It’s not working with this blueprint, any suggestions?
/edit:
Nevermind, this comment fixed it:
Works here!
OMG I was going nuts thinking it was in pairing mode, but I couldn’t pair it. I replaced the cell and it’s now paired.
Apparently there are firmware updates for some of these devices, to address battery drain. I don’t know how to do a firmware update so I’m stuck for now replacing cells every now and then.
I got this error when start Z2M, any one know how to fix this?
[12:21:23] INFO: Preparing to start...
[12:21:23] INFO: Socat not enabled
[12:21:24] INFO: Starting Zigbee2MQTT...
Error: Cannot find module 'TS004F.ts'
Require stack:
- /app/dist/util/utils.js
- /app/dist/util/settings.js
- /app/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1026:15)
at Function.Module._load (node:internal/modules/cjs/loader:871:27)
at Module.require (node:internal/modules/cjs/loader:1098:19)
at require (node:internal/modules/cjs/helpers:108:18)
at Object.getExternalConvertersDefinitions (/app/lib/util/utils.ts:169:25)
at getExternalConvertersDefinitions.next (<anonymous>)
at new ExternalConverters (/app/lib/extension/externalConverters.ts:12:20)
at new Controller (/app/lib/controller.ts:84:58)
at start (/app/index.js:106:18)
My configuration.yaml
/config/zigbee2mqtt/configuration.yaml
homeassistant: true
mqtt:
server: mqtt://192.168.1.8:1883
user: ####
password: ########
serial:
port: tcp://192.168.1.8:6638
adapter: ezsp
frontend:
port: 8099
advanced:
homeassistant_legacy_entity_attributes: false
legacy_api: false
legacy_availability_payload: false
log_syslog:
app_name: Zigbee2MQTT
eol: /n
host: localhost
localhost: localhost
path: /dev/log
pid: process.pid
port: 514
protocol: udp4
type: '5424'
log_level: debug
device_options:
legacy: false
devices:
'0xa4c1387610dcb479':
friendly_name: TY6key 1
external_converters:
- TS004F.ts
Earlier this year I started having issues with battery drain with multiple Tuya Zigbee Scene Switches.
It was solved by updating the firmware on my Sonoff Zigbee Dongle. An update to Zigbee code in HA or Z2M needed to be mirrored in the dongle firmware. I think Ikea switches had a similar issue with the Zigbee coordinator.
They have worked perfectly since.
Koenkk/Z-Stack-firmware: Compilation instructions and hex files for Z-Stack firmwares (github.com)
Trying to use this blueprint in my installation with my TS0044 switch …
I can import the blueprint, I can create an automation (using the action part of the device as input) - but nothing shows up in the traces when clicking a button ?
Update: Solved by Zigbee2MQTT - Tuya 4-button Scene Switch (TS0044) - #54 by just.bondarenko
I have the ts0044, and I added it into zigbee, but when I create an automation from this blueprint, it says no matching entities found. If I enter the ‘action’ entity for the button, then the automation triggers, but the problem is that the automation triggers on button presses from my other buttons which are from Ikea.
I’m having trouble with using multiple actions.
In my case i want to set multiple lamps to different values. I can not combine that within a single action so i assumed i could just make multiple actions to set different lights.
Right now the the automation triggers the first action. The 2nd action is not done. I can confirm this in my Z2M log.
Anyone any idea how to fix this?
alias: Scene schakelaar huiskamer
description: ""
use_blueprint:
path: Stringer/zigbee2mqtt-tuya-4-button-scene-switch-ts0044.yaml
input:
switch: sensor.scene_schakelaar_woonkamer_action
button_one_short_press:
- service: light.turn_on
data:
color_temp: 452
brightness: 118
target:
device_id:
- a6679b1e3c0098a39d9bf635559bfdb8
- d822a36bced4f6af43af8e93a0459589
- service: light.turn_on
data:
color_temp: 418
brightness: 142
target:
device_id: c4f1115be5dcb6adb0c31c975b7978db
button_four_short_press:
- service: light.turn_off
data: {}
target:
device_id:
- a22a640352ff93512e6153bb5435d3eb
- 1cd32e137c4c6805a901628a9b64080a
- 9b88f938868262a3d23aa4655e6dcf42
- c4f1115be5dcb6adb0c31c975b7978db
- a6679b1e3c0098a39d9bf635559bfdb8
- d822a36bced4f6af43af8e93a0459589