Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
12.36k stars 1.69k forks source link

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

Closed kds69 closed 1 year ago

kds69 commented 2 years ago

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

nmaster2042 commented 2 years ago

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

mak-42 commented 2 years ago

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[bot] commented 2 years ago

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

mak-42 commented 2 years ago

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

JoshuaDodds commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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
  3. 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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

share link please to any recommended page

naifzack commented 2 years ago

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 commented 2 years ago

can you please share MQTT command .

kds69 commented 2 years ago

can you please share MQTT command .

send topic zigbee2mqtt/_your_aubessdevice/set with payload { "IRCodeToSend": _your_code_to_besent }

mak-42 commented 2 years ago

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 commented 2 years ago

@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.

naifzack commented 2 years ago

thanks so much it works.

naifzack commented 2 years ago

@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.

"data": { "ieee": "**REDACTED**", "nwk": 13109, "manufacturer": "_TZ3290_j37rooaxrcdcqo5n", "model": "TS1201", "name": "_TZ3290_j37rooaxrcdcqo5n TS1201", "quirk_applied": false, "quirk_class": "zigpy.device.Device", "manufacturer_code": 4098, "power_source": "Battery or Unknown", "lqi": null, "rssi": null, "last_seen": "2022-05-26T10:57:21", "available": true, "device_type": "EndDevice", "signature": { "node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4098, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)", "endpoints": { "1": { "profile_id": 260, "device_type": "0xf000", "in_clusters": [ "0x0000", "0x0001", "0x0003", "0x0004", "0x0005", "0x0006", "0xe004", "0xed00" ], "out_clusters": [ "0x000a", "0x0019" ] } } }, "entities": [ { "entity_id": "button.tz3290_j37rooaxrcdcqo5n_ts1201_c20787fe_identify", "name": "_TZ3290_j37rooaxrcdcqo5n TS1201" }, { "entity_id": "sensor.tz3290_j37rooaxrcdcqo5n_ts1201_c20787fe_power", "name": "_TZ3290_j37rooaxrcdcqo5n TS1201" }, { "entity_id": "switch.tz3290_j37rooaxrcdcqo5n_ts1201_c20787fe_on_off", "name": "_TZ3290_j37rooaxrcdcqo5n TS1201" } ], "neighbors": [], "endpoint_names": [ { "name": "undefined_0xf000" } ], "user_given_name": null, "device_reg_id": "a1c4146f4d10a258ade80945cce0ade8", "area_id": null } }

Screenshot 2022-05-26 110413

JoshuaDodds commented 2 years ago

Just want to confirm that this script indeed works with the Moes rebranded version of the UFO-R11.

Link: https://www.moeshouse.com/collections/new-arrivals/products/tuya-zigbee-smart-ir-remote-control-universal-infrared-remote-controller-for-smart-home-for-ac-tv-dvd-works-with-alexa-google-home-wired-zigbee-hub-required

Just change the manufacturerName in the TS1201.js external-converters script to the name of this Moes device as reported by zigbee during interview and setup and then restart z2m.

Search in the script for manufacturerName and it will look like this: manufacturerName: '_TZ3290_j37rooaxrcdcqo5n'

Replace the value with the Moes device's manufacturer name and restart z2m and you should be good to go.

Works a charm... Thank you for spending your time on this... nicely done!

mak-42 commented 2 years ago

I've tried to modify the script for the MOES device. It should report battery status. Unfortunately, I can't test it because I don't have the device. Could you please check if it works.

TS1201_MOES.zip

JoshuaDodds commented 2 years ago

I've tried to modify the script for the MOES device. It should report battery status. Unfortunately, I can't test it because I don't have the device. Could you please check if it works.

TS1201_MOES.zip

Sorry no luck... Still no battery status. Maybe it reports it in intervals and will pop in later. Will let you know if so. I did leave and rejoin the device so it would re-interview but that also had no effect on the batt status being reported.

On a side note... the device seems sort of unstable. It will work fine for 12 hours or so but it seems that it crashes after a number of commands are sent to it. removing the battery and "rebooting" it is the only solution for me so far. I noticed there is QUITE alot of debug spam in the web GUI frontend when sending a command though. Seems to be sending the command multiple of multiple times.

mak-42 commented 2 years ago

On a side note... the device seems sort of unstable

Could you please share zigbee2mqtt logs. I want to be sure this is not a bug in my code.

mak-42 commented 2 years ago

I've create MR to all the projects to support first device. I hope I didn't break something when fix eslint problems. I need more info (logs) to add second device (on batteries).

JoshuaDodds commented 2 years ago

On a side note... the device seems sort of unstable

Could you please share zigbee2mqtt logs. I want to be sure this is not a bug in my code.

Sure... Could you give me string to grep the logs for which will return the information you want to have? I don't want to send you the whole log as i have over 60 devices in my network and the logs will be very large.

mak-42 commented 2 years ago

Could you give me string to grep the logs for which will return the information you want to have?

Please use the name (or address) of the device. The messages should looks like:

debug 2022-05-22 21:10:22: Received Zigbee message from '<your device name>',  type 'commandAubessSendIRCode01', cluster 'aubessIRTransmit', data '{"cmd":2,"length":750,"seq":0,"unk1":0,"unk2":57348,"unk3":1,"unk4":0,"zero":0}' from endpoint 1 with groupID 0

And you can look for "message-code0", "sendIRCode0", "Invoked 1" and "Invoked 2" as well.

gisi97 commented 2 years ago

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".

Sorry my ignorance, but where should I add the MQTT command to add this device in dashboard as button? Thank you very much for your work, very good.

mak-42 commented 2 years ago

where should I add the MQTT command to add this device in dashboard as button

It depends on the software you use. If you use OpenHab I can help.

gisi97 commented 2 years ago

i use home assistant with raspberry and sonoff coordinator dongle.

mak-42 commented 2 years ago

@gisi97, I think you should do something like this, but use topic and payload provided by @kds69 here.

mak-42 commented 2 years ago

I have to inform that in release version the exposes were converted in snake case (look at MR conversation for details):

The device will expose three properties:

  1. "learn_ir_code" - turn it on to switch the device into learning mode.
  2. " learned_ir_code" - displays previously learned IR code.
  3. "ir_code_to_send" - paste one of previously learned IR code to send it by the device.
nmaster2042 commented 2 years ago

Personally I'll buy this one: https://fr.aliexpress.com/item/1005004019709485.html?spm=a2g0s.8937460.0.0.307e2e0e2hZnSN&gatewayAdapt=glo2fra

It seems to be the same kind

I'll let you know when I'll get it

sipossz commented 2 years ago

Finally I got my device and I tested integration with this one: https://fr.aliexpress.com/item/1005004222101838.html

It and had been worked fine (except the battery status), I was able to control everything what I want, but today something have broken, I got the following error message:

image

Any merge happened? I downloaded the latest zip from here and that was ok till today: TS1201_MOES.zip

There were a zigbee2mqtt upgrade yesterday evening (1.25.2-1), maybe the error is relating to that and broke something.

This is the error message when IRCodeToSend used: Publish 'set' 'IRCodeToSend' to 'LivingRoom IR' failed: 'Error: Cluster 'zosungIRTransmit' has no command 'sendIRCode00'

mak-42 commented 2 years ago

@sipossz, the old scripts aren't compatible with the latest version. Please, try this one (one script for both devices). It works for the first device. I hope I it works for MOES. TS1201.zip

mak-42 commented 2 years ago

The good news is the MRs were accepted. I hope the first device will be supported in next release.

JoshuaDodds commented 2 years ago

Could you give me string to grep the logs for which will return the information you want to have?

Please use the name (or address) of the device. The messages should looks like:

debug 2022-05-22 21:10:22: Received Zigbee message from '<your device name>',  type 'commandAubessSendIRCode01', cluster 'aubessIRTransmit', data '{"cmd":2,"length":750,"seq":0,"unk1":0,"unk2":57348,"unk3":1,"unk4":0,"zero":0}' from endpoint 1 with groupID 0

And you can look for "message-code0", "sendIRCode0", "Invoked 1" and "Invoked 2" as well.

The device has been stable for a few days now and the logs never had any errors which is why i haven't replied as of yet. I think the issue was unrelated to your script and more to do with it losing network connectivity from the location where it was placed. I think you can close this investigation out in your head for now :)

sipossz commented 2 years ago

@sipossz, the old scripts aren't compatible with the latest version. Please, try this one (one script for both devices). It works for the first device. I hope I it works for MOES. TS1201.zip

Thanks, now it works. The expose names have changed in the new version.

naifzack commented 2 years ago

@sipossz, the old scripts aren't compatible with the latest version. Please, try this one (one script for both devices). It works for the first device. I hope I it works for MOES. TS1201.zip

For Model:UFO-R11 Vendor: MOES its work the same like before .

ir_remote_6
gisi97 commented 2 years ago

zigbee2mqtt/your_device_name/set/IR_Code_To_Send

Where should these commands be written in Homeassistant? I've been trying so many ways but it doesn't work. Could you post a screenshot thanks a lot

sipossz commented 2 years ago

I'm able to read the battery status wit the following parameters: cluster: PowerCfg, attribute: batteryPercentageRemaining

On the DevConsole it look like this: image

Here are the logs: Debug 2022-06-03 14:38:34Received MQTT message on 'zigbee2mqtt/LivingRoom IR/1/set' with data '{"read":{"attributes":["batteryPercentageRemaining"],"cluster":"genPowerCfg","options":{}}}' Debug 2022-06-03 14:38:34Publishing 'set' 'read' to 'LivingRoom IR' Debug 2022-06-03 14:38:35Received Zigbee message from 'LivingRoom IR', type 'readResponse', cluster 'genPowerCfg', data '{"batteryPercentageRemaining":200}' from endpoint 1 with groupID 0 Info 2022-06-03 14:38:35MQTT publish: topic 'zigbee2mqtt/LivingRoom IR', payload '{"battery":100,"learn_ir_code":null,"learnedIRCode":"DUQBTgKAAQIBlwICAYABwAsCTgKXIAECAgFEYAEETgJOApdgAQH//0AjCUQBRAGXAgIBRAHACwFOAkADAUQBgAEJlwJOApcClwJOAg==","learned_ir_code":"BXMjrRE2AsABA5cGNgLgCwFAF0ADQAFAB+AHA+ADAUAb4AcBQBPAA0ABwAvABwcCnXMjwwg2Ag==","linkquality":43,"voltage":1500}' Info 2022-06-03 14:38:35Read result of 'genPowerCfg': {"batteryPercentageRemaining":200}

In this case the device reporting the correct status: image

@mak-42 can you implement in the script? Thanks! :)

naifzack commented 2 years ago

I'm able to read the battery status wit the following parameters: cluster: PowerCfg, attribute: batteryPercentageRemaining

On the DevConsole it look like this: image

Here are the logs: Debug 2022-06-03 14:38:34Received MQTT message on 'zigbee2mqtt/LivingRoom IR/1/set' with data '{"read":{"attributes":["batteryPercentageRemaining"],"cluster":"genPowerCfg","options":{}}}' Debug 2022-06-03 14:38:34Publishing 'set' 'read' to 'LivingRoom IR' Debug 2022-06-03 14:38:35Received Zigbee message from 'LivingRoom IR', type 'readResponse', cluster 'genPowerCfg', data '{"batteryPercentageRemaining":200}' from endpoint 1 with groupID 0 Info 2022-06-03 14:38:35MQTT publish: topic 'zigbee2mqtt/LivingRoom IR', payload '{"battery":100,"learn_ir_code":null,"learnedIRCode":"DUQBTgKAAQIBlwICAYABwAsCTgKXIAECAgFEYAEETgJOApdgAQH//0AjCUQBRAGXAgIBRAHACwFOAkADAUQBgAEJlwJOApcClwJOAg==","learned_ir_code":"BXMjrRE2AsABA5cGNgLgCwFAF0ADQAFAB+AHA+ADAUAb4AcBQBPAA0ABwAvABwcCnXMjwwg2Ag==","linkquality":43,"voltage":1500}' Info 2022-06-03 14:38:35Read result of 'genPowerCfg': {"batteryPercentageRemaining":200}

In this case the device reporting the correct status: image

@mak-42 can you implement in the script? Thanks! :)

I did the same, it works for me .

image

mak-42 commented 2 years ago

@sipossz, @naifzack, thanks a lot. It should help. Please, try this script. And I added battery_voltage as well. TS1201-3.zip