Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New device support]: Aubess Universal Smart IR Remote Control - Tuya TS1201 #11633

Closed
kds69 opened this issue Feb 27, 2022 · 138 comments
Closed
Labels
new device support New device support request stale Stale issues

Comments

@kds69
Copy link
Contributor

kds69 commented Feb 27, 2022

Link

https://www.aliexpress.com/item/1005003772831987.html?gatewayAdapt=glo2fra&gatewayAdapt=glo2fra&gatewayAdapt=glo2fra&spm=a2g0o.order_list.0.0.21ef5e5bnDdlPP

Database entry

{"id":63,"type":"Router","ieeeAddr":"0x2c1165fffe63aea3","nwkAddr":27932,"manufId":4098,"manufName":"_TZ3290_acv1iuslxi3shaaj","powerSource":"Mains (single phase)","modelId":"TS1201","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":61440,"inClusterList":[0,4,5,3,60672,57348,6],"outClusterList":[25,10],"clusters":{"genBasic":{"attributes":{"modelId":"TS1201","manufacturerName":"_TZ3290_acv1iuslxi3shaaj","powerSource":1,"zclVersion":3,"appVersion":65,"stackVersion":0,"hwVersion":1,"dateCode":""}}},"binds":[{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b0022a54f44","endpointID":1},{"cluster":64642,"type":"endpoint","deviceIeeeAddress":"0x00124b0022a54f44","endpointID":1}],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":65,"stackVersion":0,"hwVersion":1,"dateCode":"","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1645952529076,"defaultSendRequestWhen":"immediate"}

Comments

I have purchased this item to give it a try in the hope that this device is a clone of HEIMAN HS2IRC (https://www.zigbee2mqtt.io/devices/HS2IRC.html).
External converter (see in "external converter" part) which was replicating HEIMAN HS2IRC's device didn't help to get any response from AUBESS device (send "create" device command, "get_list"). Sniffing didn't show reply from device, but I am not very competent in that area.
One thing I didn't try is to revert latest fix of heimen.js converter which force manufacturer to null on message toZigbee for HS2IRC.
This could be a track to explore.
Note that with or without external converter battery level exposure is causing non fatal errors as the Aubess device has no battery at all and obviously can't expose any...

External converter

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const constants = require('zigbee-herdsman-converters/lib/constants');
const globalStore = require('zigbee-herdsman-converters/lib/store');

//change in zigbee db model and vendor

const definition = {
        fingerprint: [{modelID: 'TS1201', manufacturerName: '_TZ3290_acv1iuslxi3shaaj'}],
        //zigbeeModel: ['HS2IRC'],
        model: 'HS2IRC',
        vendor: 'HEIMAN',
        description: 'Aubess Universal Smart IR Remote Control',
        fromZigbee: [fz.battery, fz.heiman_ir_remote],
        toZigbee: [tz.heiman_ir_remote],
        exposes: [e.battery()],
        configure: async (device, coordinatorEndpoint, logger) => {
            const endpoint = device.getEndpoint(1);
            await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'heimanSpecificInfraRedRemote']);
            await reporting.batteryPercentageRemaining(endpoint, {min: constants.repInterval.MINUTES_5, max: constants.repInterval.HOUR});
        },
};

module.exports = definition;

Supported color modes

No response

Color temperature range

No response

@kds69 kds69 added the new device support New device support request label Feb 27, 2022
@kds69 kds69 changed the title [New device support]: [New device support]: Aubess Universal Smart IR Remote Control - Tuya TS1201 Feb 27, 2022
@nmaster2042
Copy link

I would be interested by this device, will follow this issue.

@mak-42
Copy link

mak-42 commented Mar 31, 2022

I've got the device profiles:

ZigBee Device Profile, Simple Descriptor Response, Nwk Addr: ------, Status: Success
    Sequence Number: 24
    Status: Success (0)
    Nwk Addr of Interest: ------
    Simple Descriptor Length: 26
    Simple Descriptor
        Endpoint: 1
        Profile: Home Automation (0x0104)
        Application Device: Unknown (0xf000)
        Application Version: 0x0001
        Input Cluster Count: 7
        Input Cluster List
            Input Cluster: Basic (0x0000)
            Input Cluster: Groups (0x0004)
            Input Cluster: Scenes (0x0005)
            Input Cluster: Identify (0x0003)
            Input Cluster: Unknown (0xed00)
            Input Cluster: Unknown (0xe004)
            Input Cluster: On/Off (0x0006)
        Output Cluster Count: 2
        Output Cluster List
            Output Cluster: OTA Upgrade (0x0019)
            Output Cluster: Time (0x000a)

The clusters '0xed00' and '0xe004' looks interesting. Does anyone have information about them?

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2022

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label May 1, 2022
@mak-42
Copy link

mak-42 commented May 1, 2022

I'm waiting for a tuya hub to sniff the protocol and add the device.

@github-actions github-actions bot removed the stale Stale issues label May 2, 2022
@JoshuaDodds
Copy link

I have a similar device that i bought for the same reason (was hoping it was a clone of the Heimann). This one is from Tuya (rebranded by Moes) and looks like it might be the same as your Aubess device. Let me know if i can help with anything would like to get mine working as well. I dont have a Tuya smart hub and this device just came in today so I haven't played with it much yet.

@mak-42
Copy link

mak-42 commented May 7, 2022

I've received tuya hub and tried to sniff communication between the hub and the device. I think I know how to made the device receive a command from a remote control and transmit it.
It should be enough to control simple devices (fans, lights, etc.), but is not enough for something smarter like climate control.

It seems the full protocol is quite complicated. I'll try to puzzle my brain over it a little bit more.

Look at the packets which hub sending to the device. Maybe you can see something.

  1. "Power on" command of Chinese fan (taught it for the first time):
    {"key_num":1,"delay":300,"key1":{"num":1,"freq":38000,"type":1,"key_code":"A/IEiwFAAwbJAfIE8gSLIAUBiwFAC+ADAwuLAfIE8gSLAckBRx9AB0ADBskB8gTyBIsgBQGLAUALA4sB8gRAB8ADBfIEiwHJAeARLwHJAeAFAwHyBOC5LwGLAeA97wOLAfIE4RcfBYsB8gTyBEAFAYsB4AcrCYsB8gTyBIsByQHgPY8DyQHyBOAHAwHyBEAX4BVfBIsB8gTJoAMF8gSLAckB4BUvAckB4AEDBfIEiwHJAQ=="}}
  2. "Power on" command of Chinese fan (same button, taught it for the second time):
    {"key_num":1,"delay":300,"key1":{"num":1,"freq":38000,"type":1,"key_code":"A/MEaAFAAwW+AfME8wRABQO+Ab4BQAUC8wTqIANAB0ADAfMEQCMBLx9AB0ADBr4B8wTzBGggBQFoAUAL4AMDQDcF8wRoAeoB4AEvBuoB8wTzBGggBQFoAUAL4AcDBfMEvgG+AeAZLwO+AfMEQDsB8wRAR+AZLwHqAYADBfMEaAG+AeABLwa+AfME8wRoIAUBaAHAI8AHwBsB6gHgAS8G6gHzBPMEaCAFAWgBQB9AA0ATwAMF8wRoAeoB4AEvQB8D8wRoAUADA+oB8wTgAwPAGwHqAeABLwbqAfME8wRoIAUBaAFAC0AjQANAC0ADAfMEQBfgES8B6gHgBQMB8wTgGS/gW1/AYwHzBOAZj+ADwwXzBGgBvgHA7wi+Ab4B8wTzBGggBQFoAeADJ0AXQA8B8wRAF8AvQAsE8wTzBGggBQFoAcAjQBPAAwHzBEAX4AEvBr4B8wTzBGggBQFoAcAjQAdAF0ADAfMEQBfgAS8G6gHzBPMEaCAFAWgBQAvgBwMB8wRAF+AdL+AbX0AjQAMB6gGAAwHzBOARX+ADJ+AJL0AdAWgBQBcD8wRoAUADQBFAD+ADBwXzBGgB6gHgAb9AGwnzBGgB8wS+Ab4BQAWAAwDqoAcF8wRoAb4BwC8IvgG+AfME8wRoIAUBaAHAI0ATwAMF8wRoAeoB"}}
  3. "Power on" command of an old Dune HD player (selected from the device vendor's database):
    {"key_num":1,"delay":300,"header":"00040ED8010010390015001500150040010004015A00AD00000106015A00560015","key1":{"type":0,"key_code":"00 00 BF 43 BC"}}

"key_code" contains the sequence (in base64) the device sent when it recorded pushing button on a remote control.

@mak-42
Copy link

mak-42 commented May 8, 2022

I dug out the documentation of Dune HD player. It says:

All Dune HD IR Remotes use NEC IR protocol. Different generations of Remotes use different NEC IR customer codes:
...
Previous generation (Premium IR Remote + discontinued models): 00 BF
...
IR HEX codes (latest Remote models use CF CF instead 00 BF):
...
POWER 00 BF 43 BC
There is the description of NEC Protocol.

I captured POWER button of an Dune HD player two times and sends it to the device:

  1. {"key_num":1,"delay":300,"key1":{"num":1,"freq":38000,"type":1,"key_code":"B08jRhFwAvsB4BUDAVwG4A0DQDfgAxtAD+ADA0Ab4AcPQBPAAwf7AXACXAZwAg=="}}
  2. {"key_num":1,"delay":300,"key1":{"num":1,"freq":38000,"type":1,"key_code":"B0gjQhFvAv8B4BUDAVoG4A0DQDfgAxtAD+ADA0Ab4AcPQBPAA0AbQAsPKaBII2IIbwL//0gjYghvAg=="}}

It does not look like I expected. All the ideas how to transform NEC protocol code to the "key_code" value are welcome.

Anyway. I'm going to make a custom script to support this device. It'll allow to learn keys returning the "key_code" value and send keys.

@kds69
Copy link
Contributor Author

kds69 commented May 10, 2022

Thanks you so much for looking into it.
Unfortunately, I can't help you on this. We'll probably come into play as you manage to create a script to learn keys.
I actually do have robot vacuum cleaner for whichkeys from manufacturer (navibot) can be found on the net and I'll try in parallel now that I have the structure of messages thanks to you.

@mak-42
Copy link

mak-42 commented May 10, 2022

One does not simply write the script. It looks the developers of the device invented a custom protocol incapsulated into ZigBee packets. It requires to sends and received a sequence of ZigBee packets (usually command packets of six types) to transmit one IR command. I still don't understand how to make it right way. It seems it'll take more time when I expected.

@mak-42
Copy link

mak-42 commented May 12, 2022

I've managed to send one of previously written ir code to my fan using my awfully written script. It switched the fan on. I hope I'll finish the first version of the script at the weekend.

@mak-42
Copy link

mak-42 commented May 15, 2022

I've finished the first version of the script. It looks nasty, but should work.
Please, check if it works with your devices. If everything is ok, I'll make a MR to support the device out of box.

Adding the device:

  1. The script file with external converter has to be unzipped next to the "configuration.yaml".
  2. Set the Zigbee2MQTT log_level to debug and enable the external converter by adding the following to your Zigbee2MQTT configuration.yaml:
advanced:
  log_level: debug
external_converters:
  - TS1201.js
  1. restart zigbee2mqtt.

The device should be recognized and ready to use.

The device exposed three properties:

  1. "learnIRCode" - turn it on to switch the device into learning mode.
  2. " learnedIRCode" - displays previously learned IR code.
  3. "IRCodeToSend" - paste one of previously learned IR code to send it by the device.

TS1201.zip

@sipossz
Copy link

sipossz commented May 16, 2022

Hi! The original Aubess IR device removed from the Aliexpress shop. Now you can by this new one directly from Aubess, I hope this also work with your scripts, but I don't know, what will be the difference:
https://www.aliexpress.com/item/1005004222101838.html?spm=a2g0o.store_pc_allProduct.8148356.1.27453847L42QDD&pdp_npi=2%40dis%21HUF%21HUF%2013%2C001.11%21HUF%208%2C711.89%21%21%21%21%21%400b0a187916527052859052723e9fa1%21%21sh

@nmaster2042
Copy link

nmaster2042 commented May 16, 2022

I may be wrong but I think previous version of the device is always avaliable, see here:
https://fr.aliexpress.com/item/1005003793186067.html?spm=a2g0s.8937460.0.0.3f3d2e0ePuePy3&gatewayAdapt=glo2fra

There is another one, but physically different:
https://fr.aliexpress.com/item/1005003878194474.html?spm=a2g0s.8937460.0.0.3f3d2e0ePuePy3&gatewayAdapt=glo2fra

@sipossz
Copy link

sipossz commented May 16, 2022

Ok as I see the difference is only the power supply: the new one works with 2xAAA betteries against USB charging. I order one, and I'll try it, how it works with your script.

@mak-42
Copy link

mak-42 commented May 16, 2022

sipossz, I think the script should be modified for new device, because it should report battery status at least. Please send a database entry when you receive the device and I'll try to modify the script for you,

@kds69
Copy link
Contributor Author

kds69 commented May 20, 2022

External converter TS1201.js tested successfully on 2 IR devices:
-navibot samsung SR8950
-yamaha home theater HTR-4064

Well done, Sir!!
This is really great!!

Question:
I tested directly via zigbee2mqtt front-page. How mqtt command would look like?
...
found ;)

@mak-42
Copy link

mak-42 commented May 22, 2022

@kds69, thank you for testing.
I started creating a merge request, but I need more time to complete it. So hopefully, I'll finish it next week.

@naifzack
Copy link

I've finished the first version of the script. It looks nasty, but should work. Please, check if it works with your devices. If everything is ok, I'll make a MR to support the device out of box.

Adding the device:

  1. The script file with external converter has to be unzipped next to the "configuration.yaml".
  2. Set the Zigbee2MQTT log_level to debug and enable the external converter by adding the following to your Zigbee2MQTT configuration.yaml:
advanced:
  log_level: debug
external_converters:
  - TS1201.js
  1. restart zigbee2mqtt.

The device should be recognized and ready to use.

The device exposed three properties:

  1. "learnIRCode" - turn it on to switch the device into learning mode.
  2. " learnedIRCode" - displays previously learned IR code.
  3. "IRCodeToSend" - paste one of previously learned IR code to send it by the device.

TS1201.zip

thank you so much
it works even with:
https://www.aliexpress.com/item/1005004203511085.html?spm=a2g0o.order_list.0.0.59ef1802wEH7PO

Model:UFO-R11
Vendor: MOES

i change "" manufacturerName: '_TZ3290_j37rooaxrcdcqo5n'}"" and works fine

but it didn't show battery percentage at first time i try to configure it with ZHA, ZHA show battery percentage.

can anyone please share how to add device button to dashboard after reading IR code , (for example power button in tv )

@kds69
Copy link
Contributor Author

kds69 commented May 25, 2022

can anyone please share how to add device button to dashboard after reading IR code , (for example power button in tv )

This is HA related question, I do recommend to check on the HA community forum or discord.

@naifzack
Copy link

naifzack commented May 25, 2022

share link please to any recommended page

@naifzack
Copy link

External converter TS1201.js tested successfully on 2 IR devices: -navibot samsung SR8950 -yamaha home theater HTR-4064

Well done, Sir!! This is really great!!

Question: I tested directly via zigbee2mqtt front-page. How mqtt command would look like? ... found ;)

did you add this device to dashboard as button ?

@naifzack
Copy link

can you please share MQTT command .

@kds69
Copy link
Contributor Author

kds69 commented May 25, 2022

can you please share MQTT command .

send topic zigbee2mqtt/your_aubess_device/set with payload { "IRCodeToSend": your_code_to_be_sent }

@mak-42
Copy link

mak-42 commented May 25, 2022

can you please share MQTT command .

You can do it like this as well:
send topic zigbee2mqtt/your_device_name/set/IRCodeToSend with payload "code_to_be_sent".

@mak-42
Copy link

mak-42 commented May 25, 2022

@naifzack, could you please publish a database entry for your MOES device. I need the information about clusters to add this device (with battery info) to zigbee2mqtt.

@teras
Copy link

teras commented Nov 17, 2022

Hello all.

I have some problems with my newly obtained Moes UFO-R11 device.

First of all, I managed to properly set it up, receive codes, send new codes, set up with HA, so everything looked fine.

But after some time, the device seems unresponsive. When I send the code, nothing happens. I tried to reset everything and start from scratch (of course except the IR code which I already knew), the device worked perfectly. But after some time it had problems (the first command wasn't delivered at all, the second it was delivered with delay, and the third almost immediately). When more time passed, the device looked totally unresponsive.

If I remove the battery, and reinstall it (i.e. "force reboot it" ) then it becomes responsive again.

This is the debug log, when I try to send commands when the device is not responsive:

debug 2022-11-18 01:21:55Received MQTT message on 'zigbee2mqtt/pc_irda/set' with data '{ "ir_code_to_send":"BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI=" }'
debug 2022-11-18 01:21:55Publishing 'set' 'ir_code_to_send' to 'pc_irda'
debug 2022-11-18 01:21:55Sending IR code: "BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI="
debug 2022-11-18 01:21:55Sending IR code initiated.

and nothing else happens.

Now, after the "battery reset" trick, the debug is as follows:

debug 2022-11-18 01:32:41Received MQTT message on 'zigbee2mqtt/pc_irda/set' with data '{ "ir_code_to_send":"BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI=" }'
debug 2022-11-18 01:32:41Publishing 'set' 'ir_code_to_send' to 'pc_irda'
debug 2022-11-18 01:32:41Sending IR code: "BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI="
debug 2022-11-18 01:32:41Sending IR code initiated.
debug 2022-11-18 01:32:41Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode01', cluster 'zosungIRTransmit', data '{"cmd":2,"length":190,"seq":0,"unk1":0,"unk2":57348,"unk3":1,"unk4":0,"zero":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:41"IR-Message-Code01" received (msg:{"zero":0,"seq":0,"length":190,"unk1":0,"unk2":57348,"unk3":1,"cmd":2,"unk4":0})
debug 2022-11-18 01:32:41IRCode to send: "{\"key_num\":1,\"delay\":300,\"key1\":{\"num\":1,\"freq\":38000,\"type\":1,\"key_code\":\"BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI=\"}}" (seq:0)
debug 2022-11-18 01:32:41Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":0,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:41"IR-Message-Code02" received (msg:{"seq":0,"position":0,"maxlen":64})
debug 2022-11-18 01:32:41Sent IRCode part: {"key_num":1,"delay":300,"key1":{"num":1,"freq":38 (sum: 207, seq:0)
debug 2022-11-18 01:32:41Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":50,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:41"IR-Message-Code02" received (msg:{"seq":0,"position":50,"maxlen":64})
debug 2022-11-18 01:32:41Sent IRCode part: 000,"type":1,"key_code":"BxcjVBGeAhECgAMDWgaeAsALQ (sum: 135, seq:0)
debug 2022-11-18 01:32:42Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":100,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:42"IR-Message-Code02" received (msg:{"seq":0,"position":100,"maxlen":64})
debug 2022-11-18 01:32:42Sent IRCode part: AfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+A (sum: 170, seq:0)
debug 2022-11-18 01:32:42Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":150,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:42"IR-Message-Code02" received (msg:{"seq":0,"position":150,"maxlen":64})
debug 2022-11-18 01:32:42Sent IRCode part: DE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI="}} (sum: 45, seq:0)
debug 2022-11-18 01:32:42Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode04', cluster 'zosungIRTransmit', data '{"seq":0,"zero0":0,"zero1":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:42"IR-Message-Code04" received (msg:{"zero0":0,"seq":0,"zero1":0})
debug 2022-11-18 01:32:42IRCode has been successfuly sent. (seq:0)

The behavior is completely different. To my newbie eyes, it looks like a power saving issue to me. If the device is not used for long periods of time, does it go into some kind of "sleep mode"? If this is the case, any way we can prevent this? Any ideas?

Mephistofeles pushed a commit to Mephistofeles/zigbee-herdsman-converters that referenced this issue Dec 13, 2022
* Add AUBESS ZXZIR-02 (_TZ3290_acv1iuslxi3shaaj) universal smart IR remote control. Koenkk/zigbee2mqtt#11633

* Eslint errors has been fixed.

* Eslint errors has been fixed.

* 1."fromZigbee,js" and "toZigbee.js" have been reverted to previous state.
2. All the logic has been moved to "lib/zsong.js".
3. All exposes converted to snake case.

* "zigbee-herdsman" version has been updated to supporting ZSONG cluster.

* Update aubess.js

* Update zosung.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Mephistofeles pushed a commit to Mephistofeles/zigbee-herdsman-converters that referenced this issue Dec 13, 2022
* Add TuYa ZS06 (_TZ3290_7v1k4vufotpowp9z) universal smart IR remote control. Koenkk/zigbee2mqtt#11633

* Update tuya.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
Mephistofeles pushed a commit to Mephistofeles/zigbee-herdsman-converters that referenced this issue Dec 13, 2022
* Add MOES UFO-R11 (_TZ3290_j37rooaxrcdcqo5n) universal smart IR remote control.
Koenkk/zigbee2mqtt#11633

* Update moes.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale Stale issues label Dec 18, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2022
@Saharok14
Copy link

Hello all.

I have some problems with my newly obtained Moes UFO-R11 device.

First of all, I managed to properly set it up, receive codes, send new codes, set up with HA, so everything looked fine.

But after some time, the device seems unresponsive. When I send the code, nothing happens. I tried to reset everything and start from scratch (of course except the IR code which I already knew), the device worked perfectly. But after some time it had problems (the first command wasn't delivered at all, the second it was delivered with delay, and the third almost immediately). When more time passed, the device looked totally unresponsive.

If I remove the battery, and reinstall it (i.e. "force reboot it" ) then it becomes responsive again.

This is the debug log, when I try to send commands when the device is not responsive:

debug 2022-11-18 01:21:55Received MQTT message on 'zigbee2mqtt/pc_irda/set' with data '{ "ir_code_to_send":"BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI=" }'
debug 2022-11-18 01:21:55Publishing 'set' 'ir_code_to_send' to 'pc_irda'
debug 2022-11-18 01:21:55Sending IR code: "BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI="
debug 2022-11-18 01:21:55Sending IR code initiated.

and nothing else happens.

Now, after the "battery reset" trick, the debug is as follows:

debug 2022-11-18 01:32:41Received MQTT message on 'zigbee2mqtt/pc_irda/set' with data '{ "ir_code_to_send":"BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI=" }'
debug 2022-11-18 01:32:41Publishing 'set' 'ir_code_to_send' to 'pc_irda'
debug 2022-11-18 01:32:41Sending IR code: "BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI="
debug 2022-11-18 01:32:41Sending IR code initiated.
debug 2022-11-18 01:32:41Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode01', cluster 'zosungIRTransmit', data '{"cmd":2,"length":190,"seq":0,"unk1":0,"unk2":57348,"unk3":1,"unk4":0,"zero":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:41"IR-Message-Code01" received (msg:{"zero":0,"seq":0,"length":190,"unk1":0,"unk2":57348,"unk3":1,"cmd":2,"unk4":0})
debug 2022-11-18 01:32:41IRCode to send: "{\"key_num\":1,\"delay\":300,\"key1\":{\"num\":1,\"freq\":38000,\"type\":1,\"key_code\":\"BxcjVBGeAhECgAMDWgaeAsALQAfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+ADE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI=\"}}" (seq:0)
debug 2022-11-18 01:32:41Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":0,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:41"IR-Message-Code02" received (msg:{"seq":0,"position":0,"maxlen":64})
debug 2022-11-18 01:32:41Sent IRCode part: {"key_num":1,"delay":300,"key1":{"num":1,"freq":38 (sum: 207, seq:0)
debug 2022-11-18 01:32:41Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":50,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:41"IR-Message-Code02" received (msg:{"seq":0,"position":50,"maxlen":64})
debug 2022-11-18 01:32:41Sent IRCode part: 000,"type":1,"key_code":"BxcjVBGeAhECgAMDWgaeAsALQ (sum: 135, seq:0)
debug 2022-11-18 01:32:42Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":100,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:42"IR-Message-Code02" received (msg:{"seq":0,"position":100,"maxlen":64})
debug 2022-11-18 01:32:42Sent IRCode part: AfAD+AHB0Ab4BcDwDPgCyfAG8AHQCPACwPCTZ4CQA/gAwPAG+A (sum: 170, seq:0)
debug 2022-11-18 01:32:42Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode02', cluster 'zosungIRTransmit', data '{"maxlen":64,"position":150,"seq":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:42"IR-Message-Code02" received (msg:{"seq":0,"position":150,"maxlen":64})
debug 2022-11-18 01:32:42Sent IRCode part: DE+AHC+AbI+AHM+ADDwtaBp4CWgaeAhECngI="}} (sum: 45, seq:0)
debug 2022-11-18 01:32:42Received Zigbee message from 'pc_irda', type 'commandZosungSendIRCode04', cluster 'zosungIRTransmit', data '{"seq":0,"zero0":0,"zero1":0}' from endpoint 1 with groupID null
debug 2022-11-18 01:32:42"IR-Message-Code04" received (msg:{"zero0":0,"seq":0,"zero1":0})
debug 2022-11-18 01:32:42IRCode has been successfuly sent. (seq:0)

The behavior is completely different. To my newbie eyes, it looks like a power saving issue to me. If the device is not used for long periods of time, does it go into some kind of "sleep mode"? If this is the case, any way we can prevent this? Any ideas?

Hi! I just set up my UFO R11 as well, but after sending commands nothing happened. Could you please describe how did you learn codes and send them?
P.S. Sorry, there is no personal messages :(

@teras
Copy link

teras commented Jan 17, 2023

Hi! I just set up my UFO R11 as well, but after sending commands nothing happened. Could you please describe how did you learn codes and send them? P.S. Sorry, there is no personal messages :(

@Saharok14 I flowed the documentation and used commands, for example similar to this:

mosquitto_pub -h 192.168.1.4 -u user -P passwrod -t 'zigbee2mqtt/bedroom_irda/set' -m '{ "ir_code_to_send":"BUAjkBFb..." }'

To get the code, click on the web interface to send the command (learn_ir_code -> on) and you'll see the result in the learned_ir_code field

@Saharok14
Copy link

And I did the same but never worked for me, looks like the device (Moes IR blaster) is rebooting after sending the command (from the Zigbee2mqtt logs, announce of the device after sending the IR command). I already ordered one more, will see what will
happen :) thanks for the information!

@helepeut
Copy link

helepeut commented Feb 2, 2023

Same problem as @Saharok14. I have 3 of them.
2 are working as expected, they are connected to the same coordinator.
But the 3rd seems to sleep. It's connected directly to the central controller, and I have to remove batteries everyday in order to wake it up. Z2M is telling me that it hasn't been seen since X days / hours (depending on the hard reboot).

@Saharok14 : are your test with the 2nd one better ?
I didn't try with a Tuya hub

Thanks !

@Saharok14
Copy link

I just returned it and got a Wi-Fi one. So, this device didn’t work for me…

@helepeut
Copy link

helepeut commented Feb 3, 2023

:-(
Thanks for your feedback @Saharok14 .
Which one did you choose ?

@Saharok14
Copy link

Saharok14 commented Feb 4, 2023

Try “Tuya IR remote Wi-Fi” I just got a first from the list in the local store… in my case - https://allegro.pl/oferta/smart-remote-uniwersalny-pilot-ir-wifi-tuya-11425213322

@LindsayReid
Copy link

LindsayReid commented Feb 22, 2023

Is it possible to simulate up a sequential multi key sequence such as "123" to enter a three digit number. I can't "learn" a multi-key sequence or set up a script to emulate one. The remote only seems to want to do one single discrete command at a time.

@andrewcchen
Copy link

Awesome, thanks! I have another question. Does anybody know how the ir codes are encoded? I want to control my ac and be able to create my own ir codes. Other people have reversed engineered the NEC ir codes so the hard part is already done. Does anybody know how I can turn the output ir codes into NEC (or bits) or something else that useful?

I figured out (enough of) how the devices custom encoding works to send any NEC command. I wrote a node js function to convert nec codes into this device's encoding. The script and a description of the encoding are here: https://gist.github.com/andrewcchen/f16eb20d19ea64d9f997c470e2addeaa

@denveronly
Copy link

Can you help me out
Have same device i guess
It pairs in z2m, but then it is always offline
Tried changing batteries, repairing multiple times
Always the same
Lear switch is also inactive

IMG_0302

@c4coer
Copy link

c4coer commented Dec 21, 2023

can you make it work under deconz, thanks

@jakubsz123
Copy link

Hi, I guess TS1201 is still not supported. I have no clue how to add external converter. Could sb help me out with this?

@mildsunrise
Copy link

Hi everyone! I managed to crack the custom encoding of IR codes used by Tuya IR blasters.
I've documented the format here: https://gist.github.com/mildsunrise/1d576669b63a260d2cff35fda63ec0b5
With this I've successfully decoded codes learnt by the blaster (to use them with other non-Tuya blasters).

@andrewjmetzger
Copy link

Hi @mildsunrise, thank you for your excellent documentation!

Please take a look over here: zigpy/zha-device-handlers#1687.

We have the same device and are working to understand the codes, too.

I found your Gist, and would like to dig deeper on the protocol used by Tuya IR. Perhaps we can work on a conversion tool? I see your FIXME comment... 😆

Many thanks!

@mildsunrise
Copy link

@andrewjmetzger

We have the same device and are working to understand the codes, too.

it should use the same format, just try it and tell me if decode_ir works.
if it doesn't, please provide some sample strings so that I can take a look :)

Perhaps we can work on a conversion tool?

encode_ir and decode_ir should be all that you need to convert between a signal and a code string accepted by the blaster.

I see your FIXME comment... 😆

oh, no worries, encode_ir already works, it's just that it produces long strings.

besides, I've just implemented the compression so it should now give reasonably small strings :)
much smaller in fact than what the device usually produces (so you can use the functions to further re-compress a code string).

@ferehcarb
Copy link

As the script is currently written, would it be possible to send the exact key_code and header to the device like in the last message through zigbee2mqtt?

I did not implement this because I have no idea how to obtain the value of header. Have you got any idea?

@mak-42 Do you still have the sniffing logs for this format ?
I would like to implement this functionality in ZHA but it seems that the zigbee command flow is not the same as the format without the header keyword.

@mak-42
Copy link

mak-42 commented Mar 24, 2024

Do you still have the sniffing logs for this format ?

I'll try if you tell me the command in the original application you want to sniff.

@ferehcarb
Copy link

I'll try if you tell me the command in the original application you want to sniff.

It doesn't matter, for example Fan -> Westinghouse -> Power.

@mak-42
Copy link

mak-42 commented Mar 24, 2024

Something have changed since the previous sniffing. I have not much suitable remote controls (Smart Life makes me press buttons to add new one).

The codes for lamp remote control (ERA):

{"vir_id":"bf7e96d7bc918d49a2fbih","key_num":1,"delay":300,"key1":{"keyids":186,"type":1}}
{"vir_id":"bf7e96d7bc918d49a2fbih","key_num":1,"delay":300,"key1":{"keyids":1,"type":1}}

The codes for Dune player (I added 2 years ago):

{"key_num":1,"delay":300,"header":"010ed8000000000200700150040015a005600ad06580e74","key1":{"type":0,"key_code":"01$^002000FD28D7@&$%@*"}}

it does not look like the code sniffed before:

{"key_num":1,"delay":300,"header":"00040ED8010010390015001500150040010004015A00AD00000106015A00560015","key1":{"type":0,"key_code":"00 00 BF 43 BC"}}

@ferehcarb
Copy link

Something have changed since the previous sniffing. I have not much suitable remote controls (Smart Life makes me press buttons to add new one).

Thanks for trying, I finally bought a sniffer and a Tuya GW (actually 2 because I didn't know that the wireless version doesn't support the IR blaster...) to do tests more easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device support New device support request stale Stale issues
Projects
None yet
Development

No branches or pull requests