@Test123
ich hab damals bei der Einrichtung ein paar Notizen gemacht, ich „klebe“ sie hier mal rein, und hoffe, dass sie im Wesentlichen selbsterklärend sind. Falls nicht, muss ich meine Notizen mal überarbeiten und aufhübschen.
Meine Beschreibung ist für ZHA.
ZHA
Configure menu
Manage Zigbee Device
First Step: Record the command
Go to Cluster: ZosungIRControl (Endpoint id: 1, Id: 0xe004, Type: in)
Select Commands: IRLearn (id: 0x0001)
set on_off to true
Press Submit
blue LED should light short
Press Button on Remote Control
Second Step: Save the command
Go to Attributes
Select last_learned_ir_code (id: 0x0000)
Press Read
The read value contains the related code that needs to be sent to the IR controlled device
Third Step: get hold of IEEE device ID
to send the commmand the IEEE device ID is needed
open developer tools => events
listen to zha_event
send command IRLearn or similar to the transmitter
stop listening
search for the related IEEE id
the IEEE id could be taken as well from ‚Zigbee Info‘ on the device page
Forth Step: Script to send commands
alias: Send IR Command
fields:
ir_command:
description: The command/code to be sent to the IR receiver
example: 8a98dsaf07f&()/%
sequence:
- service: zha.issue_zigbee_cluster_command
data:
cluster_type: in
endpoint_id: 1
command: 2
ieee: b4:3a:31:ff:fe:f5:3f:5e
command_type: server
params:
code: "{{ir_command}}"
cluster_id: 57348
mode: single
Fifth Step: Script for your virtual IR-Remote
first part of my script to control the old-fashioned LED-Strip in the kitchen
alias: IR Küche Leiste
fields:
command:
description: >-
the command to send: toggle, lighter, darker, white, red, green, blue,
purple, orange, purple, yellow, pink, lightblue orange, purple
example: toggle
sequence:
- if:
- condition: template
value_template: "{{ command == 'toggle' }}"
then:
- action: script.send_ir2_command
data:
ir_command: >-
Cv0iYBEgAiACWwIg4AAB4AkLApEGWyADQAdAA0ALQANAC4ADBCACWwIg4AIBQA1AA0AfwAdAC+AHA8AbD2Ob/SLMCCAC///9IswIWwI=
alias: toggle
- if:
- condition: template
value_template: "{{ command == 'lighter' }}"
then:
- action: script.send_ir2_command
data:
ir_command: >-
ChkjahEsAiwCWQIs4AABQAtAA0ABgAcCcgZZIANAB0AD4AcLA1kCLAJAAwEsAkALAXIGQAcBLAJAAeABB0AXAlkCLOAAAQdZAnIGLAIsAoAHDyabGSObCFkC//8ZI5sIWQI=
alias: lighter
