Resending raw IR codes with Tuya ZS06 problems

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
fjuppe
Posts: 42
Joined: Thursday 14 September 2023 19:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 16341
Location: Stockholm
Contact:

Resending raw IR codes with Tuya ZS06 problems

Post by fjuppe »

Hello,
Just got my Tuya ZS06

ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus
Zigbee2MQTT version
1.39.1
Type of Coordinator
zStack3x0
Coordinatorrevision
20231111
Coordinator IEEE-adress
0x00124b002f8ac433
Frontend version
0.7.4
Zigbee-herdsman-converters version
19.72.0
Zigbee-herdsman version
0.55.3

I learned it with an on/off code from my TV-remote, created a file and kicked it off as a string in the Domoticz widget.

Code: Select all

mosquitto_pub -t 'zigbee2mqtt/0x0cae5ffffe9223c7/set' -m '{"ir_code_to_send":"BXsjvxE0AsABA6oGNALgCwFAF0ADQAFAB+AHA+ADAUAb4AcBQBPAA0ABwAvABwkRnnsj6Qg0Av//4AoHAgg0Ag=="}'
and it works both within Z2M and with a mosquitto_pub script triggered from Domoticz. The message payload is different for every time the button on Remote control is pressed but the stored one above always works.

Then I used the same procedure (and the same rules apply with different codestrings every from my A/C IR remote but on/off button gives a much longer code:

Code: Select all

mosquitto_pub -t 'zigbee2mqtt/0x0cae5ffffe9223c7/set' -m '{"ir_code_to_send":"C0UXHh3tAZAN4AEDA+8F7QHADwPvBaYBQAsB7wVAAwCmYAfgAQ/gAwsApmAXgBsBpgFAA+ABC8AXAe0BQANAF0ADAe8FgCPgAwsH7wXtAZANpgHgAweAC0AHAaYBgAcA7eAEB0ATQMMN//90I7IRYgLvBWIC7QHgFQNAI+APA+AHO0An4AMTQA/gAwNAG+ADDxIhnHQjqghiAv//kA3vBe0BdASmIAMJ7QEqAaYBEAHtAUADQA9ABwMqAe0BQAsBdASAG8AH4AsXA3QE7QFAM0ADA3QEpgFAB0ADA3QE7QFALwEqAeABEwMqAe0BQBtAA+APC0AbwAMCdASmIAMF7QEqAaYBQBNAC0AHQAMCdASmYANAC0ADAyoB7QFAB0ADQAsDdATtAUAHQA/gCwNAHwF0BIA/AXQE4AEDQCvgAzfgDwtAJ+ADAwEqAYBLQBMDKgHtAUAHQAPgAwtAD+APAwEqAeAJP0CXQC9AB+ADA0ATCf//kA3kBqYBdASAA+ADAUATwAFAC0ADQAHAB0ABQAtAA0ABQAdAA8AB4A8L4DMB4A9TQBdAA+APAeATG0ABQB9AA0ABQAfAA+CLAcCbC3QEpgF0BKYBpgGmAQ=="}'

This code newer has worked ( I have tried many times with different codes.)
MQTT Explorer shows there are differences in the received string after about 200 characters.
Is there a limitation somewhere in the system that sets a limit ob the payload ??
Or is somebody aware of why this longer string can not be sent back correctly either through Z2M or moquitto/MQTT Explorer

I have read almost everything on this subject but I dont understand how to make the second codestring work in the same way as the first...

Thanks in advance for your inputs!
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Resending raw IR codes with Tuya ZS06 problems

Post by gizmocuz »

Yes, in the database there is a limitation set for sValue/strParam1/2 and Description to be 200 characters
I would suggest you make some scripts, and use those scripts in domoticz via Switches/Buttons (every switch van have a on/off action script)
Quality outlives Quantity!
fjuppe
Posts: 42
Joined: Thursday 14 September 2023 19:32
Target OS: Raspberry Pi / ODroid
Domoticz version: 16341
Location: Stockholm
Contact:

Re: Resending raw IR codes with Tuya ZS06 problems

Post by fjuppe »

Thank you for fast reply!

Can you suggest how to split up the longer code strings in shorter bursts, i.e. below 200 charachters? I understand this has something to do with base64 and some other coding to do but, as a newbie, I dont understand how to do this properly. In the Git Library I found something called "1901.json" which would probably match my AC but I dont have the knowledge to handle this. The goal would be to have a few Domoticz widgets for say, "On 23 degrees" another for "Off" and maybe a few more that triggers some predefined scripts like the mosquitto_sub script for TV remote above.

Thanking in anticipation!
vytasu
Posts: 1
Joined: Wednesday 02 October 2024 8:53
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Resending raw IR codes with Tuya ZS06 problems

Post by vytasu »

I've bought ZS06 IR transceiver and was looking how to send mosquitto commands in domoticz without luck. But I've found logical working command I use and I want to share:

Code: Select all

script:///usr/bin/mosquitto_pub -h localhost -t "zigbee2mqtt/IR_transeiver/set" -m '{"ir_code_to_send":"xxxx"}'
Working i.e. in selector action, where IR_transeiver - device id, xxxx - your ir code. Unfortunately I cannot make virtual remote and add action codes to it's buttons. Feature like that could be useful.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest